/* ==========================================================================
   Braitoli 3D Painting — Adaptive Theme (Light / Dark) Stylesheet
   Default Theme: Light (Studio Daylight)
   Rules: Strictly NO !important. Uses natural CSS cascade and variables.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400;1,6..72,600&display=swap');

/* ==========================================================================
   Theme Variables System (Default: Dark Theme)
   macOS / VisionOS Liquid Acrylic Glass & Deep Space Contrast
   ========================================================================== */
:root,
[data-theme="dark"] {
  --bg-base: #09071A;
  --bg-base-rgb: 9, 7, 26;
  --bg-gradient: radial-gradient(circle at 50% 20%, #1A1438 0%, #100D26 50%, #080616 100%);
  --text-primary: #ffffff;       /* Pure white - crystal clear */
  --text-secondary: #e2e8f0;     /* Bright silver slate - highly readable */
  --text-tertiary: #cbd5e1;      /* Light silver slate */
  --text-faint: #94a3b8;

  /* macOS Liquid Acrylic Glass (Dark Mode) */
  --card-bg: rgba(18, 18, 30, 0.78);
  --card-backdrop: blur(32px) saturate(180%);
  --card-border: rgba(255, 255, 255, 0.16);
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.20);
  --hud-bg: rgba(14, 11, 32, 0.85);
  --hud-border: rgba(255, 255, 255, 0.18);
  --hud-shadow: 0 10px 30px rgba(0, 0, 0, 0.40), inset 0 1px 1px rgba(255, 255, 255, 0.18);

  --ambient-glow-1: rgba(168, 85, 247, 0.28);
  --ambient-glow-2: rgba(0, 245, 212, 0.22);
  --ambient-glow-3: rgba(244, 63, 94, 0.22);
  --ambient-glow-4: rgba(251, 191, 36, 0.18);

  --c-glass-pill: rgba(255, 255, 255, 0.08);
  --c-glass-pill-border: rgba(255, 255, 255, 0.18);
  --c-glass-pill-active: rgba(255, 255, 255, 0.22);
  --c-glass-pill-text: #FFFFFF;
  --c-glass-pill-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);

  --stage-bg: radial-gradient(circle at 50% 20%, #1A1438 0%, #100D26 50%, #080616 100%);
  --rail-bg: rgba(18, 18, 30, 0.82);
  --rail-border: rgba(255, 255, 255, 0.18);
  --rail-label-bg: rgba(22, 18, 48, 0.95);
  --rail-label-color: #FFFFFF;
  --footer-bg: rgba(9, 7, 26, 0.94);
  --footer-border: rgba(255, 255, 255, 0.14);

  --grad-primary: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
  --grad-hero: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-base-rgb: 248, 250, 252;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  --text-primary: #090910;       /* deep ink black, crystal clear, NEVER washed out! */
  --text-secondary: #334155;     /* Deep slate for readable paragraph bodies */
  --text-tertiary: #475569;      /* Badges, subtitles, secondary specs */
  --text-faint: #64748b;

  /* macOS / VisionOS Liquid Acrylic Glass (Light Mode) */
  --card-bg: rgba(255, 255, 255, 0.78);
  --card-backdrop: blur(32px) saturate(190%);
  --card-border: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.10);
  --hud-bg: rgba(255, 255, 255, 0.84);
  --hud-border: rgba(255, 255, 255, 0.90);
  --hud-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);

  --ambient-glow-1: rgba(255, 138, 150, 0.14);
  --ambient-glow-2: rgba(254, 243, 199, 0.20);
  --ambient-glow-3: rgba(251, 191, 36, 0.14);
  --ambient-glow-4: rgba(226, 217, 243, 0.15);

  --c-glass-pill: rgba(15, 23, 42, 0.05);
  --c-glass-pill-border: rgba(15, 23, 42, 0.12);
  --c-glass-pill-active: #FFFFFF;
  --c-glass-pill-text: #090910;
  --c-glass-pill-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);

  --stage-bg: radial-gradient(circle at 50% 25%, #FFFFFF 0%, #EEF2F6 60%, #E2E8F0 100%);
  --rail-bg: rgba(255, 255, 255, 0.88);
  --rail-border: rgba(255, 255, 255, 0.92);
  --rail-label-bg: #FFFFFF;
  --rail-label-color: #090910;
  --footer-bg: rgba(248, 250, 252, 0.96);
  --footer-border: rgba(226, 232, 240, 0.9);

  --grad-primary: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --grad-hero: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
}

/* Design Tokens */
:root {
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-editorial: 'Newsreader', Georgia, serif;

  /* Playful & Joyful Gradients */
  --grad-primary: linear-gradient(135deg, #FF6B9D 0%, #C084FC 45%, #38BDF8 100%);
  --grad-gold: linear-gradient(135deg, #FDE047 0%, #FB923C 100%);
  --grad-cyber: linear-gradient(135deg, #34D399 0%, #00F5D4 50%, #38BDF8 100%);
  --grad-cosmic: linear-gradient(135deg, #C084FC 0%, #6366F1 100%);
  --grad-kids: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --grad-pro: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);

  /* Radius & Transitions */
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --nav-height: 72px;
  --trans-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  max-width: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-base);
}

body {
  max-width: 100%;
  overflow-x: clip;
  display: block;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: color 0.3s ease, background 0.3s ease;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Ambient Background Glow Orbs (Soft, Dreamy, Friendly Studio Atmosphere)
   ========================================================================== */
.ambient-orbs {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ambient-orb--violet {
  top: 5%;
  left: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--ambient-glow-1) 0%, transparent 70%);
  filter: blur(100px);
}

.ambient-orb--cyan {
  top: 40%;
  right: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--ambient-glow-2) 0%, transparent 70%);
  filter: blur(130px);
}

.ambient-orb--rose {
  bottom: 10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--ambient-glow-3) 0%, transparent 70%);
  filter: blur(110px);
}

.ambient-orb--amber {
  top: 65%;
  right: 25%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--ambient-glow-4) 0%, transparent 70%);
  filter: blur(120px);
}

/* ==========================================================================
   Fixed Full-Screen WebGL Canvas Stage
   ========================================================================== */
.webgl-world-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: var(--stage-bg);
  transition: background 0.4s ease;
  contain: strict;
}

.webgl-world-stage__canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  pointer-events: auto; /* OrbitControls direct dragging */
  cursor: grab;
  touch-action: pan-y;
}

.webgl-world-stage__canvas:active {
  cursor: grabbing;
}

.reveal-trail-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.reveal-brush-container {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  display: none;
  will-change: transform, opacity;
}

.reveal-brush-svg {
  width: 66px;
  height: 66px;
  display: block;
  filter: drop-shadow(2px 5px 6px rgba(0, 0, 0, 0.35));
  transform-origin: 19.75px 52.60px;
  transition: transform 150ms ease;
}

/* ==========================================================================
   Foreground Content Layer (Pass-through for mouse interactions)
   ========================================================================== */
.hud-layer {
  position: relative;
  z-index: 10;
  pointer-events: none; /* Allows dragging empty space to rotate 3D canvas */
}

/* All interactive cards, navigation, and buttons receive pointer events */
.site-header,
.chapter-rail,
.hero-box,
.gallery-actions,
.feature-card,
.mode-card,
.cta-glass-card,
.site-footer,
a,
button {
  pointer-events: auto;
}

/* ==========================================================================
   Top Sticky Header HUD (Clean, Balanced, Braitoli Standard Brand)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: var(--hud-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border-bottom: 1px solid var(--hud-border);
  box-shadow: var(--hud-shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 28px;
  gap: 16px;
}

/* Braitoli Brand Logo & Link */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.25s var(--trans-smooth);
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo-icon {
  transform: rotate(12deg) scale(1.05);
}

.brand-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.25s var(--trans-smooth), box-shadow 0.25s var(--trans-smooth);
}

.brand-link:hover .brand-app-icon {
  transform: scale(1.06) rotate(3deg);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
}

.brand-text__gradient,
.brand-text .gradient {
  background: linear-gradient(309deg, rgb(32, 118, 255), rgb(156, 70, 255));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  margin-left: 6px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .brand-badge {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
}

/* Center Chapter Navigation (Segmented Pill Capsule) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  transition: all 0.25s var(--trans-smooth);
  white-space: nowrap;
}

.site-nav__link:hover {
  color: #0f172a;
  background: rgba(124, 58, 237, 0.08);
}

.site-nav__link.is-active,
.site-nav__link.active {
  color: #090910;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.10);
  font-weight: 800;
}

[data-theme="dark"] .site-nav__link {
  color: #e2e8f0;
}

[data-theme="dark"] .site-nav__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .site-nav__link.is-active,
[data-theme="dark"] .site-nav__link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.20);
  font-weight: 800;
}

/* Right Controls: Theme + Atmosphere + Language */
.site-header__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Header iOS CTA Button (Replacing theme toggle) */
.header-ios-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s var(--trans-smooth);
  font-family: var(--font-body);
  white-space: nowrap;
}

.header-ios-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
}

.header-ios-btn:hover {
  background: var(--grad-primary);
  border-color: rgba(167, 139, 250, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

/* Theme Toggle Button (Retained for backward-compat if present) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s var(--trans-smooth);
  font-family: var(--font-body);
}

.theme-toggle-btn:hover {
  color: #0f172a;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .theme-toggle-btn {
  color: #e2e8f0;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Atmosphere Switcher Pill */
/* Atmosphere Switcher Pill */
/* Language Selector Dropdown (Modern Glassmorphic Menu with 20 Languages) */
.lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  user-select: none;
  z-index: 1100;
}

.lang-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px 0 10px;
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.25s var(--trans-smooth), border-color 0.25s var(--trans-smooth), box-shadow 0.25s var(--trans-smooth), transform 0.25s var(--trans-smooth);
  outline: none;
  white-space: nowrap;
}

.lang-dropdown__trigger:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.lang-dropdown__trigger:focus-visible {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
}

.lang-dropdown.is-open .lang-dropdown__trigger {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.lang-dropdown__globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}

.lang-dropdown__globe svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.lang-dropdown__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-dropdown__current {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-dropdown__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform 0.25s var(--trans-smooth);
  margin-left: 2px;
}

.lang-dropdown__chevron svg {
  width: 11px;
  height: 11px;
}

.lang-dropdown.is-open .lang-dropdown__chevron {
  transform: rotate(180deg);
}

/* Dropdown Panel Menu */
.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  max-width: calc(100vw - 28px);
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hud-bg);
  border: 1px solid var(--border-glass-bright);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s var(--trans-smooth), transform 0.22s var(--trans-smooth), visibility 0.22s ease;
  z-index: 1200;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.35) transparent;
}

.lang-dropdown__menu::-webkit-scrollbar {
  width: 5px;
}

.lang-dropdown__menu::-webkit-scrollbar-track {
  background: transparent;
}

.lang-dropdown__menu::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.35);
  border-radius: 999px;
}

.lang-dropdown__menu::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.6);
}

.lang-dropdown.is-open .lang-dropdown__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Dropdown Items */
.lang-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  outline: none;
}

.lang-dropdown__item:hover,
.lang-dropdown__item:focus-visible,
.lang-dropdown__item.is-focused {
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-primary);
  transform: translateX(2px);
}

.lang-dropdown__item.is-active,
.lang-dropdown__item[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(99, 102, 241, 0.18));
  color: #c4b5fd;
  font-weight: 800;
  border-color: rgba(167, 139, 250, 0.28);
}

[data-theme="light"] .lang-dropdown__item.is-active,
[data-theme="light"] .lang-dropdown__item[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(124, 58, 237, 0.12));
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.3);
}

.lang-dropdown__item-flag {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-dropdown__item-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.lang-dropdown__item-native {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-dropdown__item-english {
  font-size: 0.70rem;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-dropdown__item-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b5cf6;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.lang-dropdown__item.is-active .lang-dropdown__item-check,
.lang-dropdown__item[aria-selected="true"] .lang-dropdown__item-check {
  opacity: 1;
  transform: scale(1);
}

/* Fallback for old lang-pills if ever present */
.lang-pills {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  border-radius: var(--radius-full);
  padding: 4px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s var(--trans-smooth);
}

.flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1;
}

.lang-pill:hover {
  color: #0f172a;
}

.lang-pill.is-active,
.lang-pill.active {
  background: #FFFFFF;
  color: #090910;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  font-weight: 800;
}

[data-theme="dark"] .lang-pill {
  color: #e2e8f0;
}

[data-theme="dark"] .lang-pill:hover {
  color: #ffffff;
}

[data-theme="dark"] .lang-pill.is-active,
[data-theme="dark"] .lang-pill.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.40);
  font-weight: 800;
}

/* Hero App Showcase Badge */
.hero-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 6px;
  border-radius: 20px;
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--hud-shadow);
  margin-bottom: 18px;
  text-decoration: none;
  transition: transform 0.25s var(--trans-smooth), box-shadow 0.25s var(--trans-smooth);
}

.hero-app-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.hero-app-badge__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.hero-app-badge__meta {
  display: flex;
  flex-direction: column;
}

.hero-app-badge__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-app-badge__subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* CTA Chapter App Icon (Enlarged & Prominent for Brand Identity) */
.cta-app-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.cta-app-icon {
  width: 168px;
  height: 168px;
  border-radius: 38px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 44px rgba(124, 58, 237, 0.42), 0 0 28px rgba(94, 74, 232, 0.24);
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.cta-app-icon:hover {
  transform: scale(1.05) rotate(1.5deg);
  box-shadow: 0 22px 56px rgba(124, 58, 237, 0.55), 0 0 36px rgba(94, 74, 232, 0.35);
}

@media (max-width: 768px) {
  .cta-app-icon {
    width: 124px;
    height: 124px;
    border-radius: 28px;
  }
}

/* ==========================================================================
   Floating Chapter Rail (Hidden)
   ========================================================================== */
.chapter-rail {
  display: none;
  visibility: hidden;
  pointer-events: none;
}

.chapter-rail__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 8px;
  transition: all 0.25s var(--trans-smooth);
  width: 100%;
}

.chapter-rail__item:hover {
  transform: translateX(-3px);
}

.chapter-rail__dot {
  order: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748B;
  flex-shrink: 0;
  transition: all 0.25s var(--trans-smooth);
}

[data-theme="dark"] .chapter-rail__dot {
  background: #94A3B8;
}

.chapter-rail__item:hover .chapter-rail__dot {
  background: #7C3AED;
  transform: scale(1.25);
}

[data-theme="dark"] .chapter-rail__item:hover .chapter-rail__dot {
  background: #c084fc;
  transform: scale(1.25);
}

.chapter-rail__item.is-active .chapter-rail__dot,
.chapter-rail__item.active .chapter-rail__dot {
  width: 10px;
  height: 10px;
  background: #7C3AED;
  box-shadow: 0 0 10px #7C3AED, 0 0 18px rgba(124, 58, 237, 0.45);
  transform: scale(1.15);
}

[data-theme="dark"] .chapter-rail__item.is-active .chapter-rail__dot,
[data-theme="dark"] .chapter-rail__item.active .chapter-rail__dot {
  background: #c084fc;
  box-shadow: 0 0 10px #c084fc, 0 0 18px rgba(192, 132, 252, 0.55);
  transform: scale(1.15);
}

.chapter-rail__label {
  order: 2;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  white-space: nowrap;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.chapter-rail__item:hover .chapter-rail__label {
  color: #0f172a;
}

.chapter-rail__item.is-active .chapter-rail__label,
.chapter-rail__item.active .chapter-rail__label {
  color: #090910;
  font-weight: 800;
}

[data-theme="dark"] .chapter-rail__label {
  color: #cbd5e1;
}

[data-theme="dark"] .chapter-rail__item:hover .chapter-rail__label {
  color: #FFFFFF;
}

[data-theme="dark"] .chapter-rail__item.is-active .chapter-rail__label,
[data-theme="dark"] .chapter-rail__item.active .chapter-rail__label {
  color: #FFFFFF;
  font-weight: 800;
}

/* ==========================================================================
   Chapter Sections Common Layout
   ========================================================================== */
.chapter-section {
  min-height: 100vh;
  /* Small-viewport unit: on mobile the browser chrome must not make a section
     taller than the screen it is measured against. */
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 32px;
  box-sizing: border-box;
}

.chapter-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Typography Tokens */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  color: #4338ca;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 16px;
  transition: all 0.25s var(--trans-smooth);
}

[data-theme="dark"] .eyebrow-badge {
  background: rgba(124, 58, 237, 0.32);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #e9d5ff;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 680px;
}

.gradient-text {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #7c3aed;
  display: inline-block;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c084fc;
  display: inline-block;
}

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

.text-center .eyebrow-badge {
  margin-left: auto;
  margin-right: auto;
}

.text-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Chapter 01: Hero / Genesis
   ========================================================================== */
.hero-chapter {
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 100px;
}

/* The first screen belongs entirely to the 3D stage — on phones as much as on
   desktop — so the hero copy starts one full viewport down. `vh` (the large
   viewport on mobile) is deliberate: it keeps the copy below the fold even when
   the browser chrome retracts. The two-class selector outranks the
   `.chapter-section { padding: ... }` shorthands in the breakpoints below, which
   would otherwise reset this to a few dozen pixels. */
.chapter-section.hero-chapter {
  padding-top: 100vh;
}

.hero-box {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--card-shadow);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #7c3aed;
}

[data-theme="dark"] .hero-title .gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c084fc;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

.btn-primary-gradient {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.35);
  transition: transform 0.25s var(--trans-smooth), box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 48px rgba(124, 58, 237, 0.5);
}

.btn-glass-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-full);
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  color: #334155;
  font-weight: 700;
  font-size: 0.95rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-glass-secondary:hover {
  color: #0f172a;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-glass-secondary {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
}

[data-theme="dark"] .btn-glass-secondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-trust-bar,
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--c-glass-pill-border);
}

.trust-badge,
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .trust-badge,
[data-theme="dark"] .trust-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.trust-badge:hover,
.trust-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.trust-badge__icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
}

/* ==========================================================================
   Chapter 02: 3D Sculptures Gallery (selector lives on the curved screens in the 3D canvas)
   ========================================================================== */
.gallery-chapter {
  contain: layout;
  /* Stretch the container so the copy can hug the top and bottom edges. */
  align-items: stretch;
}

/* Header on top, controls at the bottom: the middle band stays clear so the
   statue rendered on the fixed 3D canvas is never covered by text. */
.gallery-chapter .chapter-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.gallery-header {
  margin-bottom: 0;
  position: relative;
  z-index: 0;
}

/* On short, wide screens the 3D stage rises behind this copy. A soft scrim in
   the page background colour keeps it readable without hiding the sculpture. */
.gallery-header::before {
  content: "";
  position: absolute;
  inset: -26px -32px -18px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--bg-base-rgb), 0.90) 0%,
    rgba(var(--bg-base-rgb), 0.74) 46%,
    rgba(var(--bg-base-rgb), 0) 76%
  );
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 84px;
}

.gallery-hint {
  max-width: 460px;
  min-height: 44px;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Defensive stability constraints for dossier & specs components */
.statue-dossier-card,
.statue-info-panel {
  min-height: 220px;
  contain: layout style;
  box-sizing: border-box;
}

.statue-specs-pills {
  min-height: 48px;
}

.btn-inspect {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s var(--trans-smooth);
}

.btn-inspect:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.btn-inspect.is-active,
.btn-inspect.active {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.7);
  color: #7c3aed;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.28);
}

/* ==========================================================================
   Chapter 03: Graphics & Features (4 Radiant Glass Cards)
   ========================================================================== */
.features-header {
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s var(--trans-smooth);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.feature-icon-box--cyan {
  background: rgba(0, 245, 212, 0.15);
  color: #0D9488;
}

.feature-icon-box--purple,
.feature-icon-box--violet {
  background: rgba(124, 58, 237, 0.15);
  color: #7C3AED;
}

.feature-icon-box--green {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.feature-icon-box--amber {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-card__desc {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

/* ==========================================================================
   Chapter 04: Atelier / Creative Studio (Kids Mode vs Pro Mode)
   ========================================================================== */
.atelier-header {
  margin-bottom: 48px;
}

.atelier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.mode-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s var(--trans-smooth);
}

.mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.15);
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-badge--kids {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #D97706;
}

.mode-badge--pro {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #4338ca;
}

[data-theme="dark"] .mode-badge--pro {
  background: rgba(124, 58, 237, 0.30);
  border-color: rgba(192, 132, 252, 0.50);
  color: #c4b5fd;
}

.mode-card__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
}

.mode-card__desc {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.mode-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.mode-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mode-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.mode-check--kids {
  background: rgba(245, 158, 11, 0.2);
  color: #D97706;
}

.mode-check--pro {
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

[data-theme="dark"] .mode-check--pro {
  background: rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
}

/* ==========================================================================
   Chapter 05: Download Universe / CTA & Footer
   ========================================================================== */
.chapter-section.cta-chapter {
  padding-bottom: 100px;
}

.cta-glass-card {
  max-width: 860px;
  margin: 0 auto 80px;
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  box-shadow: var(--card-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cta-badges-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 8px;
}

.cta-download-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-download-qr {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
  color: var(--text-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s var(--trans-smooth);
}

.btn-store-pill:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.btn-store-pill--apple {
  background: var(--grad-primary);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.35);
}

.btn-store-pill--apple:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 48px rgba(124, 58, 237, 0.5);
}

.btn-store-pill--google {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  box-shadow: var(--card-shadow);
}

.btn-store-pill--google:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.btn-store-pill--coming-soon {
  opacity: 0.82;
  cursor: default;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
}

.btn-store-pill--coming-soon:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.store-pill-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #d8b4fe;
  line-height: 1.2;
  vertical-align: middle;
}

/* Two-line store pill label (used by the zh page). Without these the two spans
   run inline and the label wraps mid-word inside the pill. */
.btn-store-pill__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-store-pill__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-store-pill__sub {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.75;
}

.btn-store-pill__title {
  font-size: 0.98rem;
  font-weight: 800;
  white-space: nowrap;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
}

.scroll-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* Glassmorphic Footer */
.site-footer {
  border-top: 1px solid var(--footer-border);
  background: var(--footer-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 64px 32px calc(36px + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-footer__container {
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.site-footer__brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.site-footer__desc,
.site-footer__brand-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.site-footer__back-link,
.footer-return-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #4338ca;
  text-decoration: none;
  margin-top: 4px;
  transition: transform 0.2s ease;
}

[data-theme="dark"] .site-footer__back-link,
[data-theme="dark"] .footer-return-link {
  color: #c084fc;
}

.site-footer__back-link:hover,
.footer-return-link:hover {
  transform: translateX(-3px);
}

.site-footer__nav-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.site-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--text-primary);
}

[data-theme="dark"] .site-footer__links a {
  color: #cbd5e1;
}

[data-theme="dark"] .site-footer__links a:hover {
  color: #ffffff;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--footer-border);
  padding-top: 28px;
  font-size: 0.88rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Editorial Scrollytelling Typography
   ========================================================================== */
.editorial-serif {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #4338ca;
}

[data-theme="dark"] .editorial-serif {
  color: #c084fc;
}

.chapter-number-serif {
  font-family: var(--font-editorial);
  font-size: clamp(3.2rem, 7.5vw, 6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.05em;
  opacity: 0.35;
  color: var(--text-primary);
  margin-bottom: -12px;
  display: block;
}

[data-theme="dark"] .chapter-number-serif {
  opacity: 0.50;
  color: #ffffff;
}





/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
/* The header is the only row that can be squeezed by its own content; keep its
   flex children shrinkable so a long brand or language row never widens the page. */
.site-header__container,
.brand-link,
.site-header__controls {
  min-width: 0;
}

.brand-text {
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .site-nav {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small laptops & landscape tablets */
@media (max-width: 1024px) {
  .chapter-section {
    padding: 92px 28px;
  }

  .hero-box {
    padding: 40px 32px;
  }
}

/* Tablets: the header starts to crowd, and the 3D stage needs more room. */
@media (max-width: 900px) {
  .site-header__container {
    padding: 0 20px;
  }

  .brand-badge {
    font-size: 0.66rem;
    padding: 2px 7px;
    margin-left: 4px;
  }

  .section-subtitle {
    font-size: 1.05rem;
  }

  .gallery-chapter .chapter-container {
    gap: 20px;
  }
}

@media (max-width: 860px) {
  .chapter-rail {
    display: none;
  }

  .hero-box {
    padding: 32px 24px;
  }

  .atelier-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .theme-toggle__label {
    display: none;
  }

  .site-header__controls {
    gap: 6px;
  }

  .chapter-section {
    padding: 80px 20px;
  }

  .hero-chapter {
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .section-title {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .eyebrow-badge {
    font-size: 0.7rem;
    padding: 5px 14px;
  }

  .hero-trust-bar,
  .trust-strip {
    flex-direction: column;
    gap: 10px;
  }

  .hero-cta-group {
    width: 100%;
    flex-direction: column;
  }

  .btn-primary-gradient,
  .btn-glass-secondary {
    width: 100%;
    justify-content: center;
  }

  .gallery-actions {
    gap: 10px;
  }

  .gallery-hint {
    font-size: 0.85rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-glass-card {
    padding: 40px 20px;
  }

  .btn-store-pill {
    width: 100%;
    justify-content: center;
  }

  .cta-download-option {
    width: 100%;
    max-width: 280px;
    flex-direction: row;
    gap: 20px;
  }

  .cta-download-qr {
    width: 64px;
    height: 64px;
  }

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

  .site-footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Phones: the app-name chip is the first thing to go — the theme and language
   controls are functional and must stay reachable. */
@media (max-width: 560px) {
  .brand-badge {
    display: none;
  }
}

/* Landscape phones: a 100svh band is too short to hold the copy and still leave
   a clear middle for the 3D stage, so the gallery chapter gets extra scroll room. */
@media (orientation: landscape) and (max-height: 560px) {
  .chapter-section {
    padding: 64px 28px;
  }

  .gallery-chapter {
    min-height: 165svh;
  }

  .section-title {
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .hero-box {
    padding: 28px 32px;
    gap: 14px;
  }

  /* Short landscape height, but the 640px width breakpoint doesn't fire here
     (phones are wide in landscape) — shrink the QR box on its own trigger. */
  .hero-qr-box {
    margin-top: 16px;
    gap: 12px;
  }

  .hero-qr-item {
    padding: 10px;
    font-size: 0.72rem;
  }

  .hero-qr-item img {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 400px) {
  .site-header__container {
    padding: 0 14px;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .brand-logo-icon {
    width: 28px;
    height: 28px;
  }

  .theme-toggle-btn {
    padding: 6px 10px;
  }

  .lang-pill {
    min-width: 26px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .chapter-section {
    padding: 72px 16px;
  }

  .hero-box {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .header-ios-btn span {
    display: none;
  }

  .header-ios-btn {
    padding: 8px;
  }

  .lang-dropdown__current {
    display: none;
  }
}

/* ==========================================================================
   Inserted chapters between hero and download: why 3D + statue library,
   dành cho ba mẹ. Same language as the hero box: one centred glass card per
   screen, the live 3D stage visible around it. Rows inside a card stay flat
   (icon + text, divider lines) rather than nested boxes, so one glass card
   reads as one card, not a stack of them.
   ========================================================================== */
.insert-card {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

.insert-card .section-title {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.insert-card .section-subtitle {
  margin: 0 auto;
}

.insert-card--merged {
  max-width: 820px;
  gap: 16px;
}

.insert-card--merged .insert-list {
  margin-top: 4px;
}

/* Four equal-weight reasoning items read better as a scannable row of small
   cards than as a divided list — each is a short, independent claim, not a
   sequence. */
.insert-grid-cards {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.insert-card-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 14px;
  border-radius: var(--radius-md);
  background: var(--c-glass-pill);
  border: 1px solid var(--c-glass-pill-border);
}

.insert-card-tile strong {
  font-family: var(--font-display);
  font-size: 0.96rem;
  color: var(--text-primary);
}

.insert-card-tile > span:last-child {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.insert-card-tile__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.insert-card-tile__icon--violet {
  background: rgba(192, 132, 252, 0.18);
  border-color: rgba(192, 132, 252, 0.4);
  color: #c084fc;
}

.insert-card-tile__icon--pink {
  background: rgba(244, 114, 182, 0.18);
  border-color: rgba(244, 114, 182, 0.4);
  color: #f472b6;
}

.insert-card-tile__icon--amber {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.insert-card-tile__icon--mint {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}

@media (max-width: 1024px) {
  .insert-grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .insert-grid-cards {
    grid-template-columns: 1fr;
  }

  .insert-card-tile {
    flex-direction: column;
    text-align: left;
    align-items: center;

    & > span:last-child {
      text-align: center;
    }
  }
}

.insert-divider {
  width: 100%;
  height: 1px;
  background: var(--card-border);
  margin: 10px 0 4px;
}

.catalog-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.catalog-stat__number {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.catalog-stat__label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.catalog-categories .trust-pill {
  font-weight: 700;
}

.catalog-caption {
  margin: -6px 0 0;
  font-size: 0.86rem;
  color: var(--text-faint);
}

/* Trust badges sit below the headline stat and diversity chips: quieter and
   smaller so they read as reassurance, not competing with the "100.000+"
   moment that should grab attention first. */
.insert-badges {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
}

.insert-badges .trust-badge {
  padding: 5px 12px;
  font-size: 0.78rem;
}

.insert-badges .trust-badge__icon-svg {
  width: 15px;
  height: 15px;
}

.insert-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.insert-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  text-align: left;
  border-top: 1px solid var(--card-border);
}

.insert-row:first-child {
  border-top: none;
}

.insert-row p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.insert-row p > span {
  color: var(--text-secondary);
}

.insert-row strong {
  font-family: var(--font-display);
}

.insert-row__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.insert-row__icon--violet {
  background: rgba(192, 132, 252, 0.18);
  border-color: rgba(192, 132, 252, 0.4);
  color: #c084fc;
}

.insert-row__icon--pink {
  background: rgba(244, 114, 182, 0.18);
  border-color: rgba(244, 114, 182, 0.4);
  color: #f472b6;
}

.insert-row__icon--mint {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}

.insert-row__check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: #34d399;
  color: #09071a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.insert-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.insert-pills .trust-pill {
  padding: 8px 16px;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .chapter-section.chapter-section--insert {
    min-height: auto;
    padding: 60px 24px;
  }

  .insert-card {
    padding: 32px 24px;
    gap: 14px;
  }

  .insert-row {
    align-items: flex-start;
  }
}

/* ==========================================================================
   Hero tagline: the hero card was removed entirely, so this is a slim line
   of text sitting directly over the live 3D stage — no card, no border.
   Positioned near the top of the reveal viewport, below the sticky header,
   above where the statues float, so it never collides with the scene.
   ========================================================================== */
/* The section has a deliberate `padding-top: 100vh` (from the original design)
   so the very first screen is a clean, text-free 3D reveal. A normal-flow
   child would land BELOW that padding and never appear on first paint, so
   this wrapper is taken out of flow and positioned with `vh` units, which
   read the real viewport height and ignore the section's own inflated box. */
.hero-chapter .chapter-container {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  /* Mirrors .site-header__container (max-width 1360px, 28px gutter, 20px at
     ≤900px, 14px at ≤400px) so the tagline's centered block has the same
     safe gutter as the header at every width. */
  max-width: none;
  margin: 0;
  padding: 0 max(28px, calc((100% - 1360px) / 2 + 28px));
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .hero-chapter .chapter-container {
    padding: 0 20px;
  }
}

@media (max-width: 400px) {
  .hero-chapter .chapter-container {
    padding: 0 14px;
  }
}

.hero-tagline {
  margin: 0 auto;
  max-width: 820px;
  /* Centered per design 1A — was left-aligned to line up with the logo;
     that alignment is intentionally dropped in favor of matching 1A. */
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 3.9vw, 3.5rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  /* Solid white with a soft drop shadow for legibility over the 3D scene,
     no stroke/glow — keeps the headline readable without the sticker look. */
  color: #ffffff;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

/* 1A gradient (orange -> pink -> purple) for the second line, distinct from
   the site's default purple/blue .gradient-text used elsewhere. */
.hero-tagline .gradient-text {
  background: linear-gradient(92deg, #ffb45c 0%, #ff7ad9 48%, #b06bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff7ad9;
  text-shadow: none;
}

@media (max-width: 640px) {
  .hero-tagline {
    font-size: clamp(2rem, 7.6vw, 2.5rem);
  }

  /* On phones the forced break leaves a ragged short line; let it wrap naturally. */
  .hero-tagline br {
    display: none;
  }
}

/* QR download box, directly under the hero tagline on the first screen —
   same glass-card look as .cta-download-option (chapter 05) so the two
   feel like one design language. */
.hero-qr-box {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 28px auto 0;
}

.hero-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--card-bg);
  backdrop-filter: var(--card-backdrop);
  -webkit-backdrop-filter: var(--card-backdrop);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s var(--trans-smooth);
}

.hero-qr-item:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.35);
}

.hero-qr-item img {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

@media (max-width: 640px) {
  .hero-qr-box {
    gap: 14px;
    margin-top: 20px;
  }

  .hero-qr-item {
    padding: 12px;
    font-size: 0.78rem;
  }

  .hero-qr-item img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 400px) {
  .hero-qr-box {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Keeps a short phrase (e.g. "3D 雕像") from splitting across lines. */
.u-nowrap {
  white-space: nowrap;
}
