/* ==========================================================================
   TSMC — Where Ideas Become Silicon
   A descent in scale: blueprint / lithographic / EUV-light aesthetic
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #05080f;
  --ink-2: #080d18;
  --paper: #e8f1f8;
  --dim: #8ba3b8;
  --cyan: #7fd4ff;
  --cyan-dim: rgba(127, 212, 255, 0.35);
  --euv: #b46bff;
  --euv-2: #ff4fd8;
  --sodium: #ffbf3f;
  --tsmc-red: #e40001;
  --hairline: rgba(127, 212, 255, 0.14);
  --hairline-2: rgba(127, 212, 255, 0.28);
  --snap: cubic-bezier(0.16, 1, 0.3, 1);
  --snap-hard: cubic-bezier(0.83, 0, 0.17, 1);
  --meter-w: 96px;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Plex Mono", "SFMono-Regular", Menlo, monospace;
}

@property --irid {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.04em; }
sup { font-size: 0.62em; }

/* ---------- Blueprint backdrop ---------- */
.blueprint-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px),
    linear-gradient(rgba(127, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, black 30%, rgba(0,0,0,0.4) 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, black 30%, rgba(0,0,0,0.4) 100%);
}
.euv-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 82% -6%, rgba(180, 107, 255, 0.13), transparent 70%),
    radial-gradient(50vw 34vw at 8% 108%, rgba(255, 79, 216, 0.07), transparent 70%),
    radial-gradient(60vw 40vw at 50% 55%, rgba(30, 60, 110, 0.16), transparent 70%);
}

/* ==========================================================================
   SCALE-O-METER
   ========================================================================== */
.scale-o-meter {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--meter-w);
  z-index: 60; pointer-events: none;
  border-right: 1px solid var(--hairline);
  background: linear-gradient(90deg, rgba(5, 8, 15, 0.85), rgba(5, 8, 15, 0.4) 75%, transparent);
}
.som-inner { position: relative; height: 100%; padding: 20px 0; display: flex; flex-direction: column; }
.som-title {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.28em;
  color: var(--dim); text-align: center; line-height: 1.7;
}
.som-rail { position: relative; flex: 1; margin: 14px 0; }
.som-tick {
  position: absolute; left: 14px; right: 26px; height: 1px;
  background: var(--hairline-2);
  transition: background 0.4s;
}
.som-tick .som-tick-label {
  position: absolute; left: calc(100% + 6px); top: -5px;
  font-family: var(--font-mono); font-size: 8.5px; color: var(--dim);
  white-space: nowrap; transition: color 0.4s;
}
.som-tick.is-active { background: var(--cyan); }
.som-tick.is-active .som-tick-label { color: var(--cyan); }
.som-marker {
  position: absolute; left: 0; right: 0; top: 0; height: 0;
  transition: transform 1s var(--snap-hard);
  will-change: transform;
}
.som-marker-line {
  display: block; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, var(--euv-2), var(--euv), var(--cyan));
  box-shadow: 0 0 12px rgba(180, 107, 255, 0.8), 0 0 3px rgba(255, 79, 216, 0.9);
}
.som-readout {
  text-align: center; display: flex; flex-direction: column; gap: 4px; padding: 0 6px;
}
.som-exp { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--paper); }
.som-label {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.22em;
  color: var(--euv); min-height: 2.2em;
}
.som-mobile { display: none; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: var(--meter-w); right: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.9), rgba(5, 8, 15, 0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.92); padding: 3px;
}
.brand-word {
  font-weight: 800; font-stretch: 110%; letter-spacing: 0.14em; font-size: 17px;
}
.brand-reg { font-size: 0.55em; vertical-align: super; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
  padding: 8px 12px; border: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.site-nav a i { font-style: normal; color: var(--euv); margin-right: 6px; }
.site-nav a:hover, .site-nav a.is-current {
  color: var(--paper); border-color: var(--hairline-2);
}
.header-coord { font-size: 10px; color: var(--dim); letter-spacing: 0.12em; }

/* ==========================================================================
   SHARED SECTION FURNITURE
   ========================================================================== */
main { position: relative; z-index: 1; }
.panel {
  position: relative;
  padding: clamp(90px, 14vh, 160px) clamp(24px, 6vw, 96px);
  padding-left: calc(var(--meter-w) + clamp(24px, 5vw, 80px));
  border-bottom: 1px solid var(--hairline);
}
.eyebrow {
  font-size: 11px; letter-spacing: 0.3em; color: var(--cyan);
  text-transform: uppercase; margin-bottom: 26px;
}
.eyebrow sup { color: var(--euv); }
.section-head { max-width: 980px; margin-bottom: clamp(48px, 8vh, 90px); }
.section-title {
  font-weight: 800; font-stretch: 118%;
  font-size: clamp(34px, 5.4vw, 76px);
  line-height: 1.02; letter-spacing: -0.015em; text-transform: uppercase;
}
.section-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--cyan) 10%, var(--euv) 55%, var(--euv-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lede {
  margin-top: 26px; max-width: 640px;
  font-size: clamp(15px, 1.35vw, 18px); font-weight: 350;
  color: var(--dim); line-height: 1.75;
}

/* ---------- reveal / expose motion primitives ---------- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s var(--snap), transform 0.9s var(--snap);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.expose {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.15s var(--snap-hard);
  transition-delay: calc(var(--d, 0) * 130ms);
}
.expose.is-in { clip-path: inset(0 0 0 0); }

/* ==========================================================================
   01 · HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 110px;
  overflow: hidden;
}
.hero-stage { position: relative; width: 100%; }

.hero-wafer-wrap {
  position: absolute;
  top: 50%; right: -6vw;
  width: clamp(420px, 54vw, 860px); aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.9;
}
.hero-wafer { position: absolute; inset: 0; width: 100%; height: 100%; }
.wafer-iridescence {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from var(--irid) at 50% 50%,
    #ff004c, #ff8a00, #ffee00, #2eff5e, #00c8ff, #3a2eff, #b400ff, #ff004c);
  mix-blend-mode: color-dodge;
  opacity: 0.34;
  filter: blur(2px) saturate(1.3);
  animation: irid-rotate 26s linear infinite;
  will-change: background;
}
@keyframes irid-rotate { to { --irid: 360deg; } }

.wafer-reticle { position: absolute; background: var(--hairline-2); }
.wafer-reticle--h { left: -4%; right: -4%; top: 50%; height: 1px; }
.wafer-reticle--v { top: -4%; bottom: -4%; left: 50%; width: 1px; }
.wafer-dimension {
  position: absolute; left: 8%; right: 8%; bottom: -34px;
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.2em; color: var(--dim);
}
.wd-line { flex: 1; height: 1px; background: var(--hairline-2); position: relative; }
.wd-line::before, .wd-line::after {
  content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--hairline-2);
}
.wd-line::before { left: 0; } .wd-line::after { right: 0; }

.hero-copy { position: relative; max-width: 60%; z-index: 2; }
.hero-title {
  font-weight: 900; font-stretch: 122%;
  font-size: clamp(44px, 7.4vw, 118px);
  line-height: 0.96; letter-spacing: -0.02em; text-transform: uppercase;
  margin: 18px 0 30px;
}
.ht-line { display: block; overflow: hidden; }
.ht-line .reveal { display: inline-block; }
.ht-line:nth-child(2) .reveal { --d: 1; }
.ht-line:nth-child(3) .reveal { --d: 2; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(95deg, #ffd76a, #ff4fd8 45%, #b46bff 75%, #7fd4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 480px; font-weight: 350; font-size: clamp(15px, 1.3vw, 18px);
  color: var(--dim); line-height: 1.75;
}
.hero-sub.reveal { --d: 3; }
.hero-facts {
  margin-top: 38px; font-size: 10.5px; letter-spacing: 0.18em; color: var(--cyan);
}
.hero-facts.reveal { --d: 4; }
.hf-sep { color: var(--euv); margin: 0 10px; }

.descend-cue {
  position: absolute; left: 0; bottom: clamp(-70px, -6vh, -40px);
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
  transition: color 0.3s;
}
.descend-cue:hover { color: var(--cyan); }
.descend-cue svg { animation: cue-bob 2.2s var(--snap) infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ==========================================================================
   02 · THE FAB — sodium light
   ========================================================================== */
.fab {
  background:
    radial-gradient(80vw 60vh at 70% 20%, rgba(255, 191, 63, 0.10), transparent 65%),
    linear-gradient(180deg, transparent, rgba(255, 191, 63, 0.035) 40%, transparent);
}
.fab .eyebrow { color: var(--sodium); }
.fab .section-title em {
  background: linear-gradient(100deg, #ffe9a8, var(--sodium) 60%, #ff9d2e);
  -webkit-background-clip: text; background-clip: text;
}
.fab-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-areas: "wide litany" "ghost litany" "portrait litany";
  gap: clamp(18px, 2.5vw, 36px);
  align-items: start;
}
.fab-photo { position: relative; border: 1px solid var(--hairline-2); }
.fab-photo--wide { grid-area: wide; }
.fab-photo--portrait { grid-area: portrait; }
.fab-photo:not(.fab-photo--wide) { grid-area: ghost; }
.fab-photo img { width: 100%; filter: saturate(1.15) contrast(1.05); }
.fab-photo figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 10px 14px; font-size: 9px; letter-spacing: 0.18em;
  color: #ffe9b0; background: linear-gradient(0deg, rgba(10, 8, 2, 0.82), transparent);
}
.fab-litany { grid-area: litany; display: flex; flex-direction: column; }
.fl-row {
  padding: 20px 0; border-bottom: 1px solid var(--hairline);
  display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: baseline;
}
.fl-row:first-child { border-top: 1px solid var(--hairline); }
.fl-row:nth-child(1) { --d: 0; } .fl-row:nth-child(2) { --d: 1; }
.fl-row:nth-child(3) { --d: 2; } .fl-row:nth-child(4) { --d: 3; }
.fl-row:nth-child(5) { --d: 4; }
.fl-k { font-size: 10px; letter-spacing: 0.22em; color: var(--sodium); }
.fl-v { font-size: 14.5px; font-weight: 350; color: var(--dim); line-height: 1.7; }

/* ==========================================================================
   03 · NODES — the shrinking ruler
   ========================================================================== */
.nodes .eyebrow { color: var(--euv); }
.ruler-zone { position: relative; }
.ruler-sticky {
  position: sticky; top: 90px;
  padding: clamp(18px, 3vh, 34px) 0 8px;
}
.ruler-track {
  position: relative; height: 120px;
  border-top: 1px solid var(--hairline-2);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 10px;
}
.ruler-unit { font-size: 9px; letter-spacing: 0.24em; color: var(--dim); }
.ruler-tick {
  position: absolute; top: 0; width: 1px; height: 14px; background: var(--hairline-2);
}
.ruler-tick .rt-label {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--dim); white-space: nowrap;
}
.ruler-node {
  position: absolute; top: 0; bottom: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; pointer-events: auto;
  background: none; border: 0; padding: 0; color: var(--dim);
  font-family: var(--font-mono);
}
.ruler-node .rn-pip {
  width: 10px; height: 10px; margin-top: 34px; transform: rotate(45deg);
  border: 1px solid var(--cyan); background: transparent;
  transition: background 0.4s, box-shadow 0.4s, transform 0.4s var(--snap);
}
.ruler-node .rn-name {
  margin-top: 14px; font-size: 12px; letter-spacing: 0.14em;
  transition: color 0.4s;
}
.ruler-node .rn-nm { margin-top: 3px; font-size: 9px; letter-spacing: 0.1em; opacity: 0.7; }
.ruler-node.is-active { color: var(--paper); }
.ruler-node.is-active .rn-pip {
  background: var(--euv); border-color: var(--euv);
  box-shadow: 0 0 14px rgba(180, 107, 255, 0.9);
  transform: rotate(45deg) scale(1.25);
}
.ruler-needle {
  position: absolute; top: -8px; bottom: -8px; left: 0; width: 2px;
  background: linear-gradient(180deg, var(--euv-2), var(--euv));
  box-shadow: 0 0 16px rgba(255, 79, 216, 0.55);
  transition: transform 0.9s var(--snap-hard);
  will-change: transform;
}
.ruler-needle span {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--euv-2);
}
.ruler-steps { position: relative; margin-top: -1px; }
.ruler-step { min-height: 44vh; }
.node-detail {
  display: grid; grid-template-columns: minmax(180px, 0.8fr) 1.6fr; gap: clamp(18px, 4vw, 60px);
  margin-top: clamp(24px, 4vh, 48px);
  padding: clamp(20px, 3vh, 34px) clamp(18px, 2.5vw, 34px);
  border: 1px solid var(--hairline-2);
  background: linear-gradient(120deg, rgba(180, 107, 255, 0.06), rgba(5, 8, 15, 0.5) 55%);
  min-height: 190px;
}
.nd-name {
  font-weight: 900; font-stretch: 120%; font-size: clamp(52px, 6vw, 92px);
  line-height: 1; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--paper), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 0.35s;
}
.nd-year { margin-top: 10px; font-size: 10px; letter-spacing: 0.2em; color: var(--euv); transition: opacity 0.35s; }
.nd-fact { font-size: clamp(14.5px, 1.3vw, 17px); font-weight: 350; color: var(--paper); line-height: 1.7; transition: opacity 0.35s; }
.nd-tech { margin-top: 16px; font-size: 10px; letter-spacing: 0.16em; color: var(--dim); transition: opacity 0.35s; }
.node-detail.is-swapping .nd-name,
.node-detail.is-swapping .nd-year,
.node-detail.is-swapping .nd-fact,
.node-detail.is-swapping .nd-tech { opacity: 0; }

/* ==========================================================================
   04 · PLATFORMS — exposure passes
   ========================================================================== */
.nodes-coda {
  position: relative; margin-top: clamp(40px, 7vh, 80px);
  border: 1px solid var(--hairline-2);
}
.nodes-coda img { width: 100%; max-height: 70vh; object-fit: cover; }
.nodes-coda figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 10px 14px; font-size: 9px; letter-spacing: 0.18em;
  color: #d8ecff; background: linear-gradient(0deg, rgba(2, 5, 10, 0.85), transparent);
}
.passes {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.2vw, 30px);
}
.pass {
  border: 1px solid var(--hairline-2);
  padding: clamp(22px, 2.6vw, 38px);
  background:
    linear-gradient(160deg, rgba(127, 212, 255, 0.05), transparent 45%),
    var(--ink-2);
  position: relative;
}
.pass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(180, 107, 255, 0.08) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: pass-scan 9s var(--snap) infinite;
  animation-delay: calc(var(--i) * 2.2s);
}
@keyframes pass-scan { 0%, 55% { background-position: 120% 0; } 90%, 100% { background-position: -30% 0; } }
.pass-head {
  display: flex; justify-content: space-between;
  font-size: 9.5px; letter-spacing: 0.24em; color: var(--euv);
  margin-bottom: 22px;
}
.pass h3 {
  font-weight: 800; font-stretch: 115%; font-size: clamp(20px, 1.9vw, 27px);
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 14px;
}
.pass p { font-size: 14.5px; font-weight: 350; color: var(--dim); line-height: 1.7; max-width: 46ch; overflow-wrap: break-word; }
.pass-art { width: 100%; margin-top: 26px; color: var(--cyan); opacity: 0.85; }
.pa-label {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.2em;
  fill: var(--dim); stroke: none;
}
.pass:nth-child(1) { --d: 0; } .pass:nth-child(2) { --d: 1; }
.pass:nth-child(3) { --d: 2; } .pass:nth-child(4) { --d: 3; }

/* ==========================================================================
   05 · ECOSYSTEM
   ========================================================================== */
.eco-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  grid-template-areas: "photo manifest" "wafers manifest";
  gap: clamp(18px, 2.5vw, 36px);
  align-items: start;
}
.eco-photo { position: relative; border: 1px solid var(--hairline-2); }
.eco-photo img { width: 100%; }
.eco-photo--wafers { grid-area: wafers; }
.eco-photo:not(.eco-photo--wafers) { grid-area: photo; }
.eco-photo figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 10px 14px; font-size: 9px; letter-spacing: 0.18em;
  color: #d8ecff; background: linear-gradient(0deg, rgba(2, 5, 10, 0.85), transparent);
}
.eco-manifest { grid-area: manifest; display: flex; flex-direction: column; }
.em-row {
  padding: 18px 0; border-bottom: 1px solid var(--hairline);
  display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: baseline;
}
.em-row:first-child { border-top: 1px solid var(--hairline); }
.em-row:nth-child(1) { --d: 0; } .em-row:nth-child(2) { --d: 1; }
.em-row:nth-child(3) { --d: 2; } .em-row:nth-child(4) { --d: 3; }
.em-row:nth-child(5) { --d: 4; } .em-row:nth-child(6) { --d: 5; }
.em-k { font-size: 10.5px; letter-spacing: 0.2em; color: var(--cyan); }
.em-row .fl-v, .em-row span:last-child { font-size: 14.5px; font-weight: 350; color: var(--dim); line-height: 1.7; }

/* ==========================================================================
   06 · THE ISLAND
   ========================================================================== */
.island .eyebrow { color: var(--tsmc-red); }
.island .section-title em {
  background: linear-gradient(100deg, #ffb3b3, var(--tsmc-red) 55%, #ff7a5c);
  -webkit-background-clip: text; background-clip: text;
}
.island-hero {
  position: relative; border: 1px solid var(--hairline-2); margin-bottom: clamp(40px, 7vh, 80px);
}
.island-hero img { width: 100%; max-height: 74vh; object-fit: cover; object-position: center 28%; }
.island-hero figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 12px 16px; font-size: 9px; letter-spacing: 0.18em;
  color: #ffd9a8; background: linear-gradient(0deg, rgba(2, 4, 8, 0.85), transparent);
}
.island-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 70px);
  align-items: start;
}
.island-story p {
  font-size: clamp(15px, 1.3vw, 17.5px); font-weight: 350; color: var(--dim);
  line-height: 1.8; margin-bottom: 22px;
}
.island-story p:first-child {
  border-left: 2px solid var(--tsmc-red); padding-left: 18px;
}
.island-stats { display: flex; flex-direction: column; border-top: 1px solid var(--hairline-2); }
.stat {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--hairline);
}
.stat:nth-child(1) { --d: 0; } .stat:nth-child(2) { --d: 1; } .stat:nth-child(3) { --d: 2; }
.stat-n { font-size: 15px; font-weight: 600; letter-spacing: 0.12em; color: var(--sodium); }
.stat-l { font-size: 13.5px; font-weight: 350; color: var(--dim); }

.lattice-coda {
  margin-top: clamp(60px, 10vh, 110px);
  padding: clamp(30px, 5vh, 60px) clamp(24px, 4vw, 60px);
  border: 1px solid var(--hairline-2);
  text-align: center;
  background:
    radial-gradient(50% 120% at 50% 0%, rgba(180, 107, 255, 0.12), transparent 70%),
    var(--ink-2);
}
.lc-k { font-size: 10px; letter-spacing: 0.34em; color: var(--euv); margin-bottom: 18px; }
.lc-v {
  max-width: 700px; margin: 0 auto;
  font-size: clamp(16px, 1.6vw, 21px); font-weight: 350; color: var(--paper); line-height: 1.75;
}
.lc-v strong {
  font-weight: 800; background: linear-gradient(100deg, var(--cyan), var(--euv));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative; z-index: 1;
  padding: clamp(50px, 9vh, 100px) clamp(24px, 6vw, 96px);
  padding-left: calc(var(--meter-w) + clamp(24px, 5vw, 80px));
}
.footer-top { display: flex; align-items: center; gap: 20px; margin-bottom: 34px; }
.footer-mark { width: 52px; height: 52px; border-radius: 8px; background: rgba(255,255,255,0.92); padding: 5px; }
.footer-tag {
  font-weight: 800; font-stretch: 118%; text-transform: uppercase;
  font-size: clamp(16px, 1.8vw, 24px); letter-spacing: 0.02em;
}
.footer-meta { font-size: 9.5px; letter-spacing: 0.14em; color: var(--dim); line-height: 2; }
.footer-meta > p { margin-bottom: 6px; }
.credits summary { cursor: pointer; color: var(--cyan); }
.credits ul { list-style: none; padding: 10px 0 4px 14px; border-left: 1px solid var(--hairline-2); margin: 8px 0 12px; }
.credits li { margin-bottom: 4px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .hero-copy { max-width: 72%; }
}

@media (max-width: 720px) {
  :root { --meter-w: 0px; }
  .scale-o-meter { display: none; }
  .som-mobile {
    display: flex; align-items: center; gap: 10px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    padding: 9px 14px;
    border: 1px solid var(--hairline-2);
    background: rgba(5, 8, 15, 0.88);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-family: var(--font-mono);
  }
  .som-mobile .som-exp { font-size: 11px; }
  .som-mobile .som-label { font-size: 8px; min-height: 0; }
  .som-track {
    position: relative; flex: 1; height: 1px; background: var(--hairline-2);
  }
  .som-dot {
    position: absolute; top: -3px; left: 0; width: 7px; height: 7px;
    background: var(--euv); transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(180, 107, 255, 0.9);
    transition: left 0.9s var(--snap-hard);
  }
  .site-header { left: 0; padding: 12px 16px; gap: 14px; }
  .header-coord { margin-left: auto; font-size: 8.5px; }
  .panel { padding-left: clamp(20px, 5vw, 28px); padding-right: clamp(20px, 5vw, 28px); }
  .hero { min-height: 92svh; padding-top: 96px; }
  .hero-wafer-wrap {
    position: relative; top: auto; right: auto; transform: none;
    width: min(88vw, 460px); margin: 0 auto 46px;
  }
  .hero-copy { max-width: 100%; }
  .hero-title { font-size: clamp(32px, 10.2vw, 56px); }
  .ht-line .reveal { max-width: 100%; }
  .section-title { font-size: clamp(23px, 7.2vw, 40px); }
  .descend-cue { position: static; margin-top: 44px; }
  .hero-facts { line-height: 2.2; }
  .fab-grid { grid-template-columns: 1fr; grid-template-areas: "wide" "portrait" "ghost" "litany"; }
  .eco-grid { grid-template-columns: 1fr; grid-template-areas: "photo" "manifest" "wafers"; }
  .island-grid { grid-template-columns: 1fr; }
  .passes { grid-template-columns: 1fr; }
  .node-detail { grid-template-columns: 1fr; min-height: 0; gap: 14px; }
  .ruler-sticky { top: 64px; background: linear-gradient(180deg, var(--ink) 78%, transparent); }
  .ruler-step { min-height: 40vh; }
  .ruler-track { height: 132px; }
  .ruler-tick .rt-label { display: none; }
  .ruler-node .rn-nm { display: none; }
  .ruler-node .rn-pip { margin-top: 56px; }
  .ruler-node .rn-name {
    position: absolute; top: 78px; left: 50%; transform: translateX(-50%);
    margin-top: 0; font-size: 10px;
  }
  .ruler-node.rn--up .rn-name { top: 30px; }
  .em-row { grid-template-columns: 1fr; gap: 6px; }
  .fl-row { grid-template-columns: 1fr; gap: 6px; }
  .stat { grid-template-columns: 96px 1fr; }
  .site-footer { padding-left: clamp(20px, 5vw, 28px); padding-bottom: 90px; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .expose { clip-path: none; }
  .wafer-iridescence { animation: none; }
  .descend-cue svg { animation: none; }
  .pass::after { animation: none; }
}
