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

:root {
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-gold: #FFC043;
  --color-orange: #FF7B25;
  --color-cyan: #38E1FF;
  --color-text-white: #FFFFFF;
}

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: #080A10;
  color: var(--color-text-white);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* =========================================================
   CONTINUOUS VERTICAL LIVING TAPESTRY CONTAINER
   ========================================================= */
.snap-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #080A10;
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.95);
  position: relative;
}

/* Each section renders at exact natural aspect ratio matching Figma 1440px master */
.snap-section {
  position: relative;
  width: 100%;
  aspect-ratio: var(--aspect, 1.6);
  margin: 0;
  padding: 0;
  border: none;
  display: block;
  background: transparent;
  overflow: hidden;
}

/* Background video and image layers fill 100% of the uncropped aspect container */
.bg-video,
.bg-image-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
}

/* Interactive Canvas Overlay */
.scene-canvas-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Scroll-spy anchors: invisible bands driving the 6-dot active state (left edge, no hit area) */
.scene-spy-anchor {
  position: absolute;
  left: 0;
  width: 2px;
  pointer-events: none;
  z-index: 5;
}

/* =========================================================
   FLOATING TOP NAVIGATION
   ========================================================= */
.top-nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.nav-container {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 980px;
  padding: 8px 20px;
  background: rgba(14, 18, 28, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

/* Pure static brand lockup: not an interactive button — no pointer cursor,
   no hover transition, no plate, pill, or ring styling */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Dennis 2026-09-03: header brand is the full transparent SoDog Flip lockup
   (yellow sticker puppy icon + "SoDog Flip" wordmark) as a pure static brand
   mark — natural aspect ratio, no button plate, no border, no box-shadow */
.nav-brand-full {
  height: clamp(30px, 2.8vw, 40px);
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.nav-menu {
  display: flex;
  gap: clamp(14px, 2.5vw, 28px);
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #FFC043;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1vw, 10px) clamp(14px, 2vw, 24px);
  border-radius: 999px;
  background: radial-gradient(circle at 50% 25%, rgba(255, 215, 80, 0.52) 0%, rgba(255, 145, 10, 0.38) 65%, rgba(210, 85, 0, 0.26) 100%);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1.6px solid rgba(255, 255, 255, 0.75);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 165, 45, 0.5), inset 0 1.5px 6px rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 200, 60, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-cta-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 28px rgba(255, 195, 75, 0.85);
  border-color: rgba(255, 255, 255, 0.95);
}

/* Floating Navigation Dots — canonical 6-scene rail */
.scene-nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

.scene-nav-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.scene-nav-dots .dot:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.15);
}

.scene-nav-dots .dot.active {
  background: #F5A623;
  border: 2px solid #FFFFFF;
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.75);
}

/* =========================================================
   SECTION LUMINOUS DIVIDERS (client-approved, replaces mist bridges)
   Razor-thin luminous horizon line with soft amber ambient glow.
   ========================================================= */
.section-luminous-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
  z-index: 20;
  pointer-events: none;
}

.mist-sunset-footer {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(60px, 8vw, 140px);
  pointer-events: none;
  z-index: 8;
  background: linear-gradient(to bottom, transparent 0%, rgba(253, 244, 237, 0.4) 40%, rgba(253, 244, 237, 0.9) 90%, #FDF4ED 100%);
}

/* =========================================================
   ANIMATED DRIFTING FOG PARTICLES (SOFT & NATURAL)
   Retained: .fog-embers still decorates the 4-6 bottom bridge.
   ========================================================= */
.fog-drift-layer {
  position: absolute;
  top: -25%;
  left: -20%;
  width: 140%;
  height: 150%;
  pointer-events: none;
}

.fog-embers {
  background: radial-gradient(ellipse 60% 45% at 50% 40%, rgba(235, 125, 60, 0.18), transparent 70%);
  filter: blur(16px);
  animation: driftCloudsFront 15s ease-in-out infinite alternate;
}

@keyframes driftCloudsDeep {
  0% { transform: translateX(-8%) scaleY(0.9) scaleX(1.05); opacity: 0.7; }
  50% { transform: translateX(6%) scaleY(1.15) scaleX(0.98); opacity: 1; }
  100% { transform: translateX(10%) scaleY(0.95) scaleX(1.02); opacity: 0.75; }
}

@keyframes driftCloudsFront {
  0% { transform: translateX(8%) scaleY(1.1); opacity: 0.6; }
  50% { transform: translateX(-6%) scaleY(0.88); opacity: 0.95; }
  100% { transform: translateX(-10%) scaleY(1.05); opacity: 0.65; }
}

/* =========================================================
   UNIFIED CONSISTENT GRID & BUTTONS
   ========================================================= */
.unified-content-left {
  position: absolute;
  left: clamp(24px, 8.5vw, 120px);
  pointer-events: auto;
}

.btn-sodog-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.3vw, 18px) clamp(24px, 2.8vw, 44px);
  background: radial-gradient(circle at 50% 25%, rgba(255, 215, 80, 0.48) 0%, rgba(255, 145, 10, 0.32) 65%, rgba(210, 85, 0, 0.22) 100%);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1.8px solid rgba(255, 255, 255, 0.75);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 900;
  font-size: clamp(13px, 1.65vw, 22px);
  letter-spacing: -0.01em;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), 0 0 28px rgba(255, 165, 45, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 200, 60, 0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  animation: floatGoldButton 4.2s ease-in-out infinite;
}

.btn-sodog-gold:hover {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), 0 0 42px rgba(255, 195, 75, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
}

.btn-sodog-gold .cta-arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.22s ease;
}

.btn-sodog-gold:hover .cta-arrow {
  transform: translateX(4px);
}

@keyframes floatGoldButton {
  0%, 100% {
    transform: translateY(0px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), 0 0 28px rgba(255, 165, 45, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.85);
  }
  50% {
    transform: translateY(-7px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 38px rgba(255, 185, 65, 0.8), inset 0 2px 10px rgba(255, 255, 255, 0.95);
  }
}

/* =========================================================
   MODULE 1: HERO (Scene 1 — Boy at Door)
   ========================================================= */
.hero-content-block {
  top: 50%;
  transform: translateY(-50%);
  width: clamp(220px, 30vw, 420px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.4vw, 20px);
}

/* Clean, unboxed editorial hero typography (client reference msg_4976) */
.hero-title {
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.1;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(45, 22, 8, 0.3);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-weight: 700;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: #4A2E18;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
  max-width: 520px;
}

/* =========================================================
   MODULE 2+3: UNIFIED FIGMA CANVAS (Island + Magic Canyon)
   ========================================================= */
/* Scene 2 primary CTA: centered in the open golden sky above the island (calibrated for full-width clouds) */
.island-cta-block {
  position: absolute;
  top: clamp(62px, 16vw, 240px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  text-align: center;
}

.canyon-interactive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rocks-center-halo {
  position: absolute;
  left: 50%;
  top: 52.7%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 220, 0.35) 0%, rgba(255, 215, 120, 0.15) 55%, transparent 75%);
  border-radius: 999px;
  padding: clamp(8px, 1.6vw, 24px) clamp(14px, 2.2vw, 36px);
  pointer-events: none;
}

.rocks-center-headline-unified {
  text-align: center;
  font-weight: 900;
  font-size: clamp(13px, 2.4vw, 36px);
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 215, 100, 0.6);
}

.stone-cloud-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--font-family);
  font-weight: 900;
  font-size: clamp(10px, 1.2vw, 17px);
  line-height: 1.15;
  color: #FFFFFF;
  background: radial-gradient(circle at 50% 25%, rgba(255, 215, 80, 0.48) 0%, rgba(255, 145, 10, 0.32) 65%, rgba(210, 85, 0, 0.22) 100%);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1.8px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: clamp(6px, 0.8vw, 12px) clamp(12px, 1.5vw, 22px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), 0 0 24px rgba(255, 165, 45, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 14px rgba(255, 200, 60, 0.75);
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stone-cloud-pill:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), 0 0 36px rgba(255, 195, 75, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
}

/* 100% Mathematically Verified Visual Centers of the 5 Magic Stones */
.stone-tc-u { left: 50.0%; top: 62.3%; }
.stone-tl-u { left: 30.9%; top: 66.5%; }
.stone-tr-u { left: 69.4%; top: 70.6%; }
.stone-bl-u { left: 30.9%; top: 79.3%; }
.stone-br-u { left: 67.5%; top: 82.7%; }

/* =========================================================
   MODULE 4+5: UNIFIED FIGMA CANVAS (Dragons + Book)
   ========================================================= */
/* Scene 4: redundant "Start Exploring" button removed per client directive (msg_4969).
   The atmospheric dragon illustration and campfire animation breathe unobstructed. */

.book-interactive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* 100% TRANSPARENT overlays sitting exactly on the painted chapter tabs
   and painted Peek Inside button. NO visible HTML buttons or text.
   Only clean clickable hit areas over the artwork. */
.chapter-hotspot {
  position: absolute;
  width: 6.4%;
  height: 4.2%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  z-index: 12;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.chapter-hotspot-1 { left: 92.8%; top: 62.5%; }
.chapter-hotspot-2 { left: 91.9%; top: 69.1%; }
.chapter-hotspot-3 { left: 90.9%; top: 75.6%; }
.chapter-hotspot-4 { left: 89.9%; top: 82.2%; }

/* Transparent hotspot on the painted Peek Inside button */
.chapter-hotspot-peek {
  left: 74.5%;
  top: 83.5%;
  width: 16%;
  height: 5.5%;
  border-radius: 9999px;
}

.chapter-hotspot:hover,
.chapter-hotspot:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px rgba(255, 215, 80, 0.4);
}

.chapter-hotspot:focus-visible {
  outline: 2px solid rgba(255, 215, 80, 0.6);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   MODULE 6: SUNSET ROAD (Scene 6) — FLOATING CLOUD BADGES
   ========================================================= */
.trust-cloud-container {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.8vw, 24px);
  pointer-events: none;
  z-index: 30; /* Elevated above background mist so cards stay 100% crisp and un-obscured */
}

.cloud-badge-card {
  position: relative;
  background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.28) 0%, rgba(240, 248, 255, 0.16) 60%, rgba(210, 230, 255, 0.1) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 36px;
  padding: clamp(12px, 1.6vw, 22px) clamp(10px, 1.2vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(6px, 0.9vw, 12px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), inset 0 2px 6px rgba(255, 255, 255, 0.6), 0 0 24px rgba(255, 255, 255, 0.15);
  pointer-events: auto;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: cloudDrift 6s ease-in-out infinite alternate;
}

.cbc-1 { animation-delay: 0s; }
.cbc-2 { animation-delay: 1.5s; }
.cbc-3 { animation-delay: 3s; }
.cbc-4 { animation-delay: 4.5s; }

.cloud-badge-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), inset 0 2px 8px rgba(255, 255, 255, 0.8), 0 0 32px rgba(255, 215, 100, 0.5);
  border-color: rgba(255, 225, 140, 0.85);
}

@keyframes cloudDrift {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(3px); }
}

.cloud-orb-wrap {
  width: clamp(64px, 7.5vw, 110px);
  height: clamp(64px, 7.5vw, 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cloud-badge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(255, 192, 67, 0.55));
  transition: transform 0.3s ease;
}

.cloud-badge-card:hover .cloud-badge-img {
  transform: scale(1.1) rotate(3deg);
}

.cloud-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cloud-title {
  font-family: var(--font-family);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 22px);
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 255, 255, 0.3);
}

.cloud-subtitle {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: clamp(11px, 1.15vw, 15px);
  line-height: 1.3;
  color: #FFF3E6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.sign-cta-block {
  position: absolute;
  left: 70.17%;
  top: 71%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3px, 0.9vw, 14px);
  pointer-events: auto;
}

.sign-title {
  font-weight: 900;
  font-size: clamp(13px, 2.9vw, 44px);
  line-height: 1.2;
  color: #FFFFFF;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
}

/* =========================================================
   MODULE 7: AUTHENTIC FIGMA FOOTER (Scene 7)
   ========================================================= */
.footer-snap {
  background-color: #FDF4ED;
  color: #2D1E12;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.footer-inner-container {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(6px, 1.4vw, 18px);
  position: relative;
  z-index: 10;
  padding: clamp(16px, 3vw, 40px) 20px;
}

.footer-logo {
  font-family: var(--font-family);
  font-weight: 900;
  font-size: clamp(24px, 4.2vw, 54px);
  color: #FF7B25;
  letter-spacing: -0.02em;
}

.footer-nav,
.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(5px, 0.9vw, 12px);
}

.footer-nav a,
.footer-socials a {
  color: #3C2B1D;
  text-decoration: none;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: clamp(10px, 1.25vw, 18px);
  line-height: 1.3;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav a:hover,
.footer-socials a:hover {
  color: #FF7B25;
  transform: translateY(-1px);
}

.dot-sep {
  color: #CBB4A1;
  font-size: 11px;
}

.footer-copyright {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: clamp(9px, 1.1vw, 15px);
  color: #8C7562;
  margin-top: 2px;
}

/* Approved fledgling chick mascot (Package C replacement, geometry preserved) */
.footer-mascot-img {
  position: absolute;
  right: clamp(8px, 2.8vw, 40px);
  bottom: clamp(-10px, -1.8vw, -30px);
  width: clamp(80px, 15vw, 220px);
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}

.footer-snap:hover .footer-mascot-img {
  transform: translateY(-6px);
}

/* =========================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================================= */
@media (max-width: 768px) {
  .top-nav {
    position: static;
    padding: 6px 8px;
    background: #080A10;
  }

  .nav-container {
    padding: 4px 8px;
    max-width: calc(100% - 12px);
    margin: 0 auto;
  }

  .nav-logo {
    gap: 6px;
  }

  .nav-brand-full {
    height: 26px;
    width: auto;
  }

  .nav-cta-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .nav-menu,
  .scene-nav-dots {
    display: none;
  }

  .unified-content-left {
    left: clamp(14px, 4vw, 28px);
  }

  .hero-content-block {
    width: 62vw;
    gap: 6px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 7.2vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: clamp(0.85rem, 3.4vw, 1.05rem);
    margin-bottom: 1rem;
  }

  .trust-cloud-container {
    top: clamp(40px, 11vw, 70px);
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 90%;
    box-sizing: border-box;
  }

  .cloud-badge-card {
    padding: 6px 3px;
    border-radius: 16px;
    gap: 2px;
    box-sizing: border-box;
  }

  .cloud-orb-wrap {
    width: 36px;
    height: 36px;
  }

  .cloud-title {
    font-size: 10.5px;
  }

  .cloud-subtitle {
    font-size: 8px;
    line-height: 1.15;
  }

  .sign-cta-block {
    top: 74%;
    left: 68%;
  }

  /* Scene 4: "Start Exploring" removed; no mobile styles needed */

  /* Scene 5: interactive layer (page surface, tabs) is defined responsively
     in scene_refinements.css; the removed preview CTA / cloud pod mobile
     rules are gone with their desktop counterparts. */

  .stone-cloud-pill {
    padding: 2px 6px;
    font-size: 8px;
  }
}

/* =========================================================
   FULL-SCREEN IN-PAGE CHAPTER READER MODAL (FlipHTML5 iframe)
   Opened by the chapter hotspots 1-4 and the in-book Preview CTA.
   Replaces the former target="_blank" new-tab behavior: the demo
   book opens in this same page and "Back to Story" / Close (X)
   returns to the open book without reloading. Highest stacking
   layer on the page (z-index 2000 > .top-nav's 1000).
   ========================================================= */
.reader-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Hidden state: display:none keeps the iframe out of layout and hit-testing;
   .reader-modal-open (toggled by app.js) drives the fade transition. */
.reader-modal.hidden {
  display: none;
}

.reader-modal.reader-modal-open {
  animation: readerModalFadeIn 0.28s ease both;
}

.reader-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reader-modal-panel {
  position: relative;
  width: min(1180px, 96vw);
  height: min(94vh, 1200px);
  margin: auto;
  display: flex;
  flex-direction: column;
  background: #0B0E16;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 200, 70, 0.18);
  animation: readerPanelRiseIn 0.28s ease both;
}

.reader-modal-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-left: calc(14px + env(safe-area-inset-left));
  padding-right: calc(14px + env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.98) 0%, rgba(11, 14, 22, 0.96) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.reader-back-btn,
.reader-close-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 25%, rgba(255, 225, 100, 0.42) 0%, rgba(255, 155, 20, 0.28) 70%, rgba(220, 90, 0, 0.20) 100%);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 200, 70, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.reader-back-btn {
  padding: 8px 18px;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.02em;
}

.reader-back-arrow {
  font-size: 1.15em;
  line-height: 1;
}

.reader-back-btn:hover,
.reader-back-btn:focus-visible,
.reader-close-btn:hover,
.reader-close-btn:focus-visible {
  transform: scale(1.06);
  border-color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 26px rgba(255, 215, 90, 0.75);
}

.reader-back-btn:focus-visible,
.reader-close-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.reader-back-btn:active,
.reader-close-btn:active {
  transform: scale(0.96);
}

.reader-close-btn {
  margin-left: auto;
  padding: 8px 13px;
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1;
}

.reader-chapter-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-weight: 800;
  font-size: clamp(12px, 1.2vw, 15px);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 10px 10px;
  padding-left: calc(10px + env(safe-area-inset-left));
  padding-right: calc(10px + env(safe-area-inset-right));
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

#reader-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: #FFFFFF;
  display: block;
}

@keyframes readerModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes readerPanelRiseIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile: reader fills the whole viewport (100vw x 100svh) with
   safe-area padding handled by the topbar and iframe wrap insets. */
@media (max-width: 768px) {
  .reader-modal-panel {
    width: 100vw;
    /* Fallback first, then small-viewport units win where supported so the
       reader never under-runs behind mobile browser toolbars. */
    height: 100vh;
    height: 100svh;
    border-radius: 0;
    border: none;
  }

  .reader-back-btn {
    padding: 7px 12px;
    font-size: 12px;
  }

  .reader-close-btn {
    padding: 7px 11px;
    font-size: 12px;
  }

  .reader-chapter-label {
    font-size: 10.5px;
  }
}

/* =========================================================
   SCENE TRANSITION BRIDGES (Generated via GPT-Image 2.5 SDK)
   Seamless organic overlays: 100% full-width, centered on seam
   ========================================================= */
.seam-bridge-marker {
  position: relative;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
  z-index: 25;
  pointer-events: none;
}

.seam-bridge-marker .bridge-inner {
  position: absolute;
  left: 0;
  width: 100%;
  top: 0;
  transform: translateY(-50%);
  display: block;
  pointer-events: none;
}

.seam-bridge-marker .bridge-img,
.bridge-internal-seam .bridge-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* 1 -> 2: Golden sunset clouds bridge (new GPT-Image 2.5 asset, full width, natural soft curves) */
.seam-1-2 {
  z-index: 25;
}
.seam-1-2 .bridge-inner {
  aspect-ratio: 2171 / 414;
}
.seam-1-2 .bridge-img {
  filter: drop-shadow(0 4px 16px rgba(255, 200, 120, 0.25));
}

/* 3 -> 4: Forest arch with golden mist & fireflies (full width) */
.seam-3-4 {
  z-index: 25;
}
.seam-3-4 .bridge-inner {
  aspect-ratio: 1817 / 564;
}
.seam-3-4 .bridge-img {
  filter: drop-shadow(0 4px 16px rgba(20, 30, 20, 0.25));
}

/* 4 -> 5: Internal seam at 50% between Dragons and Storybook (100% full-width, cut in half to 294px height, perfectly centered on seam) */
.bridge-internal-seam {
  position: absolute;
  left: 0;
  width: 100%;
  top: 50%; /* EXACT 50% CENTER ON SEAM LINE */
  transform: translateY(-50%);
  aspect-ratio: 1774 / 294;
  z-index: 15;
  pointer-events: none;
}
.bridge-internal-seam .bridge-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.98;
}

/* 5 -> 6: Lavender twilight mist with stardust (100% full-width, cut in half to 210px height, delicate soft glow) */
.seam-5-6 {
  z-index: 15; /* Behind cards (.trust-cloud-container is z-index: 30) */
}
.seam-5-6 .bridge-inner {
  aspect-ratio: 2171 / 210;
}
.seam-5-6 .bridge-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.72; /* Soft ethereal twilight mist, delicate and light */
}
