/* ==========================================================================
   Stok (https://stok.day)
   Live Three.js 3D Alpine Descent + Open Editorial Scrollytelling
   ========================================================================== */

:root {
  --bg: #0c182c;
  --ink: #f6f9ff;
  --ink-secondary: #d2dfef;
  --ink-muted: #93a9c4;
  --line: rgba(255, 255, 255, 0.14);
  --line-hover: rgba(255, 255, 255, 0.34);

  --accent: #ff3b30;
  --accent-hover: #ff5248;
  --ice: #8ecaff;

  --glass: rgba(9, 18, 34, 0.56);
  --glass-strong: rgba(8, 15, 28, 0.72);
  --glass-border: rgba(255, 255, 255, 0.15);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;

  --max-w: 1180px;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-text);
  background: linear-gradient(180deg, #102242 0%, #173056 45%, #0c182c 100%);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   Full-Viewport Continuous Three.js 3D Alpine World
   ========================================================================== */
#ski-world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
  opacity: 0;
  transition: opacity 0.85s var(--ease-expo);
}

#ski-world.is-ready {
  opacity: 1;
}

/* Subtle Top Scroll Progress Hairline */
.progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  pointer-events: none;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), var(--accent));
  will-change: width;
}

/* Main Foreground Document Layer */
main, .footer {
  position: relative;
  z-index: 2;
}

.container {
  width: min(var(--max-w), calc(100% - 48px));
  margin-inline: auto;
}

/* ==========================================================================
   Clean Floating Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 90;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(8, 16, 30, 0.68);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.nav-inner {
  width: min(var(--max-w), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-word {
  font-family: var(--font-sans);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-style: italic;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(246, 249, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.38);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(8, 16, 30, 0.35);
  backdrop-filter: blur(10px);
}

.lang-switch button {
  padding: 4px 7px;
  border-radius: 6px;
  color: rgba(246, 249, 255, 0.65);
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch button.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.lang-sep {
  opacity: 0.3;
  user-select: none;
}

.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}

.nav-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 88;
  padding: 18px 24px 24px;
  background: rgba(8, 16, 30, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

.nav-drawer a {
  padding: 10px 0;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease, transform 0.25s var(--ease-expo), box-shadow 0.25s ease;
  will-change: transform;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 0.98rem;
}

.btn-primary {
  background: #ffffff;
  color: #081224;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.btn-primary:hover {
  background: #f2f7ff;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(255, 59, 48, 0.38);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(8, 16, 30, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: rgba(8, 16, 30, 0.82);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   CHAPTER 1 — SUMMIT HERO (Open Viewport Above 3D Skier Poised on Ridge)
   ========================================================================== */
.chapter-hero {
  min-height: 96svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: clamp(92px, 12vh, 132px) 24px 48px;
  position: relative;
}

.hero-backdrop-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70vh;
  background: linear-gradient(180deg, rgba(10, 22, 42, 0.78) 0%, rgba(10, 22, 42, 0.42) 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(244, 248, 255, 0.92);
  margin: 0 0 16px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-meta::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.8);
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 7.6vw, 6.2rem);
  font-weight: 700;
  line-height: 1.01;
  letter-spacing: -0.044em;
  margin: 0 0 20px;
  color: #ffffff;
  text-shadow: 0 14px 48px rgba(6, 14, 28, 0.55);
}

.hero-lead {
  font-size: clamp(1.05rem, 1.65vw, 1.3rem);
  color: rgba(236, 244, 255, 0.9);
  max-width: 44ch;
  margin: 0 auto 30px;
  line-height: 1.5;
  text-shadow: 0 4px 24px rgba(6, 14, 28, 0.65);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-meta,
.hero-title,
.hero-lead,
.hero-actions {
  animation: heroFadeUp 0.8s var(--ease-expo) both;
}

.hero-meta { animation-delay: 0.06s; }
.hero-title { animation-delay: 0.14s; }
.hero-lead { animation-delay: 0.24s; }
.hero-actions { animation-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  #ski-world {
    opacity: 1;
    transition: none;
  }
  .hero-meta,
  .hero-title,
  .hero-lead,
  .hero-actions {
    animation: none;
  }
}

.scroll-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(246, 249, 255, 0.9);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.scroll-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, 10px);
}

/* ==========================================================================
   CONTINUOUS ALPINE NAVY FLOW (Seamless translucent backdrop from Ch. 2 -> Footer)
   ========================================================================== */
.descent-flow {
  position: relative;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 22, 46, 0.56) 5%,
    rgba(10, 22, 46, 0.62) 45%,
    rgba(9, 19, 40, 0.76) 78%,
    rgba(8, 16, 34, 0.86) 100%
  );
}

/* ==========================================================================
   CHAPTER 2 & 3 — OPEN CARVE BEATS (Frameless Typography & Floating 3D iPhone)
   ========================================================================== */
.chapter-carve {
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding: clamp(52px, 7vh, 84px) 0;
  position: relative;
  background: transparent;
}

.carve-row {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 36px;
  align-items: center;
}

.carve-row--left {
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
}

/* Open slope window beside the floating copy & iPhone */
.skier-window {
  min-height: 240px;
  pointer-events: none;
}

/* Completely borderless, seamless editorial beat (soft edge fade is on the full-bleed section!) */
.story-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(12px, 2vw, 24px) 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.story-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

/* Mirror the left-side beat (#logbook) so #map3d has the iPhone on the right and #logbook on the left */
.carve-row--left .story-panel-grid {
  grid-template-columns: auto minmax(0, 1fr);
}

.carve-row--left .story-panel-grid .iphone-wrap {
  order: -1;
}

.story-panel-copy h2 {
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 3.8vw, 3.35rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  color: #ffffff;
  text-shadow: 0 8px 34px rgba(5, 13, 28, 0.78);
}

.story-panel-copy p {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  color: rgba(244, 248, 255, 0.94);
  margin: 0;
  line-height: 1.58;
  text-shadow: 0 4px 20px rgba(5, 13, 28, 0.85);
}

/* Open Inline Telemetry Strip (Floating directly in the descent) */
.day-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.day-stat strong {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1.06;
  text-shadow: 0 6px 26px rgba(5, 13, 28, 0.8);
}

.day-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(232, 241, 255, 0.85);
  text-shadow: 0 2px 14px rgba(5, 13, 28, 0.85);
}

/* Realistic 3D-Tilting Titanium iPhone Mockup */
.iphone-wrap {
  perspective: 1200px;
  display: flex;
  justify-content: center;
}

.iphone-tilt {
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.iphone-frame {
  position: relative;
  width: clamp(192px, 16vw, 228px);
  aspect-ratio: 9 / 19.5;
  padding: 7px;
  border-radius: 38px;
  background: linear-gradient(145deg, #d2dae4 0%, #5f6876 24%, #252c38 52%, #7d8898 84%, #dde4ee 100%);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 0 1.5px #070a10;
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: #060b14;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s ease;
}

.iphone-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, rgba(255, 255, 255, 0.16) 0%, transparent 48%);
  pointer-events: none;
}

/* Snow-spray reveal choreography synced to skier turns */
[data-carve-reveal] {
  opacity: 0;
  transform: translateY(34px) scale(0.97);
  filter: blur(8px);
  transition:
    opacity 0.85s var(--ease-expo),
    transform 0.9s var(--ease-expo),
    filter 0.8s var(--ease-expo);
}

[data-carve-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ==========================================================================
   CHAPTER 4 — RIDGE JUMP: APPLE WATCH ULTRA + CLEAN 5-ROW EDITORIAL INDEX
   ========================================================================== */
.chapter-watch {
  padding: clamp(56px, 7vh, 88px) 0;
  position: relative;
  background: transparent;
}

/* Seamless full-bleed editorial band (no boxed frame!) */
.editorial-sheet {
  padding: clamp(20px, 3vw, 40px) 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.watch-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
  margin-bottom: clamp(56px, 7vw, 88px);
}

.watch-photo-frame {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0a1426;
}

.watch-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.85s var(--ease-expo);
}

.watch-photo-frame:hover img {
  transform: scale(1.03);
}

.watch-copy h2 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.038em;
  margin: 0 0 16px;
}

.watch-copy p {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--ink-secondary);
  margin: 0 0 24px;
  line-height: 1.62;
}

.watch-readout {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.watch-readout strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.watch-readout span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Clean Architectural Index — 5 Hairline Horizontal Rows (Zero Boxes / Pills) */
.index-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.index-head h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.036em;
  margin: 0;
}

.index-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.feature-index {
  border-top: 1px solid var(--line);
}

.feature-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px 32px;
  align-items: baseline;
  padding: clamp(22px, 2.8vw, 32px) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}

.feature-row:hover {
  border-bottom-color: var(--line-hover);
}

.feature-num {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.feature-title {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.024em;
  margin: 0;
  color: #ffffff;
  transition: transform 0.3s var(--ease-expo);
}

.feature-row:hover .feature-title {
  transform: translateX(5px);
}

.feature-desc {
  margin: 0;
  font-size: clamp(0.95rem, 1.12vw, 1.04rem);
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Minimalist Two-Column Pricing Band (Hairline dividers, zero SaaS cards) */
.pricing-band {
  margin-top: clamp(56px, 7vw, 88px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 56px);
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 3vw, 36px);
}

.pricing-col--pro {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 4vw, 48px);
}

.pricing-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pricing-top h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

.pricing-top strong {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.pricing-col--pro .pricing-top strong {
  color: #ff6b63;
}

.pricing-note {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.pricing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.96rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.pricing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.pricing-col--pro .pricing-list li::before {
  background: var(--accent);
}

/* ==========================================================================
   CHAPTER 5 — BASE FINISH HOCKEY STOP & FINAL CTA + MINIMAL FOOTER
   ========================================================================== */
.chapter-finale {
  min-height: 74svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(68px, 9vh, 100px) 24px;
  text-align: center;
  position: relative;
  background: transparent;
}

.finale-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.finale-icon {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  margin: 0 auto 22px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.finale-title {
  font-family: var(--font-sans);
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  text-shadow: 0 10px 36px rgba(5, 13, 28, 0.8);
}

.finale-sub {
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  color: rgba(240, 246, 255, 0.92);
  margin: 0 auto 30px;
  max-width: 44ch;
  line-height: 1.58;
  text-shadow: 0 4px 22px rgba(5, 13, 28, 0.85);
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Subtle Bottom-Right Run Progress Chip (Desktop) */
.run-hud {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(246, 249, 255, 0.88);
  pointer-events: auto;
  font-variant-numeric: tabular-nums;
}

.cam-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
  border-radius: 999px;
}

.cam-toggle button {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(246, 249, 255, 0.68);
  transition: background 0.2s ease, color 0.2s ease;
}

.cam-toggle button.is-active {
  background: #ffffff;
  color: #081224;
}

.run-hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Minimal Footer */
.footer {
  position: relative;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  background: rgba(8, 15, 28, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 50vh 0 0 #080f1c;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

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

.footer-links a {
  color: var(--ink-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   TestFlight Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(4, 9, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.modal-panel {
  width: min(450px, 100%);
  min-width: 0;
  max-width: 100%;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  padding: clamp(22px, 5vw, 32px);
  border-radius: 24px;
  background: #0d172a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.72);
  position: relative;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.3s var(--ease-expo);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: var(--ink-secondary);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.modal-panel h3 {
  font-family: var(--font-sans);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

.modal-panel p {
  margin: 0 0 24px;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.58;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.modal-actions .btn {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 13px 18px;
}

.copy-feedback {
  font-size: 0.82rem;
  color: #6ee7b7;
  min-height: 1.2em;
  text-align: center;
  margin-top: 4px;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile Keeps Skier Cleanly Visible in Upper Frame!)
   ========================================================================== */
@media (max-width: 1024px) {
  .carve-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Push cards down slightly on narrow screens so the 3D skier shines in upper center */
  .skier-window {
    min-height: 34svh;
    order: -1;
  }

  .watch-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .scroll-hint {
    bottom: 72px;
  }
}

@media (max-width: 780px) {
  .nav-links,
  .nav-cta-desktop {
    display: none;
  }

  .run-hud {
    right: 14px;
    bottom: 14px;
    padding: 5px 7px;
    gap: 0;
  }

  .run-hud > span {
    display: none;
  }

  .scroll-hint {
    bottom: 62px;
    max-width: calc(100vw - 28px);
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 7px 14px;
  }

  .nav-burger {
    display: inline-flex;
  }

  .story-panel-grid,
  .carve-row--left .story-panel-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .carve-row--left .story-panel-grid .iphone-wrap {
    order: 0;
  }

  .day-stats {
    text-align: center;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pricing-col--pro {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }

  .feature-num {
    font-size: 0.76rem;
  }
}

@media (max-width: 480px) {
  .container,
  .nav-inner {
    width: calc(100% - 28px);
  }

  .btn-lg {
    width: 100%;
  }

  .day-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-carve-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
