/* ==========================================================================
   Terrain — design system
   Values are taken verbatim from 02-design-tokens.md. Do not re-derive.
   ========================================================================== */

:root {
  --ink: #0A0B0A;
  --ink-alt: #0E100E;
  --panel: #121412;
  --panel-raise: #141614;
  --turf: #143024;
  --sand: #E8E2D4;
  --lime: #D4F34A;
  --lime-hover: #E9FF7A;
  --lime-deep: #A8C42F;
  --amber: #F0B93B;
  --coral: #FF8A6B;

  /* text opacity ladder */
  --t-88: rgba(232, 226, 212, .88);
  --t-72: rgba(232, 226, 212, .72);
  --t-65: rgba(232, 226, 212, .65);
  --t-55: rgba(232, 226, 212, .55);
  --t-42: rgba(232, 226, 212, .42);
  --t-35: rgba(232, 226, 212, .35);

  /* border ladder */
  --b-07: rgba(232, 226, 212, .07);
  --b-10: rgba(232, 226, 212, .10);
  --b-12: rgba(232, 226, 212, .12);
  --b-16: rgba(232, 226, 212, .16);
  --b-22: rgba(232, 226, 212, .22);
  --b-lime-hover: rgba(212, 243, 74, .42);
  --b-lime-active: rgba(212, 243, 74, .30);

  --accent-panel: linear-gradient(150deg, #143024, #0E100E);
  --bar-fill: linear-gradient(90deg, #A8C42F, #D4F34A);

  --font-display: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --sec-y: clamp(64px, 8vw, 110px);
  --sec-x: clamp(18px, 3vw, 44px);
  --gap-card: clamp(12px, 1.6vw, 20px);
  --gap-col: clamp(24px, 3vw, 44px);
  --gap-wide: clamp(28px, 4vw, 56px);
  --sticky-top: 98px;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--sand);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- type ---------- */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 110%;
  letter-spacing: -.03em;
  text-transform: uppercase;
  line-height: .9;
  text-wrap: balance;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(34px, 5vw, 62px); line-height: .92; }
h2 { font-size: clamp(34px, 5vw, 64px); line-height: .94; }
h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800; font-stretch: 107%;
  letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.t-hero-h1 { font-size: clamp(52px, 8.4vw, 116px); line-height: .86; font-stretch: 112%; letter-spacing: -.035em; }
.t-h2-sub  { font-size: clamp(24px, 3vw, 34px); line-height: 1; }

.t-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--lime); margin: 0 0 14px;
}
.t-meta {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--t-42);
}
.t-mono { font-family: var(--font-mono); }
.t-spec-val { font-family: var(--font-mono); font-size: 12.5px; }
.t-muted { color: var(--t-35); }
.t-body { font-size: 16px; line-height: 1.7; color: var(--t-65); }
.t-longform { font-size: 16.5px; line-height: 1.78; max-width: 68ch; color: var(--t-65); }

/* ---------- layout ---------- */
.t-section { padding: var(--sec-y) var(--sec-x); }
.t-section--alt { background: var(--ink-alt); }
.t-inner { max-width: 1400px; margin: 0 auto; }
.t-inner--policy { max-width: 1240px; }
.t-inner--commerce { max-width: 1180px; }
.t-inner--faq { max-width: 1000px; }
.t-inner--finder { max-width: 900px; }
.t-inner--article { max-width: 820px; }

/* flex sidebar pattern — deliberately not a grid (see 02-design-tokens.md) */
.t-wrap { display: flex; flex-wrap: wrap; gap: var(--gap-col); align-items: flex-start; }
.t-aside { flex: 1 1 230px; max-width: 290px; min-width: 0; position: sticky; top: var(--sticky-top); }
.t-content { flex: 4 1 440px; min-width: 0; }

.t-grid { display: grid; gap: var(--gap-card); grid-template-columns: repeat(auto-fit, minmax(min(100%, 272px), 1fr)); align-content: start; }
.t-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.t-grid--feature { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---------- announcement bar ---------- */
.t-announce {
  background: var(--lime); color: #000;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 9px 20px; position: relative; font-size: 13px;
}
.t-announce__sep { opacity: .45; }
.t-announce__tel { font-family: var(--font-mono); font-size: 11px; }
.t-announce__x {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  opacity: .5; background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1;
}
.t-announce__x:hover { opacity: 1; }
.t-announce[hidden] { display: none; }

/* ---------- header ---------- */
.t-header {
  position: sticky; top: 0; z-index: 60; height: 74px;
  background: rgba(10, 11, 10, .82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--b-10);
}
.t-header__row {
  max-width: 1400px; margin: 0 auto; height: 100%;
  padding: 0 var(--sec-x); display: flex; align-items: center; gap: clamp(16px, 3vw, 52px);
}
.t-wordmark { display: flex; align-items: center; gap: 10px; }
.t-wordmark__txt {
  font-size: 19px; font-weight: 900; font-stretch: 118%;
  letter-spacing: .02em; text-transform: uppercase;
}
.t-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.t-nav a, .t-nav button {
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--t-72); padding: 8px 12px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; transition: background .2s, color .2s;
}
.t-nav a:hover, .t-nav button:hover { background: var(--b-07); color: var(--sand); }
.t-nav a.is-active, .t-nav .current-menu-item > a { color: var(--lime); }

.t-more { position: relative; }
.t-more__chev { display: inline-block; margin-left: 6px; font-size: 10px; transition: transform .2s; }
.t-more[open] .t-more__chev { transform: rotate(180deg); }
.t-more__panel {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 230px;
  background: var(--panel-raise); border: 1px solid var(--b-16); border-radius: 13px;
  padding: 7px; box-shadow: 0 22px 54px rgba(0, 0, 0, .60); z-index: 70;
}
.t-more__panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 11px; border-radius: 9px; text-transform: none; letter-spacing: 0;
  font-size: 13px; font-weight: 500; color: var(--t-72);
}
.t-more__tag { font-family: var(--font-mono); font-size: 9.5px; opacity: .3; text-transform: uppercase; }

.t-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(232, 226, 212, .06); border: 1px solid var(--b-10);
  border-radius: 9px; padding: 7px 11px;
}
.t-search input {
  background: none; border: 0; outline: none; font-size: 13px;
  width: clamp(80px, 14vw, 180px); color: var(--sand);
}
.t-search input::placeholder { color: var(--t-42); }

.t-cartbtn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--lime); color: #000; border-radius: 9px;
  padding: 9px 14px; font-weight: 800; font-size: 13px; transition: background .2s;
}
.t-cartbtn:hover { background: var(--lime-hover); }
.t-cartbtn__n { font-family: var(--font-mono); font-size: 12px; }

/* ---------- buttons ---------- */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase;
  padding: 13px 22px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.t-btn--primary { background: var(--lime); color: #000; }
.t-btn--primary:hover { background: var(--lime-hover); box-shadow: 0 14px 34px rgba(212, 243, 74, .28); }
.t-btn--ghost { background: transparent; color: var(--sand); border-color: var(--b-22); }
.t-btn--ghost:hover { border-color: var(--b-lime-hover); color: var(--lime); }
.t-btn--sm { padding: 10px 14px; font-size: 12px; border-radius: 9px; }
.t-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- product card ---------- */
.t-card {
  background: var(--panel); border: 1px solid var(--b-10); border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.t-card:hover { border-color: var(--b-lime-hover); transform: translateY(-4px); }
.t-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--ink-alt); overflow: hidden; }
.t-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* An image well with no photograph must read as a deliberate placeholder, not a
   black void — #0E100E on #0A0B0A is almost invisible on its own. */
.t-card__media--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--t-42); font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .16em; text-transform: uppercase;
  background:
    repeating-linear-gradient(135deg, rgba(232,226,212,.022) 0 10px, transparent 10px 20px),
    var(--ink-alt);
  box-shadow: inset 0 0 0 1px var(--b-07);
}
.t-badge {
  position: absolute; left: 12px; top: 12px; background: var(--lime); color: #000;
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
}
.t-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.t-card__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--t-42); }
.t-card__title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.t-card__desc { font-size: 13px; line-height: 1.6; color: var(--t-55); margin: 0; }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--t-72); background: rgba(232, 226, 212, .06);
  border: 1px solid var(--b-10); border-radius: 5px; padding: 4px 8px;
}
.t-card__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--b-07); display: flex; flex-direction: column; gap: 12px; }
.t-price { font-size: 26px; font-weight: 900; font-stretch: 106%; letter-spacing: -.02em; font-family: var(--font-display); }
.t-price del { color: var(--t-35); font-size: .6em; font-weight: 600; margin-right: 8px; }
.t-price--lg { font-size: 40px; }
.t-price__plus { font-family: var(--font-mono); font-size: 11px; color: rgba(232, 226, 212, .45); margin-left: 8px; }
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* stock */
.t-stock { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.t-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.t-stock--in .t-dot { background: var(--lime); }
.t-stock--in { color: var(--t-72); }
.t-stock--low .t-dot { background: var(--amber); }
.t-stock--low { color: var(--amber); }
.t-stock--back .t-dot { background: var(--t-35); }
.t-stock--back { color: var(--t-42); }

/* ---------- shop sidebar ---------- */
.t-facet { margin-bottom: 26px; }
.t-facet__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--t-42); margin-bottom: 10px; }
.t-facet__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-fchip {
  font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--b-12); background: rgba(232, 226, 212, .06); color: var(--t-72);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.t-fchip:hover { border-color: var(--b-lime-hover); }
.t-fchip.is-active { background: var(--lime); color: #000; border-color: var(--lime); }
.t-range { width: 100%; accent-color: var(--lime); }
.t-range-val { font-family: var(--font-mono); font-size: 12px; color: var(--lime); }

.t-empty {
  border: 1px dashed var(--b-16); border-radius: 16px; padding: 44px 26px;
  text-align: center; grid-column: 1 / -1;
}

/* ---------- single product ---------- */
.t-pdp { display: flex; flex-wrap: wrap; gap: var(--gap-wide); align-items: flex-start; }
.t-gallery { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 10px; }
.t-gallery__hero { grid-row: 1 / 4; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--ink-alt); }
.t-gallery__sq { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--ink-alt); }
.t-gallery img { width: 100%; height: 100%; object-fit: cover; }
.t-buybox { flex: 1 1 380px; min-width: 0; max-width: 560px; }
.t-buybox p { max-width: 52ch; }

.t-assure { border: 1px solid var(--b-10); border-radius: 14px; overflow: hidden; margin-top: 22px; }
.t-assure__row { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--b-07); }
.t-assure__row:last-child { border-bottom: 0; }
.t-assure__tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--lime); flex: none; width: 46px; padding-top: 2px; }
.t-assure__t { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.t-assure__b { font-size: 13px; color: var(--t-55); margin: 0; }

.t-qty { display: inline-flex; align-items: center; border: 1px solid var(--b-16); border-radius: 10px; overflow: hidden; }
.t-qty button { width: 38px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--t-72); font-size: 17px; }
.t-qty button:hover { background: var(--b-07); color: var(--sand); }
.t-qty input { width: 46px; height: 44px; text-align: center; background: none; border: 0; font-family: var(--font-mono); font-size: 13px; }

/* spec table */
.t-spec { border-radius: 13px; overflow: hidden; border: 1px solid var(--b-10); }
.t-spec__row { display: flex; justify-content: space-between; gap: 18px; padding: 11px 16px; border-bottom: 1px solid var(--b-07); }
.t-spec__row:nth-child(odd) { background: var(--ink-alt); }
.t-spec__row:nth-child(even) { background: var(--panel); }
.t-spec__row:last-child { border-bottom: 0; }
.t-spec__k { color: rgba(232, 226, 212, .58); font-size: 13px; }
.t-spec__v { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
.t-spec__v.is-empty { color: var(--t-35); }
.t-footnote { font-size: 11.5px; color: var(--t-42); margin-top: 12px; }

/* performance bars */
.t-perf { background: var(--panel); border: 1px solid var(--b-10); border-radius: 16px; padding: 26px; }
.t-perf__item + .t-perf__item { margin-top: 20px; }
.t-perf__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.t-perf__val { font-family: var(--font-mono); font-size: 12.5px; color: var(--lime); }
.t-perf__track { height: 5px; border-radius: 3px; background: rgba(232, 226, 212, .09); overflow: hidden; }
.t-perf__fill { height: 100%; width: 0; border-radius: 3px; background: var(--bar-fill); transition: width 600ms var(--ease); }
.t-perf__note { font-size: 11.5px; color: var(--t-42); margin: 6px 0 0; }

/* ---------- footer ---------- */
.t-footer { background: var(--ink-alt); border-top: 1px solid var(--b-10); padding: clamp(48px, 6vw, 80px) var(--sec-x) 30px; }
.t-footer__row1 { max-width: 1400px; margin: 0 auto; display: grid; gap: var(--gap-col); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.t-footer__brand { grid-column: span 2; min-width: 0; }
.t-footer__pos { max-width: 32ch; color: var(--t-55); font-size: 14px; }
.t-footer__biz { font-size: 13px; color: var(--t-72); line-height: 1.9; }
.t-footer h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(232, 226, 212, .4); margin: 0 0 12px; font-weight: 400; }
.t-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.t-footer li a { font-size: 13px; color: rgba(232, 226, 212, .68); transition: color .2s; }
.t-footer li a:hover { color: var(--lime); }
.t-footer__row2 { max-width: 1400px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid var(--b-07); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.t-copy { font-family: var(--font-mono); font-size: 11px; color: var(--t-35); }
.t-pays { display: flex; gap: 6px; flex-wrap: wrap; }
.t-pay { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; border: 1px solid var(--b-12); border-radius: 5px; padding: 4px 8px; color: var(--t-42); }

/* ---------- motion ---------- */
.tRev {
  animation: tRise .9s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 2% cover 26%;
}
@keyframes tRise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
/* no animation-timeline support: JS adds .tRev-in, or content simply shows */
@supports not (animation-timeline: view()) {
  .tRev { animation: none; opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .tRev.tRev-in { opacity: 1; transform: none; }
  .no-js .tRev { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tRev, [style*="animation"] { animation: none !important; }
  .tRev { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ---------- utilities ---------- */
.t-breadcrumb { font-family: var(--font-mono); font-size: 11px; color: var(--t-42); margin-bottom: 18px; letter-spacing: .08em; }
.t-breadcrumb a:hover { color: var(--lime); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.t-skip { position: absolute; left: -9999px; }
.t-skip:focus { left: 12px; top: 12px; z-index: 200; background: var(--lime); color: #000; padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
