/* SeoRank — The Engine
   Cinematic premium sci-fi · single canvas + scroll-driven scenes */

:root {
  --bg: #000000;
  --fg: #f3f6fb;
  --muted: oklch(72% 0.01 230);
  --dim: oklch(48% 0.012 230);
  --line: oklch(28% 0.015 230 / 0.7);
  --line-soft: oklch(50% 0.02 230 / 0.18);
  --core: oklch(82% 0.13 220);
  --core-deep: oklch(55% 0.18 245);
  --amber: oklch(78% 0.17 60);
  --crimson: oklch(62% 0.22 25);
  --grad-core: radial-gradient(circle at 50% 50%, oklch(82% 0.13 220 / 0.85), oklch(55% 0.18 245 / 0) 70%);
  --pad: clamp(20px, 4vw, 64px);
  --space: clamp(16px, 2vw, 28px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); }
html { scroll-behavior: auto; }
body {
  font-family: "Onest", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Custom cursor — energy dot */
.cursor, .cursor-trail {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  will-change: transform;
}
.cursor {
  width: 6px; height: 6px;
  background: oklch(95% 0.05 220);
  border-radius: 50%;
  box-shadow: 0 0 12px oklch(82% 0.13 220), 0 0 24px oklch(82% 0.13 220 / 0.6);
  transform: translate(-50%, -50%);
}
.cursor-trail {
  width: 36px; height: 36px;
  border: 1px solid oklch(82% 0.13 220 / 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, border-color .25s;
}
.cursor-trail.hot {
  width: 64px; height: 64px;
  border-color: oklch(82% 0.13 220 / 0.8);
}
@media (pointer: coarse) { .cursor, .cursor-trail { display: none; } body { cursor: auto; } }

/* ===== CANVAS ===== */
#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: #000;
}
/* Atmospheric overlay — vignette + scanlines */
#atmosphere {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 40%, #000 100%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,0.012) 2px 3px);
  mix-blend-mode: normal;
}
#noise {
  position: fixed; inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.95 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  animation: noiseShift 1.2s steps(6) infinite;
}
@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(-3%, 1%); }
  33%  { transform: translate(2%, -2%); }
  50%  { transform: translate(-1%, 3%); }
  66%  { transform: translate(3%, 0); }
  83%  { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ===== HUD CHROME ===== */
.hud { display: none; }
.hud .row { display: flex; gap: 12px; align-items: center; }
.hud .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(82% 0.13 220);
  box-shadow: 0 0 8px oklch(82% 0.13 220);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hud .frame {
  border: 1px solid var(--line);
  padding: 6px 10px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}
.hud .stack { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.hud .num { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Top nav */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
  /* DARK OPAQUE STRIP — full width on ALL screen sizes */
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(82% 0.13 220 / 0.15);
}
body.ready .topnav { opacity: 1; pointer-events: auto; }
.topnav .brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.18em; font-weight: 500;
  white-space: nowrap;
}
.topnav .brand span:last-child { white-space: nowrap; }
.topnav .brand .glyph {
  width: 22px; height: 22px;
  position: relative;
}
.topnav .brand .glyph::before, .topnav .brand .glyph::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid var(--fg);
  border-radius: 50%;
}
.topnav .brand .glyph::after {
  inset: 4px;
  background: var(--fg);
  box-shadow: 0 0 12px oklch(82% 0.13 220);
}
.topnav nav {
  display: flex; gap: 28px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.topnav nav a { transition: color .2s; }
.topnav nav a:hover { color: var(--fg); }
.topnav .cta-mini {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  transition: all .25s;
}
.topnav .cta-mini:hover {
  border-color: var(--fg);
  background: oklch(82% 0.13 220 / 0.1);
}

/* Section progress */
.progress {
  position: fixed;
  top: 50%; right: var(--pad);
  transform: translateY(-50%);
  z-index: 50;
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0;
  transition: opacity .8s ease;
}
body.ready .progress { opacity: 1; }
.progress .tick {
  display: flex; align-items: center; gap: 10px;
  font-size: 9px; letter-spacing: 0.18em; color: var(--dim);
  text-transform: uppercase;
}
.progress .tick .bar {
  width: 24px; height: 1px; background: var(--line);
  transition: all .4s;
}
.progress .tick.active { color: var(--fg); }
.progress .tick.active .bar {
  width: 48px;
  background: oklch(82% 0.13 220);
  box-shadow: 0 0 8px oklch(82% 0.13 220);
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0;
  z-index: 200;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
}
#preloader .scanline {
  width: min(560px, 60vw); height: 1px;
  background: linear-gradient(90deg, transparent, oklch(82% 0.13 220), transparent);
  position: relative;
  overflow: visible;
}
#preloader .scanline::before {
  content: ""; position: absolute;
  inset: -1px 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  filter: blur(2px);
  animation: scan 1.8s ease-in-out infinite;
}
@keyframes scan {
  0% { transform: translateX(-100%) scaleX(0.4); opacity: 0; }
  50% { transform: translateX(0) scaleX(1); opacity: 1; }
  100% { transform: translateX(100%) scaleX(0.4); opacity: 0; }
}
#preloader .status {
  font-size: 12px; letter-spacing: 0.4em; color: var(--muted);
  text-transform: uppercase;
  display: flex; gap: 18px; align-items: center;
}
#preloader .status .dot {
  width: 6px; height: 6px; background: oklch(82% 0.13 220);
  box-shadow: 0 0 12px oklch(82% 0.13 220);
  animation: pulse 1s ease-in-out infinite;
}
#preloader .pct {
  font-size: 10px; color: var(--dim); letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
#preloader.gone {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}
#preloader .acquired {
  position: absolute;
  font-size: clamp(36px, 7vw, 84px);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fff;
  opacity: 0;
  text-shadow: 0 0 24px oklch(82% 0.13 220), 0 0 60px oklch(55% 0.18 245);
}
#preloader.glitch .acquired {
  opacity: 1;
  animation: glitch .3s steps(3) 2;
}
@keyframes glitch {
  0% { transform: translate(0,0); }
  20% { transform: translate(-4px, 2px); filter: hue-rotate(20deg); }
  40% { transform: translate(3px, -2px); filter: hue-rotate(-15deg); }
  60% { transform: translate(-2px, 1px); }
  100% { transform: translate(0,0); }
}

/* ===== CONTENT WRAPPER ===== */
main {
  position: relative;
  z-index: 10;
  width: 100%;
}
section.scene {
  position: relative;
  min-height: 130vh;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
}
section.scene#hero {
  align-items: flex-start;
  padding: 0;
}

/* Type system */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .line { width: 32px; height: 1px; background: var(--core); box-shadow: 0 0 6px var(--core); }
.eyebrow .num { color: var(--core); font-weight: 500; }

h1.display {
  font-size: clamp(40px, 7vw, 120px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2.huge {
  font-size: clamp(32px, 4.4vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h2.huge em {
  font-style: normal;
  background: linear-gradient(180deg, oklch(95% 0.05 220), oklch(75% 0.15 220) 60%, oklch(55% 0.18 245));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px oklch(55% 0.18 245 / 0.5));
}
.lede {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ===== SCENE 1 — HERO / ENGINE ===== */
#hero { min-height: 200vh; }
.hero-wrap {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 0 var(--pad);
}
.hero-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-top: 100px;
}
.hero-mid {
  text-align: center;
  padding: 12px 0;
  align-self: center;
}
.hero-bot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding-bottom: 48px;
}
.hero-bot .hero-meta:last-child {
  justify-self: end;
  text-align: right;
  align-items: flex-end;
}
.hero-meta {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-meta .v { color: var(--fg); font-size: 13px; letter-spacing: 0.15em; }
.scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 9px; letter-spacing: 0.3em; color: var(--dim); text-transform: uppercase;
  justify-self: center;
}
.scroll-hint .pipe {
  width: 1px; height: 60px;
  background: linear-gradient(180deg, transparent, var(--core), transparent);
  position: relative; overflow: hidden;
}
.scroll-hint .pipe::after {
  content: ""; position: absolute; left: 0; right: 0; top: -20%;
  height: 30%; background: var(--fg);
  animation: scrollPipe 2.2s ease-in-out infinite;
}
@keyframes scrollPipe { 0% { top: -30%; } 100% { top: 130%; } }

h1.display.hero-tagline {
  font-size: clamp(28px, 4.6vw, 76px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-tagline .l1 { display: block; color: oklch(75% 0.02 230); }
.hero-tagline .l2 {
  display: block;
  background: linear-gradient(180deg, #fff, oklch(82% 0.13 220) 60%, oklch(55% 0.18 245));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px oklch(82% 0.13 220 / 0.5));
}
.brand-mark {
  display: none !important;  /* Logo is in topnav — no need for duplicate in hero */
}
.brand-mark .o {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 18px oklch(82% 0.13 220), 0 0 36px oklch(55% 0.18 245);
}

/* Floating side-meta around hero */
.floating-meta {
  position: absolute;
  font-size: 10px; letter-spacing: 0.2em; color: var(--muted);
  text-transform: uppercase;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 1px solid var(--line-soft);
  padding-left: 14px;
}
.floating-meta .b { color: var(--fg); font-size: 11px; }
.floating-meta.fm-1 { top: 24%; left: 6%; }
.floating-meta.fm-2 { top: 28%; right: 6%; text-align: right; border-left: 0; border-right: 1px solid var(--line-soft); padding-left: 0; padding-right: 14px; align-items: flex-end; }
.floating-meta.fm-3 { bottom: 28%; left: 8%; }
.floating-meta.fm-4 { bottom: 30%; right: 8%; text-align: right; border-left: 0; border-right: 1px solid var(--line-soft); padding-left: 0; padding-right: 14px; align-items: flex-end; }

/* ===== SCENE TEXT COLUMNS ===== */
.scene-content {
  position: sticky; top: 0;
  height: 100vh;
  width: 100%;
  display: flex; align-items: center;
}
.col {
  max-width: 560px;
}
.col.right { margin-left: auto; }
.col h2 { margin-bottom: 24px; margin-top: 18px; }
.col .lede { margin-bottom: 32px; }
.col .eyebrow { margin-bottom: 6px; }

/* Metric cluster */
.metrics {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 24px;
}
.metric {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.metric .ix {
  font-size: 9px; color: var(--dim); letter-spacing: 0.2em;
}
.metric .label {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.metric .val {
  font-size: clamp(20px, 2vw, 28px);
  color: var(--fg);
  font-weight: 400;
}
.metric .val .up {
  display: inline-block; margin-left: 6px;
  color: oklch(78% 0.16 145);
  font-size: 0.7em;
}
.metric .val .amber { color: var(--amber); }

/* ===== SCENE 4 — META MIND (audiences) ===== */
.tags-cluster {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 24px;
  max-width: 620px;
}
.tags-cluster .tag {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  color: var(--muted);
}
.tags-cluster .tag.hot {
  border-color: oklch(82% 0.13 220);
  color: #fff;
  background: oklch(82% 0.13 220 / 0.15);
  box-shadow: inset 0 0 24px oklch(82% 0.13 220 / 0.2), 0 0 16px oklch(82% 0.13 220 / 0.3);
}
.tags-cluster .tag.amber {
  border-color: var(--amber);
  color: #fff;
  background: oklch(78% 0.17 60 / 0.12);
  box-shadow: inset 0 0 18px oklch(78% 0.17 60 / 0.2), 0 0 14px oklch(78% 0.17 60 / 0.25);
}

/* ===== SCENE 5 — FACTORY (build list) ===== */
.build-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 560px;
  margin-top: 24px;
}
.build-grid .cell {
  background: rgba(0,0,0,0.7);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(6px);
}
.build-grid .cell .k {
  font-size: 9px; letter-spacing: 0.22em; color: var(--dim); text-transform: uppercase;
}
.build-grid .cell .v {
  font-size: 14px; color: var(--fg);
  letter-spacing: -0.005em;
}

/* ===== SCENE 6 — OBSERVATORY (planet stats) ===== */
.observatory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 32px;
  max-width: 720px;
}
.observatory-stats .stat {
  background: rgba(0,0,0,0.7);
  padding: 22px 20px;
  backdrop-filter: blur(6px);
}
.observatory-stats .stat .label {
  font-size: 9px; letter-spacing: 0.22em; color: var(--dim); text-transform: uppercase;
  margin-bottom: 10px;
}
.observatory-stats .stat .big {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.observatory-stats .stat .sub {
  font-size: 11px; color: var(--muted); margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ===== ASCENSION / CTA ===== */
#ascension {
  min-height: 130vh;
  padding-top: 20vh;
  padding-bottom: 18vh;
  position: relative;
}
/* Strong radial dark veil behind all ascension text */
#ascension::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%,
      rgba(0,0,0,0.82) 0%,
      rgba(0,0,0,0.60) 45%,
      rgba(0,0,0,0.10) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}
@media (max-width: 800px) {
  #ascension::before {
    opacity: 0.1;
  }
}
.ascension-wrap {
  width: 100%;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 44px;
  position: relative;
  z-index: 1;
}
.ascension-wrap h2 {
  font-size: clamp(36px, 5.5vw, 88px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 14ch;
}
.ascension-wrap h2 em {
  font-style: normal;
  background: linear-gradient(180deg, #fff, oklch(82% 0.13 220), oklch(55% 0.18 245));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px oklch(55% 0.18 245 / 0.5));
}
.ascension-wrap .sigline {
  font-size: 13px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--core);
  text-shadow: 0 0 12px var(--core);
}

/* ===== CTA BUTTON ===== */
.cta-button {
  position: relative;
  display: inline-flex; align-items: center; gap: 18px;
  padding: 24px 46px;
  border: 1px solid oklch(82% 0.13 220);
  border-radius: 999px;
  color: #fff;
  font-size: 14px; letter-spacing: 0.32em; text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  overflow: hidden;
  isolation: isolate;
  transition: all .4s cubic-bezier(0.6, 0, 0.3, 1);
  box-shadow:
    inset 0 0 32px oklch(82% 0.13 220 / 0.25),
    0 0 40px oklch(82% 0.13 220 / 0.35),
    0 0 80px oklch(55% 0.18 245 / 0.25);
}
.cta-button .glow {
  position: absolute; inset: 0;
  background: radial-gradient(60% 80% at var(--mx, 50%) var(--my, 50%),
    oklch(82% 0.13 220 / 0.5), transparent 70%);
  opacity: 0;
  transition: opacity .25s;
  z-index: -1;
}
.cta-button .arc {
  position: absolute; inset: 0;
  background:
    conic-gradient(from var(--rot, 0deg) at 50% 50%,
      transparent 0deg, oklch(82% 0.13 220 / 0.55) 60deg,
      transparent 120deg, transparent 360deg);
  opacity: 0.5;
  z-index: -1;
  filter: blur(1px);
}
.cta-button:hover {
  border-color: #fff;
  box-shadow:
    inset 0 0 48px oklch(82% 0.13 220 / 0.5),
    0 0 80px oklch(82% 0.13 220 / 0.6),
    0 0 160px oklch(55% 0.18 245 / 0.5);
  letter-spacing: 0.4em;
}
.cta-button:hover .glow { opacity: 1; }
.cta-button .arrow {
  width: 24px; height: 1px; background: #fff;
  position: relative;
}
.cta-button .arrow::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid #fff; border-right: 1px solid #fff;
  transform: rotate(45deg);
}

/* Contact micro */
.contact-micro {
  display: flex; gap: 32px; flex-wrap: wrap; justify-content: center;
  font-size: 11px; letter-spacing: 0.18em; color: var(--muted);
  text-transform: uppercase;
}
.contact-micro a { transition: color .2s; }
.contact-micro a:hover { color: #fff; }

/* Footer */
footer.engine-footer {
  position: relative; z-index: 10;
  padding: 80px var(--pad) 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, #000);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  font-size: 12px;
  letter-spacing: 0.05em;
}
footer.engine-footer h4 {
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
  text-transform: uppercase; margin-bottom: 16px; font-weight: 500;
}
footer.engine-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
footer.engine-footer ul a { color: var(--muted); transition: color .2s; }
footer.engine-footer ul a:hover { color: #fff; }
footer.engine-footer .lockup {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 360px;
}
footer.engine-footer .lockup .sig {
  font-size: 18px; letter-spacing: 0.22em; font-weight: 500;
  display: flex; align-items: center; gap: 14px;
}
footer.engine-footer .lockup .sig .o {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px oklch(82% 0.13 220);
}
footer.engine-footer .lockup p {
  color: var(--muted); line-height: 1.5;
}
footer.engine-footer .meta-row {
  grid-column: 1 / -1;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 0.25em; color: var(--dim);
  text-transform: uppercase;
}

/* Floating section labels — alphanum codes */
.scene-code {
  position: absolute;
  top: 80px; left: var(--pad);
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
  z-index: 5;
}
.scene-code .num { color: var(--core); }
.scene-code .bar { width: 30px; height: 1px; background: var(--line); }
.scene-code.right { left: auto; right: var(--pad); }

/* Smaller screens */
/* ===== PORTFOLIO CASE STRIP ===== */
.cases {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  max-width: 620px;
}
.cases.right { margin-left: auto; }
.case {
  display: grid;
  grid-template-columns: 64px 1fr 112px;  /* fixed metric column — never overflows */
  gap: 18px;
  align-items: center;
  padding: 14px 18px 14px 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  text-align: left;
  transition: all .3s cubic-bezier(0.6,0,0.3,1);
  cursor: pointer;
  position: relative;
  overflow: visible;  /* don't clip metric — use clip-path on hover pseudo instead */
}
.case:hover {
  border-color: var(--core);
  background: oklch(82% 0.13 220 / 0.08);
  transform: translateX(4px);
  box-shadow: inset 0 0 30px oklch(82% 0.13 220 / 0.12), 0 0 24px oklch(82% 0.13 220 / 0.2);
}
.case .thumb {
  width: 64px; height: 64px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, oklch(82% 0.13 220 / 0.6), oklch(55% 0.18 245 / 0.4)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 4px, transparent 4px 8px);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  font-weight: 500;
  box-shadow: inset 0 0 12px oklch(55% 0.18 245 / 0.4);
}
.case .thumb.amber {
  background:
    linear-gradient(135deg, oklch(78% 0.17 60 / 0.6), oklch(62% 0.22 25 / 0.4)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 4px, transparent 4px 8px);
  box-shadow: inset 0 0 12px oklch(62% 0.22 25 / 0.4);
}
.case .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.case .info .label {
  font-size: 9px; letter-spacing: 0.22em; color: var(--dim);
  text-transform: uppercase;
}
.case .info .name {
  font-size: 17px; color: var(--fg); font-weight: 500;
  letter-spacing: -0.005em;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}
.case .info .desc {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.02em;
}
.case .metric {
  font-size: 16px;
  font-weight: 400;
  color: var(--core);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 0 12px oklch(82% 0.13 220 / 0.6);
  width: 112px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.case .metric.amber {
  color: var(--amber);
  text-shadow: 0 0 12px oklch(78% 0.17 60 / 0.6);
}
.cases-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 36px; margin-bottom: 12px;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--dim);
}
.cases-head .ln {
  flex: 1; height: 1px; background: var(--line); margin: 0 14px;
}
.cases-head a { color: var(--core); transition: color .2s; }
.cases-head a:hover { color: #fff; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(14px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s cubic-bezier(0.6,0,0.3,1);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.modal-card {
  width: min(560px, 100%);
  background:
    linear-gradient(180deg, oklch(15% 0.02 230 / 0.92), oklch(8% 0.015 230 / 0.95));
  border: 1px solid oklch(82% 0.13 220 / 0.35);
  backdrop-filter: blur(20px);
  padding: 48px 40px 40px;
  position: relative;
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: all .6s cubic-bezier(0.6,0,0.3,1);
  pointer-events: none;  /* closed: never block clicks */
  box-shadow:
    0 0 60px oklch(82% 0.13 220 / 0.25),
    0 0 160px oklch(55% 0.18 245 / 0.2),
    inset 0 0 40px oklch(82% 0.13 220 / 0.05);
}
.modal-backdrop.open + .modal .modal-card {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.modal-card::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, oklch(82% 0.13 220), transparent);
}
.modal-card .corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--core);
  opacity: 0.6;
}
.modal-card .corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.modal-card .corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.modal-card .corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.modal-card .corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  transition: all .25s;
}
.modal-close:hover {
  border-color: var(--fg);
  color: #fff;
  transform: rotate(90deg);
}
.modal-card .eyebrow { margin-bottom: 18px; }
.modal-card h3 {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff, oklch(82% 0.13 220));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-card .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.field {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 10px; letter-spacing: 0.22em; color: var(--dim);
  text-transform: uppercase;
}
.field input, .field textarea {
  font: inherit;
  color: var(--fg);
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 14px;
  transition: all .25s;
  resize: none;
  font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--core);
  background: oklch(82% 0.13 220 / 0.05);
  box-shadow: 0 0 0 1px oklch(82% 0.13 220 / 0.3), inset 0 0 20px oklch(82% 0.13 220 / 0.06);
}
.field textarea { min-height: 84px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-contacts {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  justify-content: center;
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--muted);
}
.modal-contacts a {
  color: var(--dim);
  transition: color .2s;
  white-space: nowrap;
}
.modal-contacts a:hover { color: var(--core); }
.modal-contacts a span {
  font-size: 9px; letter-spacing: 0.18em;
  color: var(--dim); margin-left: 3px;
}
.modal-contacts-sep { color: var(--line); }

.modal-submit {
  margin-top: 8px;
  padding: 18px 28px;
  border: 1px solid var(--core);
  background: oklch(82% 0.13 220 / 0.1);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .3s;
  box-shadow: inset 0 0 24px oklch(82% 0.13 220 / 0.2), 0 0 24px oklch(82% 0.13 220 / 0.2);
}
.modal-submit:hover {
  background: oklch(82% 0.13 220 / 0.2);
  border-color: #fff;
  box-shadow: inset 0 0 32px oklch(82% 0.13 220 / 0.35), 0 0 48px oklch(82% 0.13 220 / 0.5);
}
.modal-success {
  text-align: center;
  padding: 24px 0;
  display: none;
}
.modal-success.show { display: block; }
.modal-success .check {
  width: 56px; height: 56px;
  border: 2px solid var(--core);
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 32px oklch(82% 0.13 220 / 0.6);
  position: relative;
}
.modal-success .check::after {
  content: ""; width: 18px; height: 9px;
  border-left: 2px solid var(--core); border-bottom: 2px solid var(--core);
  transform: rotate(-45deg) translateY(-2px);
}
.modal-success h4 {
  font-size: 22px; font-weight: 400; margin-bottom: 8px;
}
.modal-success p { color: var(--muted); font-size: 14px; }

/* Nav strip — full-width dark backdrop behind topnav (always present, visible on mobile) */
.nav-strip {
  display: none; /* shown only on mobile via media query */
}

/* Fix case name overflow on any viewport */
.case .info .name {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

/* ===== TEXT READABILITY — glass backdrop behind content columns ===== */
.col {
  position: relative;
}
.col::before {
  content: '';
  position: absolute;
  inset: -28px -36px;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    transparent 100%
  );
  border-radius: 4px;
  pointer-events: none;
  z-index: -1;
}

/* Metric rows — elevated contrast */
.metric {
  border-top-color: oklch(38% 0.015 230 / 0.9);
}
.metric .val {
  text-shadow: 0 0 20px rgba(0,0,0,0.9);
}
h2.huge, .lede, .eyebrow {
  text-shadow: 0 2px 24px rgba(0,0,0,0.8);
}

/* Tags cluster glass */
.tags-cluster .tag {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Build grid and observatory stats */
.build-grid .cell,
.observatory-stats .stat {
  background: rgba(0, 0, 0, 0.80);
}

/* ===== CASE DETAIL MODAL ===== */
.case-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(18px);
  z-index: 1050;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.case-modal-backdrop.open { opacity: 1; pointer-events: auto; }

.case-modal {
  position: fixed; inset: 0;
  z-index: 1051;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0 24px 24px;
  pointer-events: none;
  overflow-y: auto;
}
.case-modal-card {
  width: min(820px, 100%);
  max-height: none;
  overflow-y: visible;
  background: linear-gradient(180deg, oklch(13% 0.025 230 / 0.97), oklch(8% 0.015 230 / 0.99));
  border: 1px solid oklch(82% 0.13 220 / 0.3);
  backdrop-filter: blur(24px);
  padding: 0;
  position: relative;
  opacity: 0;
  transform: scale(0.93) translateY(24px);
  transition: all .5s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;  /* closed: never block clicks */
  box-shadow: 0 0 80px oklch(82% 0.13 220 / 0.2), 0 40px 120px rgba(0,0,0,0.6);
  border-radius: 2px;
}
.case-modal-backdrop.open + .case-modal .case-modal-card {
  opacity: 1; transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Case modal hero banner */
.cm-hero {
  width: 100%;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start;
  padding: 24px 36px;
  box-sizing: border-box;
}
.cm-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cm-c1, oklch(55% 0.18 230)), var(--cm-c2, oklch(35% 0.12 250)));
}
.cm-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 4px, transparent 4px 12px),
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.65));
}
.cm-hero-badge {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 700; letter-spacing: 0.25em;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  padding: 8px 16px; border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.2);
}
.cm-hero-metric { display: none; }

/* Case modal body */
.cm-body { padding: 32px 36px 36px; }
.cm-label {
  font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 8px;
}
.cm-title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 300;
  letter-spacing: -0.01em; color: var(--fg);
  margin-bottom: 16px;
}
.cm-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.cm-tag {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid oklch(82% 0.13 220 / 0.3);
  color: var(--core); padding: 5px 12px; border-radius: 999px;
}
.cm-desc {
  font-size: 15px; color: var(--muted); line-height: 1.7;
  margin-bottom: 28px; max-width: 60ch;
}
.cm-results {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 28px;
}
.cm-result {
  border: 1px solid oklch(82% 0.13 220 / 0.2);
  padding: 16px 20px;
  background: oklch(82% 0.13 220 / 0.04);
}
.cm-result .r-val {
  font-size: 22px; font-weight: 300; color: var(--core);
  letter-spacing: -0.01em; display: block; margin-bottom: 4px;
}
.cm-result .r-label {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.75);
}
.cm-screenshots {
  display: flex; flex-direction: column;
  gap: 16px; margin-bottom: 28px;
}
.cm-screen-full { width: 100%; }
.cm-screen-full img:hover { opacity: 0.9; transition: opacity 0.2s; }
.cm-screen {
  height: 120px; border-radius: 2px; overflow: hidden; position: relative;
}
.cm-screen-inner {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cm-c1, oklch(55% 0.18 230)), var(--cm-c2, oklch(35% 0.12 250)));
  opacity: 0.4;
}
.cm-screen::after {
  content: attr(data-label);
  position: absolute; bottom: 10px; left: 14px;
  font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.5);
}
.cm-cta {
  display: flex; gap: 14px; align-items: center;
}
.cm-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px;
  border: 1px solid oklch(82% 0.13 220 / 0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--dim);
  transition: all .2s; background: rgba(0,0,0,0.3);
  z-index: 10;
}
.cm-close:hover { border-color: var(--fg); color: var(--fg); }

@media (max-width: 600px) {
  .case-modal { padding: 0; align-items: flex-end; }
  .case-modal-card { width: 100vw; border-radius: 14px 14px 0 0; max-height: 96dvh; }
  .cm-body { padding: 22px 18px 28px; }
  .cm-hero { height: 160px; padding: 20px 18px; }
  .cm-hero-metric { font-size: 32px; top: 20px; right: 18px; }
  .cm-results { grid-template-columns: 1fr; }
  .cm-screenshots { grid-template-columns: 1fr; }
}

/* Bombastic energy ring on CTA click */
.energy-burst {
  position: fixed;
  border-radius: 50%;
  border: 1.5px solid oklch(82% 0.13 220 / 0.7);
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 0 20px oklch(82% 0.13 220 / 0.4), inset 0 0 20px oklch(82% 0.13 220 / 0.2);
}

/* ===== SMALL LANDSCAPE ===== */
@media (max-height: 720px) {
  .hero-top { padding-top: 64px; }
  .hero-bot { padding-bottom: 32px; }
  .hero-mid { padding: 8px 0; }
  .brand-mark { margin-bottom: 18px !important; font-size: 14px; }
  h1.display.hero-tagline { font-size: clamp(22px, 3.6vw, 48px); }
  .hero-mid .lede { font-size: 13px; }
  .floating-meta { display: none; }
  .hero-wrap .reveal-hero[style*="max-width"] { max-width: 46ch !important; }
}

/* ===== MOBILE ===== */
@media (max-width: 800px) {

  /* --- Atmosphere: lighter vignette so globe is clearly visible --- */
  #atmosphere {
    background:
      radial-gradient(140% 70% at 50% 50%, transparent 55%, rgba(0,0,0,0.75) 100%),
      repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,0.008) 2px 3px);
  }

  /* ================================================================
     TOPNAV — dark full-width strip + bigger logo + bigger button
     ================================================================ */
  .topnav {
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
    overflow: visible;
    /* DARK OPAQUE STRIP — full width, no transparency */
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid oklch(82% 0.13 220 / 0.18);
  }

  /* nav-strip div not needed — background is on header directly */
  .nav-strip { display: none; }

  /* Brand: bigger */
  .topnav .brand {
    position: relative;
    z-index: 1;
    font-size: 13px;
    letter-spacing: 0.2em;
    font-weight: 600;
    padding: 15px 16px;
    flex-shrink: 0;
    gap: 9px;
  }
  .topnav .brand .glyph {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  /* Hide desktop nav links */
  .topnav nav { display: none; }

  /* CTA button */
  .topnav .cta-mini {
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 10px 16px;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0 14px 0 auto;
    border-color: oklch(82% 0.13 220 / 0.7);
    background: oklch(82% 0.13 220 / 0.12);
    box-shadow: 0 0 12px oklch(82% 0.13 220 / 0.2);
  }

  /* --- Progress, meta: hide on mobile --- */
  .progress { display: none; }
  .floating-meta { display: none; }

  /* ================================================================
     HERO LAYOUT — mobile
     ================================================================ */
  /* Hero: normal flow, full height, flex column */
  .hero-wrap {
    position: relative;
    height: auto;
    min-height: 100svh;
    padding: 68px 16px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
  }
  .hero-top,
  .hero-bot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .hero-top { padding-top: 0; }
  .hero-bot { padding-bottom: 0; }
  /* Reset inline right-align on hero-meta elements */
  .hero-top .hero-meta,
  .hero-bot .hero-meta {
    text-align: center !important;
    align-items: center !important;
    width: 100%;
  }
  /* Scroll-hint: centered in column flow */
  .hero-bot .scroll-hint {
    position: static;
    transform: none;
    order: -1; /* show scroll hint first on mobile */
  }
  .hero-mid {
    position: relative;
    padding: 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .hero-mid::before {
    display: none;
  }
  h1.display.hero-tagline {
    font-size: clamp(26px, 8vw, 50px);
    letter-spacing: -0.015em;
    text-align: center;
  }
  .hero-mid .lede {
    font-size: clamp(13px, 3.6vw, 16px);
    max-width: 100%;
    text-align: center;
  }
  /* Scroll hint — centered under hero text, shorter */
  .scroll-hint {
    align-self: center;
    margin: 0 auto;
    opacity: 0.65;
  }
  .scroll-hint .pipe { height: 34px; }

  /* ================================================================
     SCENE SECTIONS — static flow on mobile, no sticky overlap
     ================================================================ */
  section.scene {
    padding: 56px 16px 48px;
    min-height: unset;
    overflow-x: hidden;
    box-sizing: border-box;
    background: none;  /* no full-section darkening — animation shows in empty space */
  }
  section.scene#hero {
    min-height: 100svh;
    padding: 0;
    background: none;
  }
  /* Only darken the actual content box */
  .scene-content {
    position: relative;
    top: unset;
    height: auto;
    min-height: unset;
    align-items: flex-start;
    padding: 20px 16px;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    /* Dark backdrop ONLY on content box — animation visible in empty space */
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
  }
  /* Sigline — padding on mobile so it doesn't touch edges */
  .ascension-wrap .sigline {
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .scene-code { display: none; }
  .col,
  .col.right {
    max-width: 100%;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;   /* reset right-align that causes overflow */
    box-sizing: border-box;
    overflow: hidden;
  }
  /* Reset inline right-align on col eyebrow */
  .col .eyebrow {
    justify-content: flex-start !important;
  }
  .col::before {
    inset: -16px -12px;
    background: radial-gradient(
      ellipse 110% 110% at 50% 50%,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.35) 60%,
      transparent 100%
    );
  }

  /* ================================================================
     CASES — mobile-first card layout
     ================================================================ */
  .cases,
  .cases.right {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
  }

  .case {
    /* Switch to 2-col: thumb | info+metric stacked */
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "thumb info"
      "thumb metric";
    gap: 8px 14px;
    padding: 12px 14px;
    align-items: start;
  }
  .case .thumb {
    grid-area: thumb;
    width: 52px;
    height: 52px;
    align-self: center;
  }
  .case .info {
    grid-area: info;
    gap: 3px;
  }
  .case .info .name {
    font-size: 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
  }
  .case .info .label {
    font-size: 8px;
    letter-spacing: 0.15em;
  }
  .case .info .desc {
    font-size: 10px;
    line-height: 1.35;
  }
  .case .metric {
    grid-area: metric;
    font-size: 16px;
    align-self: end;
    padding-top: 4px;
  }

  .cases-head {
    margin-top: 24px;
    font-size: 9px;
    letter-spacing: 0.2em;
  }

  /* ================================================================
     TYPOGRAPHY SCALING
     ================================================================ */
  h2.huge {
    font-size: clamp(24px, 7vw, 48px);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  h2.huge em {
    font-style: normal;        /* prevent italic from adding extra width */
    color: var(--core);
  }
  .lede {
    font-size: clamp(13px, 3.8vw, 17px);
    max-width: 100%;
    word-break: break-word;
  }
  .metric .val {
    font-size: clamp(16px, 4.5vw, 24px);
    white-space: normal;
    word-break: break-all;
  }

  /* ================================================================
     GRIDS
     ================================================================ */
  .observatory-stats { grid-template-columns: 1fr; }
  .build-grid        { grid-template-columns: 1fr; }

  /* ================================================================
     CTA BUTTON
     ================================================================ */
  .cta-button {
    padding: 18px 28px;
    font-size: 12px;
    letter-spacing: 0.2em;
    gap: 12px;
  }

  /* ================================================================
     MODAL — sheet from bottom
     ================================================================ */
  /* Modal — full-width bottom sheet on mobile */
  .modal {
    padding: 0;
    align-items: flex-start;  /* card starts from top, no gap */
    justify-content: stretch;
    overflow-y: auto;
  }
  .modal-card {
    width: 100vw;
    max-width: 100vw;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 28px 20px 40px;
    border-radius: 0 0 14px 14px;
    box-sizing: border-box;
    transform: scale(1) translateY(-50px);
  }
  .modal-backdrop.open + .modal .modal-card {
    transform: translateY(0);
  }
  .modal-card h3 {
    font-size: clamp(18px, 5.5vw, 26px);
  }
  .modal-card .eyebrow {
    margin-bottom: 10px;
  }
  .modal-form {
    gap: 10px;
  }
  /* Form inputs full width */
  .modal-form input,
  .modal-form textarea,
  .modal-form select {
    width: 100%;
    box-sizing: border-box;
  }
  .modal-close {
    top: 12px; right: 14px;
  }

  /* ================================================================
     ASCENSION & FOOTER
     ================================================================ */
  #ascension {
    padding-top: 12vh;
    padding-bottom: 10vh;
  }
  .ascension-wrap {
    gap: 28px;
    padding: 0;
  }
  .ascension-wrap h2 {
    font-size: clamp(28px, 8vw, 52px);
  }

  footer.engine-footer { grid-template-columns: 1fr; gap: 32px; }
  .hud.bl, .hud.br { display: none; }

  .scene-code {
    font-size: 8px;
    letter-spacing: 0.15em;
  }

  .contact-micro {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}
