/* ==========================================================================
   RUNDOWN — THE LIVING HORSEMAN'S SKETCHBOOK (v3.0 Magic & Pencil Art Edition)
   Archival Cotton Paper (#F5EFE4) × Saddle Obsidian Darkroom (#0E0B09)
   × Burnished Copper (#B5652E) × Real Core ML 30-Joint X-Ray Loupe
   ========================================================================== */

:root {
  /* Warm Archival Sketchbook Paper Palette */
  --paper: #F5EFE4;
  --paper-soft: #FAF6EE;
  --paper-card: #EFE7D8;
  --paper-line: rgba(28, 21, 16, 0.11);
  --paper-line-strong: rgba(28, 21, 16, 0.22);

  /* Ink & Graphite */
  --ink: #17120E;
  --ink-soft: #43372E;
  --ink-muted: #706053;

  /* Saddle Obsidian Darkroom Palette */
  --obsidian: #0E0B09;
  --obsidian-card: #17120E;
  --obsidian-elev: #211A14;
  --obsidian-line: rgba(245, 239, 228, 0.11);
  --cream: #F6F0E4;
  --cream-muted: #B6A796;

  /* Saddle Copper, Champagne & Horsemanship Sage */
  --copper: #B8652C;
  --copper-bright: #D68549;
  --champagne: #E3B576;
  --sage: #3F8B66;
  --sage-bright: #57C492;
  --terracotta: #C2533A;

  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-paper: 0 18px 50px -24px rgba(24, 17, 11, 0.18), 0 2px 8px rgba(24, 17, 11, 0.05);
  --shadow-dark: 0 28px 70px -22px rgba(0, 0, 0, 0.72);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

button, input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Subtle cotton paper tooth overlay */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--copper), var(--champagne));
  z-index: 120;
  transition: width 80ms linear;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   FLOATING EDITORIAL NAVBAR
   ========================================================================== */
.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 16px;
  pointer-events: none;
}

.nav-pill {
  pointer-events: auto;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px 9px 14px;
  border-radius: 999px;
  background: rgba(245, 239, 228, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(28, 21, 16, 0.11);
  box-shadow: 0 12px 32px -16px rgba(23, 18, 14, 0.22);
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

.nav-pill.nav-dark {
  background: rgba(18, 14, 11, 0.84);
  border-color: rgba(245, 239, 228, 0.12);
  color: var(--cream);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--copper);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-pill.nav-dark .nav-links {
  color: var(--cream-muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--copper);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), background 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper-soft);
  padding: 10px 18px;
  font-size: 13.5px;
  box-shadow: 0 8px 20px -10px rgba(23, 18, 14, 0.55);
}

.btn-ink:hover {
  background: #2B211A;
  transform: translateY(-1px);
}

.nav-pill.nav-dark .btn-ink {
  background: linear-gradient(135deg, var(--copper-bright), var(--copper));
  color: var(--obsidian);
}

.btn-copper {
  background: linear-gradient(135deg, #C97338, #9F5220);
  color: #FFFBF4;
  padding: 15px 26px;
  font-size: 15.5px;
  box-shadow: 0 14px 32px -12px rgba(184, 101, 44, 0.55);
}

.btn-copper:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(184, 101, 44, 0.68);
}

.btn-outline-paper {
  background: rgba(250, 246, 238, 0.72);
  color: var(--ink);
  border: 1px solid var(--paper-line-strong);
  padding: 14px 22px;
  font-size: 15px;
}

.btn-outline-paper:hover {
  background: var(--paper-soft);
  border-color: var(--copper);
  color: var(--copper);
  transform: translateY(-1px);
}

.btn-outline-dark {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  border: 1px solid rgba(245, 239, 228, 0.18);
  padding: 14px 22px;
  font-size: 15px;
}

.btn-outline-dark:hover {
  border-color: var(--champagne);
  color: var(--champagne);
}

/* ==========================================================================
   TYPOGRAPHY HELPERS
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--copper);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(184, 101, 44, 0.18);
  animation: softPulse 2.4s ease-in-out infinite;
}

@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.028em;
  margin: 12px 0 16px;
}

.section-title em {
  font-style: italic;
  color: var(--copper);
  font-weight: 400;
}

.section-lead {
  font-size: clamp(15.5px, 1.4vw, 18px);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0;
  line-height: 1.62;
}

/* ==========================================================================
   SECTION 1: THE LIVING SKETCHBOOK HERO (WARM ARCHIVAL PAPER)
   ========================================================================== */
.hero {
  position: relative;
  padding: 116px 0 64px;
  background:
    radial-gradient(ellipse 70% 55% at 75% 32%, rgba(214, 133, 73, 0.11), transparent 68%),
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(184, 101, 44, 0.06), transparent 65%),
    var(--paper);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin: 18px 0 22px;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  color: var(--copper);
  font-weight: 400;
}

.hero-sub {
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 520px;
}

.hero-sub strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 34px;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust svg {
  color: var(--sage);
  flex-shrink: 0;
}

/* Hand-ruled sketchbook stat strip */
.hero-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--paper-line-strong);
}

.ledger-val {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.ledger-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 5px;
}

/* ==========================================================================
   INTERACTIVE PENCIL-TO-X-RAY SKETCHBOOK STAGE (HERO MAGIC!)
   ========================================================================== */
.sketch-stage-wrap {
  position: relative;
}

.sketch-plate-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.plate-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--copper);
  font-weight: 600;
}

.sketch-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 26px;
  background: var(--paper-soft);
  border: 1px solid var(--paper-line-strong);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
  cursor: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.sketch-stage.is-curtain {
  cursor: ew-resize;
}

/* Fine sketchbook corner crop marks */
.sketch-stage::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(28, 21, 16, 0.12);
  border-radius: 16px;
  pointer-events: none;
  z-index: 6;
}

/* Layer 1: Pure Graphite Pencil Horse melted seamlessly onto cotton paper */
.sketch-base-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.96;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Layer 2: Subtle Hand-Drawn Pencil Construction SVG (sketches itself live!) */
.sketch-pencil-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.pencil-guide {
  fill: none;
  stroke: rgba(112, 96, 83, 0.36);
  stroke-width: 1.1;
  stroke-dasharray: 5 5;
}

.pencil-draw-path {
  fill: none;
  stroke: rgba(184, 101, 44, 0.55);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: sketchStroke 3.8s var(--ease-out) forwards;
}

@keyframes sketchStroke {
  to { stroke-dashoffset: 0; }
}

/* Layer 3: Obsidian X-Ray Reveal Layer (Clipped by Interactive Loupe OR Curtain Slider!) */
.xray-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 50%, rgba(214, 133, 73, 0.14), transparent 65%),
    #0E0B09;
  z-index: 4;
  pointer-events: none;
  clip-path: circle(96px at 56% 52%);
  will-change: clip-path;
}

.xray-horse-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Pure white background inverts to #000000; graphite strokes glow warm ivory-chalk! */
  filter: invert(1) sepia(0.24) saturate(1.25) contrast(1.18) brightness(0.92);
  mix-blend-mode: screen;
  opacity: 0.86;
}

.xray-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Tactile Watchmaker Copper Loupe Ring */
.loupe-ring {
  position: absolute;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  border: 2px solid rgba(227, 181, 118, 0.92);
  box-shadow:
    0 0 0 1px rgba(14, 11, 9, 0.45),
    0 14px 36px rgba(0, 0, 0, 0.34),
    inset 0 0 24px rgba(227, 181, 118, 0.16);
  pointer-events: none;
  z-index: 8;
  transform: translate(-50%, -50%);
  will-change: left, top, opacity;
  transition: opacity 0.25s ease;
}

.loupe-ring::after {
  content: '30-JOINT X-RAY';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--paper-soft);
  background: rgba(14, 11, 9, 0.86);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(227, 181, 118, 0.45);
  white-space: nowrap;
}

.loupe-ring.hidden {
  opacity: 0;
}

/* Curtain divider line when user drags the full Pencil <-> X-Ray slider */
.curtain-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--champagne), var(--copper-bright), transparent);
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.curtain-line.visible {
  opacity: 1;
}

/* Live Floating Plate Callout Badge */
.plate-telemetry-badge {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-radius: 14px;
  background: rgba(245, 239, 228, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--paper-line-strong);
  box-shadow: 0 8px 22px -12px rgba(23, 18, 14, 0.28);
  pointer-events: none;
}

.plate-badge-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--copper);
}

.plate-badge-lbl {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Stage Controls Strip: Plate Switcher + Pencil <-> X-Ray Slider */
.sketch-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.plate-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
}

.plate-tab {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.plate-tab.active {
  background: var(--ink);
  color: var(--paper-soft);
}

.xray-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.xray-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 126px;
  height: 5px;
  border-radius: 999px;
  background: var(--paper-line-strong);
  outline: none;
  cursor: pointer;
}

.xray-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--copper);
  border: 2.5px solid var(--paper-soft);
  box-shadow: 0 2px 8px rgba(23, 18, 14, 0.35);
}

/* ==========================================================================
   PENCIL-DRAWN HORIZONTAL DIVIDER
   ========================================================================== */
.pencil-divider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.pencil-divider svg {
  width: 100%;
  height: 18px;
  overflow: visible;
}

/* ==========================================================================
   SECTION 2: "WHAT A HORSEMAN FEELS — MEASURED" (SKETCHBOOK ANATOMY)
   ========================================================================== */
.section-paper {
  padding: 96px 0;
  background: var(--paper);
  color: var(--ink);
}

.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 54px;
  align-items: center;
  margin-top: 44px;
}

.anatomy-artwork-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  padding: 24px;
  box-shadow: var(--shadow-paper);
  overflow: hidden;
}

.anatomy-art-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.anatomy-portrait-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper-soft);
}

.anatomy-portrait-img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  opacity: 0.96;
}

.anatomy-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.anatomy-caption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.anatomy-caption em {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  font-style: italic;
}

/* Interactive 3-Tier Biomechanics Study Cards */
.study-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.study-pill {
  border: 1px solid var(--paper-line-strong);
  background: var(--paper-soft);
  color: var(--ink-soft);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.study-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-soft);
}

.study-card {
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-paper);
}

.study-quote {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 12px;
}

.study-explain {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 24px;
  line-height: 1.6;
}

.tier-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tier-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}

.tier-name {
  font-weight: 600;
  color: var(--ink);
}

.tier-name.pro {
  color: var(--copper);
}

.tier-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.tier-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 18, 14, 0.08);
  overflow: hidden;
}

.tier-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(112, 96, 83, 0.45);
  transition: width 0.7s var(--ease-out);
}

.tier-fill.np {
  background: rgba(184, 101, 44, 0.55);
}

.tier-fill.pro {
  background: linear-gradient(90deg, var(--copper), var(--champagne));
}

.study-footnote {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper-card);
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Animated Hand-Drawn Watchmaker Spin Compass Mini Canvas */
.spin-compass-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
}

#spinCompassCanvas {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
}

/* ==========================================================================
   SECTION 3: THE SADDLE-OBSIDIAN DARKROOM (LIVE REAL iOS APP + VIDEO CINEMA)
   ========================================================================== */
.section-darkroom {
  position: relative;
  padding: 108px 0;
  background:
    radial-gradient(ellipse 65% 45% at 25% 15%, rgba(184, 101, 44, 0.16), transparent 65%),
    radial-gradient(ellipse 55% 45% at 80% 80%, rgba(227, 181, 118, 0.09), transparent 65%),
    var(--obsidian);
  color: var(--cream);
  overflow: hidden;
}

.section-darkroom .section-lead {
  color: var(--cream-muted);
}

.section-darkroom .eyebrow {
  color: var(--champagne);
}

.section-darkroom .section-title em {
  color: var(--champagne);
}

/* Live Real Core ML Video Cinema Banner */
.cinema-card {
  margin-top: 40px;
  border-radius: 28px;
  background: var(--obsidian-card);
  border: 1px solid var(--obsidian-line);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.cinema-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--obsidian-line);
}

.cinema-tabs {
  display: inline-flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 999px;
}

.cinema-tab {
  border: none;
  background: transparent;
  color: var(--cream-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cinema-tab.active {
  background: var(--champagne);
  color: var(--obsidian);
}

.cinema-video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060504;
  overflow: hidden;
}

.cinema-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cinema-video.active {
  opacity: 1;
}

.cinema-overlay-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(14, 11, 9, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 181, 118, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--champagne);
}

.cinema-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--obsidian-line);
}

.cinema-stat-k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-muted);
}

.cinema-stat-v {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--cream);
  margin-top: 3px;
}

/* Interactive iPhone 17 Pro Walkthrough */
.app-walkthrough {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: start;
  margin-top: 76px;
}

.chapter-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chapter-btn {
  text-align: left;
  width: 100%;
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(245, 239, 228, 0.08);
  color: var(--cream);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.chapter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(227, 181, 118, 0.25);
}

.chapter-btn.active {
  background: linear-gradient(145deg, rgba(184, 101, 44, 0.16), rgba(23, 18, 14, 0.96));
  border-color: rgba(227, 181, 118, 0.52);
  box-shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.8);
}

.chapter-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--champagne);
  margin-bottom: 6px;
}

.chapter-h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 8px;
}

.chapter-p {
  font-size: 14px;
  color: var(--cream-muted);
  margin: 0;
  line-height: 1.55;
}

.phone-sticky-col {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.iphone-shell {
  position: relative;
  width: min(332px, 84vw);
  aspect-ratio: 1206 / 2622;
  padding: 11px;
  border-radius: 50px;
  background: linear-gradient(145deg, #3A3029, #15110E 45%, #2B221B);
  box-shadow:
    0 36px 80px -20px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(245, 239, 228, 0.16),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}

.iphone-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: #0D0A08;
}

.iphone-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out);
}

.iphone-screen.active {
  opacity: 1;
  transform: scale(1);
}

.phone-caption-pill {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream-muted);
  text-align: center;
}

/* ==========================================================================
   SECTION 4: VIRTUAL NRHA JUDGE CARD PLAYGROUND (VIRAL GROWTH PREVIEW!)
   ========================================================================== */
.judge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  margin-top: 44px;
}

.judge-controls-card {
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-paper);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.preset-chip {
  border: 1px solid var(--paper-line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip.active {
  background: var(--copper);
  border-color: var(--copper);
  color: #FFFBF4;
}

.slider-group {
  margin-bottom: 22px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.slider-val-mono {
  font-family: var(--font-mono);
  color: var(--copper);
  font-size: 14px;
}

.barn-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 18, 14, 0.12);
  outline: none;
  cursor: pointer;
}

.barn-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper-soft);
  box-shadow: 0 4px 12px rgba(23, 18, 14, 0.35);
}

.slider-hint {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 5px;
}

/* The Shareable Obsidian & Copper Virtual NRHA Judge Story Card */
.judge-story-card {
  position: relative;
  border-radius: 30px;
  padding: 28px;
  background:
    radial-gradient(circle at 85% 12%, rgba(214, 133, 73, 0.24), transparent 55%),
    linear-gradient(165deg, #1B140F, #0D0A08);
  color: var(--cream);
  border: 1px solid rgba(227, 181, 118, 0.32);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
}

.judge-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.judge-brand-bug {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--champagne);
}

.judge-percentile-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--obsidian);
  background: linear-gradient(135deg, var(--champagne), var(--copper-bright));
  padding: 5px 12px;
  border-radius: 999px;
}

.judge-score-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(245, 239, 228, 0.1);
  border-bottom: 1px solid rgba(245, 239, 228, 0.1);
}

.judge-score-big {
  font-family: var(--font-serif);
  font-size: 62px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--cream);
}

.judge-band-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--champagne);
  text-align: right;
}

.judge-band-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-muted);
  text-align: right;
  margin-top: 4px;
}

.judge-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.jm-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 239, 228, 0.08);
  border-radius: 14px;
  padding: 11px;
}

.jm-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cream-muted);
}

.jm-v {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
  margin-top: 4px;
}

.judge-fix-box {
  background: rgba(87, 196, 146, 0.09);
  border: 1px solid rgba(87, 196, 146, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.judge-fix-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-bright);
  margin-bottom: 4px;
}

.judge-fix-text {
  font-size: 13.5px;
  color: var(--cream);
  line-height: 1.48;
  margin: 0;
}

.judge-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   SECTION 5: SHOW-RAIL HUMAN STORIES & v5+ PROOF LEDGER
   ========================================================================== */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.story-card {
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--copper);
}

.story-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.story-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* Honest v5+ Scientific Proof Ledger */
.proof-ledger {
  margin-top: 52px;
  border-radius: 26px;
  background: var(--obsidian);
  color: var(--cream);
  padding: 32px;
  border: 1px solid rgba(227, 181, 118, 0.2);
}

.proof-ledger-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.proof-big {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  color: var(--champagne);
  line-height: 1.05;
}

.proof-label {
  font-size: 13px;
  color: var(--cream-muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* ==========================================================================
   SECTION 6: PRICING (CLEAN, ZERO-FRICTION)
   ========================================================================== */
.billing-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
}

.billing-btn {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.billing-btn.active {
  background: var(--ink);
  color: var(--paper-soft);
}

.save-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(63, 139, 102, 0.16);
  color: var(--sage);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.price-card {
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-paper);
}

.price-card.featured {
  background: var(--obsidian);
  color: var(--cream);
  border-color: rgba(227, 181, 118, 0.45);
  box-shadow: var(--shadow-dark);
}

.price-tier {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}

.price-card.featured .price-tier {
  color: var(--champagne);
}

.price-amount {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.05;
  margin: 12px 0 4px;
  letter-spacing: -0.03em;
}

.price-amount span {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
}

.price-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.price-card.featured .price-sub {
  color: var(--cream-muted);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 14px;
  flex: 1;
}

.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.price-list svg {
  color: var(--sage);
  flex-shrink: 0;
  margin-top: 3px;
}

.price-card.featured .price-list svg {
  color: var(--sage-bright);
}

/* ==========================================================================
   FINAL CTA & FOOTER
   ========================================================================== */
.final-cta {
  padding: 88px 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(184, 101, 44, 0.18), transparent 70%),
    var(--obsidian);
  color: var(--cream);
  text-align: center;
}

.final-cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.footer {
  background: #0A0806;
  color: var(--cream-muted);
  padding: 36px 0 92px;
  border-top: 1px solid rgba(245, 239, 228, 0.08);
  font-size: 13px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--champagne);
}

/* ==========================================================================
   ZERO-FRICTION MODAL (1-FIELD WAITLIST + VIRAL INVITE UNLOCK!)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.72);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 450px;
  background: var(--paper-soft);
  color: var(--ink);
  border-radius: 28px;
  padding: 30px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s var(--ease-out);
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--paper-line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--paper-line-strong);
  background: #FFFDF8;
  color: var(--ink);
  font-size: 15.5px;
  margin: 14px 0 12px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--copper);
}

.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.role-pill {
  border: 1px solid var(--paper-line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.role-pill.active {
  background: var(--ink);
  color: var(--paper-soft);
  border-color: var(--ink);
}

.viral-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper-card);
  border: 1px solid var(--paper-line-strong);
}

/* Mobile Sticky Bottom CTA Bar */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 95;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: rgba(23, 18, 14, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(227, 181, 118, 0.34);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color: var(--cream);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(120%);
  transition: transform 0.35s var(--ease-out);
}

.mobile-sticky-cta.visible {
  transform: translateY(0);
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper-soft);
  border: 1px solid rgba(227, 181, 118, 0.4);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE-FIRST MAGIC)
   ========================================================================== */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero { padding: 98px 0 56px; }
  .hero-grid,
  .anatomy-grid,
  .app-walkthrough,
  .judge-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-stage-col { order: -1; }
  .stories-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .proof-ledger-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .phone-sticky-col {
    position: relative;
    top: 0;
    order: -1;
  }
  .cinema-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero-ledger {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .loupe-ring {
    width: 142px;
    height: 142px;
  }
  .sketch-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .plate-tabs {
    justify-content: space-between;
  }
  .plate-tab {
    flex: 1;
    padding: 8px 8px;
    font-size: 11.5px;
    text-align: center;
  }
  .xray-slider-wrap {
    justify-content: space-between;
  }
  .xray-slider {
    flex: 1;
  }
  .plate-telemetry-badge {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
  }
  .judge-score-big {
    font-size: 50px;
  }
  .judge-metrics-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .mobile-sticky-cta {
    display: flex;
  }
  .btn-nav span { display: none; }
  .btn-nav::before { content: 'Get iOS'; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pencil-draw-path { animation: none; stroke-dashoffset: 0; }
}
