/* ==========================================================================
   NEXT VISION — 2026 Flagship WebGL + Video Automotive Experience (v3)
   Aesthetic: Obsidian Studio / Editorial Kinetic Type / Hairline Architectural UI
   Engine: Three.js WebGL2 Thin-Film Shader + GSAP ScrollTrigger + Lenis Smooth
   ========================================================================== */

:root {
  --void: #02050c;
  --obsidian: #050b18;
  --surface: rgba(8, 16, 32, 0.88);
  --surface-solid: #081122;
  --hairline: rgba(168, 206, 255, 0.14);
  --hairline-strong: rgba(56, 212, 255, 0.42);

  --ink: #f6f9ff;
  --ink-2: #b8c8e2;
  --ink-3: #7990b5;

  --blue: #1d8cff;
  --cyan: #38e8ff;
  --emerald: #59f8be;
  --amber: #fcd34d;

  --font-display: "Syne", "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1320px;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; top: -90px; left: 16px; z-index: 9999;
  padding: 10px 16px; background: var(--blue); color: #fff; font-weight: 700; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ── Persistent Full-Viewport Three.js WebGL2 Layer (ALWAYS Strictly BEHIND Page Content) ── */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.48;
  transition: opacity 0.55s ease;
}
body.is-past-hero #webgl-canvas {
  opacity: 0.52;
}

/* ── Film Grain + Scroll Progress Laser ── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(rgba(255,255,255,0.6) 1px, transparent 0);
  background-size: 3px 3px;
}

.scroll-laser {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 500; pointer-events: none;
}
.scroll-laser__fill {
  display: block; width: 100%; height: 100%;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--emerald));
  box-shadow: 0 0 18px var(--cyan);
}

/* ── Custom Precision Cursor (Desktop Mouse Only) ── */
.nv-cursor-dot,
.nv-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 900;
  transform: translate3d(-999px, -999px, 0);
  opacity: 0;
  transition: opacity 0.25s ease, width 0.28s var(--ease-expo), height 0.28s var(--ease-expo), border-color 0.25s ease, background 0.25s ease;
}
.nv-cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}
.nv-cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; border: 1px solid rgba(56, 232, 255, 0.55);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: #fff;
}
.nv-cursor-ring.is-expanded {
  width: 74px; height: 74px; margin: -37px 0 0 -37px;
  background: rgba(14, 42, 92, 0.72);
  border-color: var(--cyan);
}

/* ── Cinematic Preloader Curtain ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: #01040a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: clip-path 0.85s var(--ease-expo), opacity 0.55s ease;
  clip-path: inset(0 0 0 0);
}
.preloader.is-done {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}
.preloader__count {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader__bar {
  width: min(320px, 70vw); height: 2px; background: rgba(255,255,255,0.12); overflow: hidden;
}
.preloader__bar i {
  display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--emerald));
}
.preloader__label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.28em; color: var(--ink-3);
}

/* ── Production Mode: Header starts cleanly at top: 0 ── */
.site-shell { position: relative; z-index: 10; width: 100%; overflow-x: clip; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }

/* ── Vehicle Studio Switcher Pills inside Hero Comparator ── */
.studio-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.studio-tab {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(168, 206, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.24s var(--ease-expo);
}
.studio-tab:hover {
  border-color: var(--cyan);
  color: #fff;
}
.studio-tab.is-active {
  background: rgba(29, 140, 255, 0.28);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 18px rgba(56, 232, 255, 0.28);
}

/* ── Featured Dual-Vehicle Studio Gallery (Mark X 130 × BYD SEAL) ── */
.models-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.model-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-expo), border-color 0.3s ease, box-shadow 0.4s ease;
}
.model-card:hover {
  transform: translateY(-6px);
  border-color: var(--hairline-strong);
  box-shadow: 0 32px 84px rgba(0, 5, 20, 0.72), 0 0 42px rgba(29, 140, 255, 0.2);
}
.model-card__media {
  position: relative;
  aspect-ratio: 16 / 9.4;
  overflow: hidden;
  background: #030712;
}
.model-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-expo);
}
.model-card:hover .model-card__media img {
  transform: scale(1.06);
}
.model-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,5,12,0.08) 0%, rgba(2,5,12,0.18) 52%, rgba(2,5,12,0.88) 100%);
  pointer-events: none;
}
.model-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(3, 8, 20, 0.82);
  border: 1px solid rgba(56, 232, 255, 0.38);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
  backdrop-filter: blur(8px);
}
.model-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.model-card__body h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.model-card__sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
.model-card__body p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.75;
}
.model-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.model-spec {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-2);
}

.footer-motion-btn {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}
.footer-motion-btn:hover {
  border-color: var(--cyan);
  color: #fff;
}

@media (max-width: 960px) {
  .models-grid { grid-template-columns: 1fr; }
}

/* ── Transparent Floating Header Over Full-Bleed Hero ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 250; height: 78px;
  background: linear-gradient(180deg, rgba(2, 5, 12, 0.86) 0%, rgba(2, 5, 12, 0.36) 72%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, border-color 0.35s ease, height 0.3s ease;
}
.site-header.is-scrolled {
  height: 68px;
  background: rgba(2, 6, 15, 0.94);
  border-bottom-color: rgba(56, 232, 255, 0.24);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; }
.brand-link img { height: 38px; width: auto; }
.brand-official-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(89, 248, 190, 0.36);
  background: rgba(89, 248, 190, 0.08);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--emerald);
}

.hero-official-signature {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 10px 20px 10px 12px;
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(6, 16, 36, 0.88) 0%, rgba(10, 24, 52, 0.78) 100%);
  border: 1px solid rgba(56, 232, 255, 0.36);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  contain: paint;
}
.hero-official-signature::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(134, 236, 255, 0.2), rgba(255, 255, 255, 0.32), transparent);
  transform: translate3d(-140%, 0, 0) skewX(-24deg);
  will-change: transform;
  animation: brandSignatureSheen 4.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes brandSignatureSheen {
  0%, 48% { transform: translate3d(-140%, 0, 0) skewX(-24deg); }
  100% { transform: translate3d(440%, 0, 0) skewX(-24deg); }
}

.hero-logo-emblem {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
}
.hero-logo-emblem img {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  will-change: transform;
  animation: emblemPulse 3.6s ease-in-out infinite;
}
.hero-logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.hero-logo-ring--outer {
  border: 1.5px solid rgba(56, 232, 255, 0.18);
  border-top-color: var(--cyan);
  border-right-color: var(--emerald);
  animation: emblemOrbit 7s linear infinite;
}
.hero-logo-ring--inner {
  inset: 5px;
  border: 1px dashed rgba(89, 248, 190, 0.36);
  animation: emblemOrbitReverse 11s linear infinite;
}
@keyframes emblemOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes emblemOrbitReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes emblemPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.07); opacity: 1; }
}

.hero-logo-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-logo-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.hero-company-wordmark {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.05;
  background: linear-gradient(95deg, #ffffff 0%, #c8f7ff 45%, #59f8be 82%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-official-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(89, 248, 190, 0.48);
  background: rgba(89, 248, 190, 0.12);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--emerald);
}
.hero-kicker-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: rgba(154, 218, 255, 0.9);
}
.hero-kicker-sub i {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
}
body.motion-reduced .hero-official-signature::after,
body.motion-reduced .hero-logo-ring,
body.motion-reduced .hero-logo-emblem img,
body.motion-reduced .hero-company-wordmark {
  animation: none !important;
}

.preloader__logo {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(89, 248, 190, 0.35));
}
.nav-desktop { display: flex; align-items: center; gap: 26px; }
.nav-desktop a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2);
  position: relative; padding: 6px 0; transition: color 0.2s;
}
.nav-desktop a:hover, .nav-desktop a.is-active { color: #fff; }
.nav-desktop a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--cyan); transform: scaleX(0); transition: transform 0.3s var(--ease-expo);
}
.nav-desktop a:hover::after, .nav-desktop a.is-active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--hairline); background: rgba(255,255,255,0.04);
}

/* ── Magnetic Architectural Buttons ── */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform 0.28s var(--ease-expo), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #0b53c9 0%, #1d8cff 50%, #38e8ff 100%);
  color: #fff; border-color: rgba(56, 232, 255, 0.55);
  box-shadow: 0 12px 38px rgba(29, 140, 255, 0.38);
}
.btn-primary:hover { box-shadow: 0 16px 52px rgba(56, 232, 255, 0.56); }
.btn-glass {
  background: rgba(8, 17, 34, 0.84); color: #fff; border-color: var(--hairline-strong);
}
.btn-glass:hover { background: rgba(29, 140, 255, 0.2); border-color: var(--cyan); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 13px; }

/* ==========================================================================
   ACT 01 — FULL-BLEED 100vw × 100svh FLAGSHIP AUTOMOTIVE HERO
   ========================================================================== */
.hero-cinema {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 700px;
  max-height: 1040px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 112px 0 34px;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: #02050c;
}

/* Edge-to-Edge Full-Viewport Studio Stage (Crossfading Slides + Real Night Drive Video) */
.hero-stage-full {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #02050c;
}

.hero-bg-slide {
  position: absolute;
  inset: -2%;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1.055);
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: opacity 0.75s var(--ease-expo), transform 4.2s ease-out;
  pointer-events: none;
}
.hero-bg-slide.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1.0);
}
.hero-bg-slide[data-hero-slide="3"] {
  inset: 0;
  transform: none;
  will-change: opacity;
  transition: opacity 0.65s var(--ease-expo);
}
.hero-bg-slide img,
.hero-bg-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}
.hero-bg-slide[data-hero-slide="0"] img {
  object-position: 50% 60%;
}
.hero-bg-slide[data-hero-slide="1"] img,
.hero-bg-slide[data-hero-slide="2"] img {
  object-position: 50% 58%;
}

/* Precision Cinematic Lighting Masks — Protect upper-left typography while keeping BOTH slammed cars 100% bright & crisp */
.hero-stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 48% at 15% 24%, rgba(2, 5, 12, 0.78) 0%, rgba(2, 5, 12, 0.36) 58%, transparent 100%),
    linear-gradient(180deg, rgba(2, 5, 12, 0.56) 0%, rgba(2, 5, 12, 0.02) 24%, rgba(2, 5, 12, 0.04) 68%, rgba(2, 5, 12, 0.9) 100%);
}

/* Subtle horizontal optical sweep laser across full-bleed stage (100% GPU-composited transform) */
.hero-stage-sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 24vw;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(56, 232, 255, 0.07) 48%, rgba(255, 255, 255, 0.11) 50%, rgba(89, 248, 190, 0.05) 54%, transparent);
  transform: translate3d(-32vw, 0, 0) skewX(-18deg);
  will-change: transform;
  animation: heroOpticalSweep 9s ease-in-out infinite;
}
@keyframes heroOpticalSweep {
  0%, 58% { transform: translate3d(-32vw, 0, 0) skewX(-18deg); }
  100% { transform: translate3d(125vw, 0, 0) skewX(-18deg); }
}

/* Hero Foreground Architectural Grid */
.hero-overlay-top {
  position: relative;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.hero-headline-block {
  max-width: 780px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--cyan);
  margin: 0 0 14px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}
.hero-kicker i {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
}

.hero-display {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.3vw, 66px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.72);
}
.hero-display .line { display: block; overflow: hidden; }
.hero-display .line span { display: inline-block; }
.hero-display .accent {
  background: linear-gradient(100deg, #ffffff 0%, #86ecff 44%, #1d8cff 82%, #59f8be 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub-ja {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.85vw, 24px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.85);
}

.hero-desc {
  margin: 0;
  max-width: 580px;
  color: rgba(238, 246, 255, 0.96);
  font-size: 14.5px;
  line-height: 1.75;
  text-shadow: 0 2px 10px rgba(2, 6, 14, 0.98), 0 0 26px rgba(2, 6, 14, 0.95);
}

/* Floating Live Optical Status Badge (Top Right of Full-Bleed Hero) */
.hero-corner-telemetry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(4, 11, 26, 0.84);
  border: 1px solid rgba(56, 232, 255, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.hero-live-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.hero-corner-spec {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(210, 226, 248, 0.72);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* Hero Bottom Dock: CTAs on Left + Architectural Full-Bleed Scene Switcher on Right */
.hero-overlay-bottom {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Architectural Scene Switcher Rail */
.hero-switcher-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.hero-switcher-caption {
  margin: 0;
  font-size: 12.5px;
  color: rgba(220, 233, 252, 0.86);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.hero-switcher-caption strong {
  color: #fff;
}
.hero-scene-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 134px));
  gap: 8px;
}
.hero-scene-btn {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 10px 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 11, 26, 0.82);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.hero-scene-btn:hover {
  border-color: rgba(56, 232, 255, 0.55);
  background: rgba(10, 22, 46, 0.9);
  transform: translateY(-2px);
}
.hero-scene-btn.is-active {
  border-color: var(--cyan);
  background: rgba(14, 34, 72, 0.9);
  box-shadow: 0 10px 28px rgba(0, 6, 24, 0.6), 0 0 20px rgba(56, 232, 255, 0.2);
}
.hero-scene-btn small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 2px;
}
.hero-scene-btn strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}
.hero-scene-btn__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.hero-scene-btn__bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--emerald));
}
.hero-scene-btn.is-active .hero-scene-btn__bar i {
  animation: sceneProgress var(--scene-dur, 4.2s) linear forwards;
}
.hero-scene-btn.is-video-driven.is-active .hero-scene-btn__bar i {
  animation: none;
}
.hero-cinema.is-paused .hero-scene-btn.is-active .hero-scene-btn__bar i {
  animation-play-state: paused;
}
@keyframes sceneProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Clean Bottom Spec Ribbon below Full-Bleed Hero */
.hero-spec-ribbon {
  position: relative;
  z-index: 15;
  background: rgba(3, 8, 19, 0.92);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0;
}
.hero-bottom-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.telemetry-cell { display: flex; flex-direction: column; gap: 2px; }
.telemetry-cell span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-3); }
.telemetry-cell strong { font-size: 14px; font-weight: 700; color: #fff; }

/* ==========================================================================
   ACT 02 — PINNED SCROLLYTELLING CINEMA (GSAP ScrollTrigger 4 Chapters)
   ========================================================================== */
.cinema-section {
  position: relative;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(2, 5, 12, 0.72), rgba(5, 11, 24, 0.82));
}

@media (min-width: 1081px) {
  .cinema-section {
    min-height: min(2150px, 235svh);
  }
  .cinema-pin-wrap {
    position: sticky;
    top: 74px;
    min-height: min(840px, calc(100svh - 74px));
    display: flex;
    align-items: center;
    padding: 36px 0;
  }
}

@media (max-width: 1080px) {
  .cinema-pin-wrap {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: 56px 0;
  }
}

.cinema-pin-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 44px;
  align-items: center;
}

.cinema-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-btn {
  text-align: left;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(6, 13, 28, 0.84);
  transition: transform 0.35s var(--ease-expo), border-color 0.25s ease, background 0.25s ease;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}
.chapter-btn:hover { border-color: rgba(56, 232, 255, 0.35); }
.chapter-btn.is-active {
  background: rgba(14, 30, 62, 0.84);
  border-color: var(--cyan);
  box-shadow: 0 16px 44px rgba(0, 8, 28, 0.5), 0 0 28px rgba(29, 140, 255, 0.22);
  transform: translateX(8px);
}
.chapter-btn__num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--cyan);
  padding-top: 3px;
}
.chapter-btn__title { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 4px; }
.chapter-btn__copy { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.6; }

.cinema-viewport {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  aspect-ratio: 16 / 10.5;
  background: #030712;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.72);
}

.cinema-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  clip-path: inset(12% 0 12% 0 round 16px);
  transform: scale(1.08);
  transition: opacity 0.65s var(--ease-expo), clip-path 0.8s var(--ease-expo), transform 0.9s var(--ease-expo);
  pointer-events: none;
}
.cinema-slide.is-active {
  opacity: 1;
  clip-path: inset(0 0 0 0 round 0px);
  transform: scale(1);
  pointer-events: auto;
}
.cinema-slide img,
.cinema-slide video {
  width: 100%; height: 100%; object-fit: cover;
}
.cinema-slide__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,5,12,0.18) 0%, rgba(2,5,12,0.25) 45%, rgba(2,5,12,0.92) 100%);
}
.cinema-slide__caption {
  position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 3;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.cinema-slide__caption small {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--cyan); margin-bottom: 4px;
}
.cinema-slide__caption h3 { margin: 0; font-size: 24px; font-weight: 800; color: #fff; }
.cinema-slide__caption p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 44ch; }

/* ==========================================================================
   ACT 03 — ARCHITECTURAL SECTIONS (Intent / Bento / Flow / Library / Journal)
   ========================================================================== */
.section {
  position: relative;
  padding: 96px 0;
  border-bottom: 1px solid var(--hairline);
  background: rgba(3, 7, 16, 0.62);
}
.section--dark { background: rgba(3, 8, 19, 0.9); }

.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 42px;
}
.sec-kicker {
  margin: 0 0 8px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.24em; color: var(--cyan);
}
.sec-title {
  margin: 0; font-size: clamp(26px, 3.2vw, 42px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em;
}
.sec-lead { margin: 0; max-width: 52ch; color: var(--ink-2); font-size: 15px; }

/* 3-Axis Intent Row */
.intent-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.glass-panel {
  position: relative;
  padding: 28px;
  border-radius: 20px;
  background: rgba(8, 16, 32, 0.9);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.35s var(--ease-expo), border-color 0.3s ease, box-shadow 0.35s ease;
}
.glass-panel:hover {
  transform: translateY(-6px);
  border-color: var(--hairline-strong);
  box-shadow: 0 26px 70px rgba(0, 6, 22, 0.65), 0 0 36px rgba(29, 140, 255, 0.18);
}
.glass-panel h3 { margin: 0; font-size: 20px; font-weight: 800; }
.glass-panel p { margin: 0; font-size: 14px; color: var(--ink-2); }
.chip-row { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(56, 232, 255, 0.32);
  background: rgba(29, 140, 255, 0.14); color: #eef7ff; font-size: 12.5px; font-weight: 700;
  transition: all 0.2s;
}
.chip-link:hover { background: rgba(29, 140, 255, 0.3); border-color: var(--cyan); }
.chip-link--mobile {
  border-color: rgba(89, 248, 190, 0.38); background: rgba(89, 248, 190, 0.1); color: #dbfff2;
}
.chip-link--mobile:hover { background: rgba(89, 248, 190, 0.22); }

/* Velocity-Skew Horizontal Strip for Journal & Technical Highlights */
.vel-track {
  will-change: transform;
  transition: transform 0.12s ease-out;
}

.bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.bento-card {
  border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease-expo), border-color 0.3s ease;
}
.bento-card:hover { transform: translateY(-6px); border-color: var(--hairline-strong); }
.bento-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #040915; }
.bento-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-expo); }
.bento-card:hover .bento-card__media img { transform: scale(1.07); }
.device-tag {
  position: absolute; top: 14px; right: 14px; padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; backdrop-filter: blur(8px);
}
.device-tag--pc { background: rgba(29, 140, 255, 0.9); color: #fff; }
.device-tag--mobile { background: rgba(5, 18, 14, 0.88); border: 1px solid rgba(89, 248, 190, 0.55); color: var(--emerald); }
.bento-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bento-card__body h3 { margin: 0; font-size: 22px; font-weight: 800; }
.bento-card__body ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.compare-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.journal-card {
  border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--hairline);
  display: flex; flex-direction: column; transition: transform 0.32s var(--ease-expo), border-color 0.3s ease;
}
.journal-card:hover { transform: translateY(-6px); border-color: var(--cyan); }
.journal-card__img { aspect-ratio: 16 / 10; overflow: hidden; }
.journal-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.65s var(--ease-expo); }
.journal-card:hover .journal-card__img img { transform: scale(1.07); }
.journal-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.journal-card__body h3 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 800; }
.journal-card__body p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* Glossary & FAQ */
.glossary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.glossary-pill {
  padding: 8px 14px; border-radius: 10px; background: rgba(7, 15, 32, 0.82);
  border: 1px solid var(--hairline); font-size: 13px; color: var(--ink-2);
}
.glossary-pill strong { color: var(--cyan); font-family: var(--font-mono); margin-right: 6px; }

.faq-list { display: grid; gap: 12px; max-width: 920px; }
.faq-item {
  border-radius: 16px; background: var(--surface); border: 1px solid var(--hairline); backdrop-filter: blur(14px);
}
.faq-item summary {
  list-style: none; padding: 18px 22px; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--cyan); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding: 14px 22px 18px; border-top: 1px solid var(--hairline); color: var(--ink-2); font-size: 14.5px; }

/* Access & Quick Router */
.access-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.access-dl { margin: 0; display: grid; gap: 12px; }
.access-dl div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; font-size: 14px; }
.access-dl dt { color: var(--ink-3); font-weight: 700; }
.access-dl dd { margin: 0; }

/* Footer */
.site-footer {
  padding: 36px 0 56px; background: rgba(2, 5, 12, 0.94); border-top: 1px solid var(--hairline);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: #fff; }

/* Drawer / Dock / Dialog */
.mobile-drawer { position: fixed; inset: 0; z-index: 400; display: none; }
.mobile-drawer.is-open { display: block; }
.mobile-drawer__bg { position: absolute; inset: 0; background: rgba(1,4,10,0.8); backdrop-filter: blur(6px); }
.mobile-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 86vw);
  background: var(--obsidian); border-left: 1px solid var(--hairline-strong);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto;
}
.mobile-drawer__panel a {
  display: flex; justify-content: space-between; align-items: center; min-height: 46px;
  padding: 0 14px; border-radius: 10px; border: 1px solid var(--hairline); font-weight: 700;
}

.mobile-dock {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 260;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(2, 6, 16, 0.95); border-top: 1px solid var(--hairline-strong); backdrop-filter: blur(14px);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mobile-dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px; font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.mobile-dock .is-accent { color: var(--cyan); }

.pill-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(56, 232, 255, 0.38);
  background: rgba(56, 232, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.nv-dialog {
  margin: auto;
  width: min(540px, calc(100vw - 28px));
  max-height: min(90svh, 760px);
  padding: 0;
  border: 1px solid rgba(56, 232, 255, 0.36);
  border-radius: 22px;
  background: linear-gradient(155deg, #0b1730 0%, #050c1a 62%, #030712 100%);
  color: var(--ink);
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.85), 0 0 42px rgba(29, 140, 255, 0.16);
  overflow: auto;
}
.nv-dialog[open] {
  animation: nvDialogPop 0.24s var(--ease-expo);
}
@keyframes nvDialogPop {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.97); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.nv-dialog::backdrop {
  background: rgba(1, 4, 12, 0.82);
}
.nv-dialog__inner,
.nv-dialog__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nv-dialog__close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(168, 206, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.nv-dialog__close:hover {
  border-color: var(--cyan);
  background: rgba(56, 232, 255, 0.16);
  transform: rotate(90deg);
}
.qr-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(2, 7, 16, 0.78);
  border: 1px solid rgba(168, 206, 255, 0.18);
}
.qr-wrap {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
.qr-wrap canvas {
  display: block;
  width: 164px;
  height: 164px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.qr-code-text {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 12, 26, 0.92);
  border: 1px solid rgba(56, 232, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--cyan);
  word-break: break-all;
}
@media (max-width: 560px) {
  .qr-box { flex-direction: column; text-align: center; }
  .nv-dialog__body, .nv-dialog__inner { padding: 22px; }
}

/* Reduced Motion */
body.motion-reduced .nv-cursor-dot,
body.motion-reduced .nv-cursor-ring,
body.motion-reduced .preloader { display: none !important; }
body.motion-reduced #webgl-canvas { opacity: 0.35; }
body.motion-reduced video { display: none; }
@media (prefers-reduced-motion: reduce) {
  .preloader, .nv-cursor-dot, .nv-cursor-ring { display: none !important; }
}

@media (max-width: 1080px) {
  .hero-main, .cinema-pin-grid, .access-grid { grid-template-columns: 1fr; }
  .hero-bottom-bar { grid-template-columns: repeat(2, 1fr); }
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .journal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .staging-bar__note, #modePcBtn, #modeMobileBtn, .nv-cursor-dot, .nv-cursor-ring { display: none !important; }
  .nav-desktop, .header-sub-cta, .hero-corner-telemetry { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header { height: 64px; }
  .brand-link img { height: 26px; }
  .hero-cinema { height: auto; min-height: 100svh; max-height: none; padding: 86px 0 28px; }
  .hero-stage-vignette {
    background:
      linear-gradient(180deg, rgba(2, 5, 12, 0.84) 0%, rgba(2, 5, 12, 0.42) 38%, rgba(2, 5, 12, 0.48) 65%, rgba(2, 5, 12, 0.94) 100%);
  }
  .hero-overlay-bottom { flex-direction: column; align-items: stretch; gap: 18px; margin-top: 28px; }
  .hero-cta-group { flex-direction: column; }
  .hero-cta-group .btn { width: 100%; white-space: normal; }
  .hero-switcher-wrap { align-items: stretch; }
  .hero-scene-rail { grid-template-columns: repeat(2, 1fr); }
  .hero-bottom-bar, .intent-row, .bento-grid, .steps-row, .compare-row, .lib-grid, .journal-grid { grid-template-columns: 1fr; }
  .cinema-pin-wrap { min-height: auto; padding: 48px 0; }
  .section { padding: 64px 0; }
  .mobile-dock { display: grid; }
  .site-footer { padding-bottom: 92px; }
  .qr-box { flex-direction: column; text-align: center; }
}
