/* ==========================================================
   Seeing with Computers — Joshua Borsman
   seeingwithcomputers.joshuaborsman.com
   Aligned with the morticia exhibit visual system.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Surfaces (shared with morticia, dark green-tinted) ── */
  --bg:             oklch(7% 0.025 160);
  --bg-surface:     oklch(11% 0.02 160);
  --bg-card:        oklch(14% 0.02 160);

  /* ── Per-project accent (cyan = LIDAR/data, amber = renders) ── */
  --cyan:           oklch(72% 0.13 220);
  --cyan-soft:      oklch(78% 0.10 220);
  --amber:          oklch(68% 0.18 65);
  --green:          oklch(55% 0.14 160);

  /* ── Type tones (shared with morticia) ── */
  --text:           oklch(94% 0.008 100);
  --text-muted:     oklch(80% 0.012 160);
  --text-dim:       oklch(62% 0.012 160);

  --border:         oklch(22% 0.02 160);
  --border-subtle:  oklch(16% 0.015 160);

  /* ── Fonts ── */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-body:    'Manrope', system-ui, sans-serif;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max:  1200px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section { scroll-margin-top: 5rem; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 0;
}

img, video, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: oklch(48% 0.15 220 / 0.45); color: var(--text); }

/* ── NAV ─────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: oklch(7% 0.025 160 / 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
  padding: 0.25rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover { color: var(--text); }

.nav-link--external { color: var(--text); }
.nav-link--external span {
  font-size: 0.85em;
  margin-left: 0.15em;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  display: inline-block;
}
.nav-link--external:hover span { opacity: 1; transform: translate(2px, -2px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem;
  border-radius: 3px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  margin: 4px 0;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── HERO ─────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  text-align: center;
  padding: 6rem 2rem 4rem;
}

.hero-bg, .hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 55%, oklch(5% 0.02 160 / 0.3) 0%, transparent 70%),
    linear-gradient(
      to bottom,
      oklch(7% 0.025 160 / 0.35) 0%,
      oklch(7% 0.025 160 / 0.2) 45%,
      oklch(7% 0.025 160 / 0.7) 100%
    );
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: 2;
}
.hero-glow--cyan {
  width: 65vw; height: 65vw;
  bottom: -15%; left: 50%;
  transform: translateX(-50%);
  background: oklch(70% 0.13 220 / 0.16);
  animation: glowPulse 12s ease-in-out infinite;
}
.hero-glow--amber {
  width: 42vw; height: 42vw;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  background: oklch(68% 0.18 65 / 0.09);
  animation: glowPulse 12s ease-in-out infinite reverse;
  animation-delay: -6s;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;    transform: translateX(-50%) scale(1.14); }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 920px;
  text-shadow:
    0 2px 30px oklch(5% 0.02 160 / 0.9),
    0 1px 8px  oklch(5% 0.02 160 / 0.7);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: oklch(78% 0.015 160);
  margin-bottom: 2rem;
}
.hero-rule {
  display: block;
  width: 36px;
  height: 1px;
  background: oklch(60% 0.015 160 / 0.6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 2rem;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--cyan-soft);
}

.hero-italic {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
  margin: 0 auto 1.25rem;
  max-width: 640px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: oklch(85% 0.01 160);
  line-height: 1.55;
  max-width: 580px;
  margin: 0 auto 3.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2.25rem;
}
.stat-divider {
  width: 1px; height: 40px;
  background: oklch(60% 0.015 160 / 0.5);
  flex-shrink: 0;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.55rem;
}
.stat-value sup { font-size: 0.55em; color: var(--text-dim); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: oklch(80% 0.012 160);
  text-align: center;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  transition: color 0.3s var(--ease);
  animation: nudgeDown 3s ease-in-out infinite;
}
.hero-scroll:hover { color: var(--text-muted); }
@keyframes nudgeDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  55%       { transform: translateX(-50%) translateY(7px); }
}

/* ── SECTION SCAFFOLDING ─────────────────────────────── */

.section {
  padding: clamp(5rem, 10vw, 9rem) 2rem;
  max-width: var(--max);
  margin: 0 auto;
}
.section--surface { background: var(--bg-surface); max-width: none; padding-inline: max(2rem, calc((100% - var(--max)) / 2)); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Chapter head: section-label + display title + lead */
.chapter-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-right: 0.75rem;
}
.chapter-title h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
  margin: 1rem 0;
}
.chapter-title p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 720px;
}
.chapter-title p a { color: var(--cyan-soft); border-bottom: 1px solid oklch(60% 0.08 220 / 0.4); }
.chapter-title p a:hover { color: var(--text); }

/* ── INTRO TWO-COLUMN ────────────────────────────────── */

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.intro-grid > div:first-child {
  position: sticky;
  top: 7rem;
}

.intro-lead {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  color: var(--text);
  margin: 1rem 0 1.5rem;
}
.intro-lead em { color: var(--cyan-soft); font-style: italic; }

.intro-summary {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.intro-summary a { color: var(--cyan-soft); border-bottom: 1px solid oklch(60% 0.08 220 / 0.35); }
.intro-summary a:hover { color: var(--text); }

.intro-body p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.intro-body p:first-of-type {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  color: var(--text);
}
.intro-body p em { color: var(--text); font-style: italic; }
.intro-body p strong { color: var(--text); font-weight: 500; }
.intro-body a {
  color: var(--cyan-soft);
  border-bottom: 1px solid oklch(60% 0.08 220 / 0.4);
  transition: color 0.25s var(--ease);
}
.intro-body a:hover { color: var(--text); }

.point-stat {
  font-family: var(--font-mono);
  font-size: 1em;
  letter-spacing: -0.01em;
  color: var(--cyan-soft);
}

/* ── HERO INDEX METRICS (intro stats row) ─────────────── */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: clamp(4rem, 8vw, 7rem);
}
.metric {
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.metric:last-child { border-right: none; }
.metric-num {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.55rem;
}
.metric-num sup { font-size: 0.5em; color: var(--text-dim); margin-left: 0.15em; }
.metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── FIGURES (images + videos in dark mats) ──────────── */

.figure {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.figure img,
.figure picture { width: 100%; height: 100%; object-fit: contain; display: block; }
.figure picture img { width: 100%; height: 100%; }

.figure-cap, .compare-label, .video-caption {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.compare-label::before, .video-caption::before {
  content: '—';
  margin-right: 0.5rem;
  color: var(--text-dim);
}

.feature-wide {
  width: 100%;
  aspect-ratio: 16/9;
  margin: clamp(2rem, 4vw, 4rem) 0;
}
.feature-wide img { object-fit: cover; }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
}
.compare-item .figure { aspect-ratio: 4/3; }

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.two-up.reverse > *:first-child { order: 2; }
.two-up .figure { aspect-ratio: 4/3; }

/* ── POINT GRID (render chapter mosaic) ──────────────── */

.point-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.75rem, 1vw, 1rem);
}
.point-grid .figure { aspect-ratio: auto; }
.pg-hero { grid-column: span 8; grid-row: span 2; aspect-ratio: 16/10; }
.pg-a    { grid-column: span 4; aspect-ratio: 4/3; }
.pg-b    { grid-column: span 4; aspect-ratio: 4/3; }
.pg-c    { grid-column: span 6; aspect-ratio: 16/9; }
.pg-d    { grid-column: span 6; aspect-ratio: 16/9; }
.pg-hero img { object-fit: cover; }

/* ── VIDEOS ──────────────────────────────────────────── */

.point-video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.video-fallback { display: none; }
@media (prefers-reduced-motion: reduce) {
  .point-video { display: none; }
  .point-video + .video-fallback { display: block; }
}

.mill-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 1vw, 1.25rem);
}
@media (max-width: 720px) {
  .mill-videos { grid-template-columns: 1fr; }
}

/* ── TIMELINE (scan steps) ───────────────────────────── */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.timeline-step {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border-subtle);
}
.timeline-step:last-child { border-right: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cyan-soft);
  margin-bottom: 1rem;
}
.timeline-step h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.65rem;
}
.timeline-step p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-dim);
}

/* ── SECTION BODY HELPERS ────────────────────────────── */

h3.section-h {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin: clamp(4rem, 8vw, 7rem) 0 1rem;
}
.body-lead {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 2rem;
}
.body-lead a { color: var(--cyan-soft); border-bottom: 1px solid oklch(60% 0.08 220 / 0.35); }
.body-lead em, .body-lead strong { color: var(--text); }
.body-lead strong { font-weight: 500; }

.two-up-text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
}
.two-up-text p + p { margin-top: 1rem; }
.two-up-text em { color: var(--text); font-style: italic; }
.two-up-text strong { color: var(--text); font-weight: 500; }
.two-up-text a { color: var(--cyan-soft); border-bottom: 1px solid oklch(60% 0.08 220 / 0.35); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ── SPECS (detail-block pattern) ────────────────────── */

.specs {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}
.spec-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.spec-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  padding-top: 0.2rem;
}
.spec-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}
.spec-value em { color: var(--cyan-soft); font-style: italic; }
.specs-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cyan-soft);
  margin-bottom: 1rem;
}

/* ── COLOPHON (thanks cards in morticia idiom) ───────── */

#colophon { background: var(--bg-surface); padding-top: clamp(5rem, 10vw, 9rem); padding-bottom: clamp(5rem, 10vw, 9rem); max-width: none; padding-inline: max(2rem, calc((100% - var(--max)) / 2)); }

.thanks-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: clamp(2.5rem, 5vw, 4rem);
  position: relative;
}
.thanks-card + .thanks-card { margin-top: 1.25rem; }

.thanks-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.thanks-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}
.thanks-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cyan-soft);
  margin-bottom: 1rem;
}
.thanks-bio {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.thanks-bio a { color: var(--cyan-soft); border-bottom: 1px solid oklch(60% 0.08 220 / 0.35); }

.thanks-list {
  list-style: none;
}
.thanks-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 1rem;
  align-items: baseline;
}
.thanks-list li:last-child { border-bottom: none; }
.thanks-list strong {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.special-thanks-body {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 880px;
}
.special-thanks-body + .special-thanks-body { margin-top: 1.25rem; }
.special-thanks-body strong { color: var(--text); font-style: normal; font-weight: 500; }

/* ── FOOTER ──────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: clamp(4rem, 8vw, 6rem) 2rem clamp(3rem, 5vw, 4rem);
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}
.footer-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.footer-credit a { color: var(--text); }
.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.footer-thanks {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.footer-copyright a { color: var(--text-muted); }
.footer-rights {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── LIGHTBOX ────────────────────────────────────────── */

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(5% 0.02 160 / 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lb-overlay.open { opacity: 1; pointer-events: all; }

.lb-stage {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img,
.lb-stage video {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
}

.lb-close, .lb-nav {
  position: absolute;
  background: oklch(15% 0.02 160 / 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  backdrop-filter: blur(10px);
  font-family: var(--font-body);
}
.lb-close { top: 1.5rem; right: 1.5rem; width: 44px; height: 44px; font-size: 1.5rem; }
.lb-nav   { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.5rem; }
.lb-nav.prev { left: 1.5rem; }
.lb-nav.next { right: 1.5rem; }
.lb-close:hover, .lb-nav:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg);
}
.lb-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ── REVEAL ANIMATION ───────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d2 { transition-delay: 0.1s; }
.reveal.d3 { transition-delay: 0.2s; }
.reveal.d4 { transition-delay: 0.3s; }

/* ── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 1024px) {
  .stat { padding: 0 1.5rem; }
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1.05rem; letter-spacing: 0.12em; }
  .nav-toggle { display: block; }

  .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .intro-grid > div:first-child { position: static; }
  .compare-grid { grid-template-columns: 1fr; }
  .two-up { grid-template-columns: 1fr; gap: 2rem; }
  .two-up.reverse > *:first-child { order: 0; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline-step { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .timeline-step:nth-child(odd) { border-right: 1px solid var(--border-subtle); }
  .timeline-step:nth-last-child(-n+2) { border-bottom: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { border-bottom: 1px solid var(--border-subtle); }
  .metric:nth-last-child(-n+2) { border-bottom: none; }
  .metric:nth-child(2n) { border-right: none; }

  .point-grid { grid-template-columns: 1fr 1fr; }
  .pg-hero, .pg-c, .pg-d { grid-column: span 2; aspect-ratio: 16/9; }
  .pg-a, .pg-b { grid-column: span 1; }

  .thanks-grid { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr; gap: 0.25rem; padding: 1rem 0; }

  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .hero-stats .stat-divider { width: 40px; height: 1px; }
}

@media (max-width: 560px) {
  .nav { padding: 1rem 1.25rem; }
  .section { padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }
  .timeline { grid-template-columns: 1fr; }
  .timeline-step { border-right: none !important; border-bottom: 1px solid var(--border-subtle); }
  .timeline-step:last-child { border-bottom: none; }
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: none !important; border-bottom: 1px solid var(--border-subtle); }
  .metric:last-child { border-bottom: none; }
  .point-grid { grid-template-columns: 1fr; }
  .pg-hero, .pg-a, .pg-b, .pg-c, .pg-d { grid-column: span 1; aspect-ratio: 16/9; }
  .thanks-list li { grid-template-columns: 1fr; gap: 0.25rem; }
  .lb-close { top: 1rem; right: 1rem; }
  .lb-nav { width: 42px; height: 42px; font-size: 1.2rem; }
  .lb-nav.prev { left: 0.5rem; }
  .lb-nav.next { right: 0.5rem; }
}
