/* The Branded House - site styles. Every value comes from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
em { font-style: normal; color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.micro { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--fg-muted); margin: 0; display: flex; align-items: center; gap: 10px; }
.micro i, .nav__links i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* WebGL stage + section glow (behind everything) */
.stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; pointer-events: none; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 55% at var(--gx, 72%) 45%, var(--glow, rgba(190,0,60,.30)), transparent 70%);
  transition: background 900ms var(--ease); }
main, .nav { position: relative; z-index: 2; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-small); text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.btn:active { transform: scale(.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--magenta-400); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--fg); background: rgba(11,12,14,.35); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--fg-muted); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter); padding-top: max(18px, env(safe-area-inset-top)); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__seal { width: 46px; height: 46px; color: var(--ink-950); --seal-bg: var(--paper-50); flex: none; }
.nav__name { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 850; font-size: .95rem; line-height: .95; text-transform: uppercase; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; font-size: var(--fs-small); font-weight: 500; }
.nav__links a { text-decoration: none; display: flex; align-items: center; gap: 8px; color: var(--fg-muted); transition: color var(--t-fast) var(--ease); }
.nav__links a:hover { color: var(--fg); }
.nav__right { display: flex; gap: 10px; }

/* Hero: headline top-left, the chrome roof owns the right two-thirds */
.hero { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 0 var(--gutter); }
.hero__inner { align-self: center; padding-top: 120px; max-width: var(--w-wide); }
.hero__kicker { margin-bottom: 28px; }
.hero__title { margin: 0; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; font-size: var(--fs-hero);
  line-height: .86; letter-spacing: var(--track-display); text-transform: uppercase; }
.hero__title .line { display: block; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 36rem); gap: 26px; margin-top: 40px; }
.hero__lede { margin: 0; color: var(--fg-muted); max-width: 46ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__specs { display: grid; grid-template-columns: 2fr 1fr 1fr; margin: 0; border-top: 1px solid var(--line); max-width: var(--w-wide); }
.hero__specs div { padding: 18px 0 26px; }
.hero__specs dt { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--fg-faint); }
.hero__specs dd { margin: 4px 0 0; font-weight: 500; }

/* Division test bands: copy sits opposite the ribbon */
.band { min-height: 110vh; display: flex; align-items: center; padding: var(--section-y) var(--gutter); }
.band__inner { max-width: 40rem; }
.band--right { justify-content: flex-end; }
.band--right .band__inner { text-align: left; }
.band--end { min-height: 90vh; justify-content: center; text-align: center; }
.band--end .band__inner { max-width: none; display: grid; justify-items: center; gap: 36px; }
.band__title { margin: 18px 0 20px; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900;
  font-size: var(--fs-xl); line-height: .9; letter-spacing: var(--track-display); text-transform: uppercase; text-wrap: balance; }
.band__text { color: var(--fg-muted); max-width: var(--w-prose); margin: 0 0 20px; }
.spec { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--fg); margin: 0;
  border-top: 1px solid var(--line); padding-top: 14px; }

/* Motion: hidden only while JS is running the reveal (if GSAP fails, site.js removes .motion) */
.motion .hero__title .line, .motion .hero__kicker, .motion .hero__foot { visibility: hidden; }
.motion.is-ready .hero__title .line, .motion.is-ready .hero__kicker, .motion.is-ready .hero__foot { visibility: visible; }

@media (max-width: 1100px) { .nav__links { display: none; } }
@media (max-width: 700px) {
  .nav__right .btn--ghost { display: none; }
  .hero { grid-template-rows: auto auto; }
  .hero__inner { align-self: end; padding-top: 52vh; }
  .hero__title { font-size: clamp(2.6rem, 12.5vw, 4rem); }
  .hero__foot { grid-template-columns: 1fr; margin-top: 28px; }
  .hero__specs { grid-template-columns: 1fr 1fr; }
  .hero__specs div:first-child { grid-column: span 2; }
  .band { min-height: 100vh; align-items: flex-end; }
  .band--right { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .glow { transition: none; } }

/* ===== Stage 4: home sections ===== */
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
.band__title em { color: var(--accent); }
.band--left .band__inner { margin-right: auto; }

/* How it works: numbered because it is a real sequence */
.how__inner { max-width: 46rem; }
.how__steps { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.how__steps li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.how__n { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; font-size: 2rem; line-height: 1; color: var(--fg-faint); transition: color var(--t-med) var(--ease); }
.how__steps li.is-on .how__n { color: var(--accent); }
.how__steps h3 { margin: 0 0 4px; font-size: 1.15rem; }
.how__steps p { margin: 0; color: var(--fg-muted); font-size: var(--fs-small); }

/* Division bands: copy column with imagery */
.div__inner { max-width: min(46rem, 52vw); display: grid; gap: 22px; justify-items: start; }
.div__inner .band__title, .div__inner .band__text { margin: 0; }
.window { width: 100%; overflow: hidden; border-radius: var(--radius); clip-path: inset(0 0 0 0 round var(--radius)); }
.window img { width: 100%; }
.div__row { display: grid; grid-template-columns: 1.618fr 1fr; gap: 12px; width: 100%; }
.div__row img { border-radius: var(--radius-sm); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.spec { width: 100%; }

/* Before / after (keyboard operable through the range input) */
.ba { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; touch-action: pan-y; }
.ba > img { width: 100%; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba__before img { width: 100%; height: 100%; object-fit: cover; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: var(--paper-50); pointer-events: none; }
.ba__handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.ba__range:focus-visible ~ .ba__handle::after { outline: 2px solid var(--paper-50); outline-offset: 3px; }
.ba__tag { position: absolute; top: 12px; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--track-micro); text-transform: uppercase;
  background: rgba(11,12,14,.7); padding: 6px 10px; border-radius: 999px; pointer-events: none; }
.ba__tag--l { left: 12px; } .ba__tag--r { right: 12px; }

/* Apparel: giant word behind the garment (Konig Urban pattern), spec callouts */
.apparel { position: relative; overflow: hidden; justify-content: stretch; }
.apparel__word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 0; pointer-events: none;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: clamp(8rem, 30vw, 30rem); line-height: .8; letter-spacing: -0.03em;
  color: transparent; -webkit-text-stroke: 2px rgba(255,212,0,.35); white-space: nowrap; }
.apparel__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 96px); align-items: center; width: 100%; max-width: var(--w-wide); margin: 0 auto; }
.apparel .div__inner { max-width: 40rem; }
.apparel__model { position: relative; }
.apparel__model img { border-radius: var(--radius); aspect-ratio: 9/14; object-fit: cover; width: 100%; }
.callout { position: absolute; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase;
  background: rgba(11,12,14,.78); border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: 999px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.callout::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--div-apparel); }
.callout--a { top: 22%; right: -12%; } .callout--b { top: 48%; left: -10%; } .callout--c { bottom: 14%; right: -8%; }
.macro { width: 100%; overflow: hidden; border-radius: var(--radius-sm); }
.macro img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

/* Capsule: horizontal pinned run */
.capsule { display: block; min-height: auto; padding-left: 0; padding-right: 0; overflow: hidden; }
.capsule__head { padding: 0 var(--gutter); max-width: var(--w-wide); }
.capsule__track { display: flex; gap: 18px; padding: 48px var(--gutter) 8px; width: max-content; }
.pcard { width: clamp(260px, 26vw, 380px); flex: none; display: grid; gap: 12px; text-decoration: none; }
.pcard__img { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.pcard__img img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform 900ms var(--ease); }
.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard__tag { position: absolute; left: 12px; top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: rgba(11,12,14,.75); padding: 5px 9px; border-radius: 999px; }
.pcard__row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pcard__name { font-weight: 600; }
.pcard__price { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
.pcard__price small { color: var(--fg-faint); font-size: 11px; letter-spacing: .1em; margin-left: 6px; text-transform: uppercase; }

/* Track */
.track__form { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; max-width: 34rem; }
.track__form input { flex: 1 1 220px; min-height: 54px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(11,12,14,.6);
  color: var(--fg); padding: 0 22px; font: 500 1rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.track__form input::placeholder { color: var(--fg-faint); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quote__title { font-size: var(--fs-hero); }

/* Footer */
.foot { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 64px var(--gutter) 28px; background: rgba(11,12,14,.85); backdrop-filter: blur(6px); }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; max-width: var(--w-wide); }
.foot__brand { display: flex; gap: 14px; align-items: flex-start; }
.foot__brand p { margin: 0; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.foot__brand span { font-family: var(--font-body); font-weight: 400; text-transform: none; color: var(--fg-muted); font-size: var(--fs-small); }
.foot nav, .foot__grid > div:last-child { display: grid; gap: 10px; align-content: start; font-size: var(--fs-small); }
.foot a { color: var(--fg-muted); text-decoration: none; } .foot a:hover { color: var(--fg); }
.foot__small { margin: 0; color: var(--fg-faint); font-size: 13px; }
.foot__legal { margin: 48px 0 0; color: var(--fg-faint); font-size: 12px; max-width: var(--w-wide); }

@media (max-width: 900px) {
  .div__inner { max-width: 100%; }
  .apparel__grid { grid-template-columns: 1fr; }
  .callout--a { right: 8px; } .callout--b { left: 8px; } .callout--c { right: 8px; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: span 2; }
}
@media (max-width: 700px) {
  .div__row { grid-template-columns: 1fr 1fr; }
  .capsule__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; }
  .pcard { width: 72vw; scroll-snap-align: start; }
}
.pcard__more { aspect-ratio: 1; display: grid; place-items: center; text-align: center; background: linear-gradient(135deg, rgba(0,163,224,.25), rgba(228,0,124,.3), rgba(255,212,0,.25)); border: 1px solid var(--line-strong); }
.pcard__more span { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; font-size: clamp(1.6rem, 2.4vw, 2.4rem); text-transform: uppercase; line-height: .95; }

/* Header bar once scrolled (blur lives on the nav itself, never on an ancestor of a fixed element) */
.nav { transition: background var(--t-med) var(--ease), padding var(--t-med) var(--ease), border-color var(--t-med) var(--ease); border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(11,12,14,.72); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }

/* Header above page content (both were z-index 2; main came later and won) */
.nav { z-index: 10; }
