/* ==========================================================================
   AETHER · 曜境 — Luxury Spatial 3D Design System
   ========================================================================== */

:root {
  --font-serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Default Theme: Obsidian & Champagne Gold */
  --bg: #050608;
  --bg-elevated: rgba(14, 15, 19, 0.56);
  --bg-elevated-strong: rgba(14, 15, 19, 0.78);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #f4f1ea;
  --text-secondary: rgba(235, 229, 218, 0.68);
  --text-muted: rgba(215, 207, 194, 0.44);
  --accent: #d8b884;
  --accent-bright: #f2d9ad;
  --accent-soft: rgba(216, 184, 132, 0.16);
  --accent-glow: rgba(216, 184, 132, 0.28);
  --border: rgba(244, 241, 234, 0.11);
  --border-strong: rgba(216, 184, 132, 0.38);
  --glass-highlight: rgba(255, 252, 244, 0.14);
  --vignette: radial-gradient(circle at 50% 50%, transparent 45%, rgba(3, 4, 6, 0.72) 100%);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --btn-text-on-accent: #0c0b09;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

/* Theme 2: Brushed Titanium & Glacial Ice */
html[data-theme="titanium"] {
  --bg: #070a10;
  --bg-elevated: rgba(13, 19, 28, 0.56);
  --bg-elevated-strong: rgba(13, 19, 28, 0.78);
  --surface-hover: rgba(215, 235, 255, 0.06);
  --text-primary: #eef4fa;
  --text-secondary: rgba(214, 228, 244, 0.68);
  --text-muted: rgba(186, 204, 226, 0.44);
  --accent: #9ec5f0;
  --accent-bright: #d4e8ff;
  --accent-soft: rgba(158, 197, 240, 0.16);
  --accent-glow: rgba(158, 197, 240, 0.28);
  --border: rgba(226, 239, 255, 0.12);
  --border-strong: rgba(158, 197, 240, 0.42);
  --glass-highlight: rgba(235, 245, 255, 0.16);
  --vignette: radial-gradient(circle at 50% 50%, transparent 45%, rgba(4, 7, 13, 0.72) 100%);
  --btn-text-on-accent: #07101c;
}

/* Theme 3: Smoked Amber & Molten Bronze */
html[data-theme="amber"] {
  --bg: #0b0705;
  --bg-elevated: rgba(24, 15, 11, 0.56);
  --bg-elevated-strong: rgba(24, 15, 11, 0.8);
  --surface-hover: rgba(255, 204, 158, 0.07);
  --text-primary: #faf1e8;
  --text-secondary: rgba(242, 220, 200, 0.7);
  --text-muted: rgba(218, 186, 160, 0.45);
  --accent: #e8965a;
  --accent-bright: #ffc89c;
  --accent-soft: rgba(232, 150, 90, 0.16);
  --accent-glow: rgba(232, 150, 90, 0.3);
  --border: rgba(255, 224, 196, 0.12);
  --border-strong: rgba(232, 150, 90, 0.42);
  --glass-highlight: rgba(255, 232, 210, 0.15);
  --vignette: radial-gradient(circle at 50% 50%, transparent 45%, rgba(10, 5, 3, 0.74) 100%);
  --btn-text-on-accent: #180c06;
}

/* Theme 4: Museum Gallery Porcelain (Light Architectural Mode) */
html[data-theme="porcelain"] {
  --bg: #eceae4;
  --bg-elevated: rgba(255, 254, 250, 0.62);
  --bg-elevated-strong: rgba(255, 254, 250, 0.84);
  --surface-hover: rgba(20, 20, 24, 0.045);
  --text-primary: #171614;
  --text-secondary: rgba(30, 28, 25, 0.68);
  --text-muted: rgba(45, 42, 38, 0.48);
  --accent: #8f6c43;
  --accent-bright: #5c4324;
  --accent-soft: rgba(143, 108, 67, 0.12);
  --accent-glow: rgba(143, 108, 67, 0.22);
  --border: rgba(23, 22, 20, 0.11);
  --border-strong: rgba(143, 108, 67, 0.42);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --vignette: radial-gradient(circle at 50% 50%, transparent 52%, rgba(196, 190, 178, 0.42) 100%);
  --shadow-lg: 0 24px 60px rgba(28, 24, 18, 0.1);
  --btn-text-on-accent: #fcfbf8;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.7s var(--ease-expo), color 0.55s var(--ease-expo);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
  line-height: 1.6;
  selection-background-color: var(--accent-soft);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-bright);
}

button,
input {
  font-family: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

/* Custom cursor enabled only on fine pointers */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-ready {
    cursor: none;
  }
  body.custom-cursor-ready a,
  body.custom-cursor-ready button,
  body.custom-cursor-ready input {
    cursor: none;
  }
}

/* ==========================================================================
   Editorial Opening Preloader
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #050608;
  color: #f4f1ea;
  transition: opacity 0.85s var(--ease-expo), transform 0.95s var(--ease-expo), visibility 0.85s;
}

.preloader.is-done {
  opacity: 0;
  transform: scale(1.03);
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  width: min(340px, 82vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preloader-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preloader-sigil {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8b884;
  box-shadow: 0 0 18px rgba(216, 184, 132, 0.8);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.preloader-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: rgba(244, 241, 234, 0.88);
}

.preloader-bar-wrap {
  width: 100%;
  height: 1px;
  background: rgba(244, 241, 234, 0.14);
  overflow: hidden;
}

.preloader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(216, 184, 132, 0.4), #f2d9ad);
  transition: width 0.14s linear;
}

.preloader-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(244, 241, 234, 0.46);
}

.preloader-count {
  color: #d8b884;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Fixed 3D Stage (WebGL2 + 3D Particle Overlay + Cinema Grain)
   ========================================================================== */

.stage-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  touch-action: pan-y;
}

#webglCanvas,
#overlayCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#webglCanvas {
  z-index: 1;
}

#overlayCanvas {
  z-index: 2;
  pointer-events: none;
}

.film-grain {
  position: absolute;
  inset: -40%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.032;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

html[data-theme="porcelain"] .film-grain {
  opacity: 0.025;
  mix-blend-mode: multiply;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: var(--vignette);
  transition: background 0.7s var(--ease-expo);
}

/* ==========================================================================
   Custom Precision Cursor
   ========================================================================== */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.3s ease;
  will-change: transform;
}

body.custom-cursor-ready .cursor-dot,
body.custom-cursor-ready .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: transform 0.08s linear, width 0.25s var(--ease-expo), height 0.25s var(--ease-expo), opacity 0.3s;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  backdrop-filter: blur(2px);
  transition:
    width 0.32s var(--ease-expo),
    height 0.32s var(--ease-expo),
    margin 0.32s var(--ease-expo),
    border-color 0.32s ease,
    background-color 0.32s ease,
    opacity 0.3s ease;
}

.cursor-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.22s ease, transform 0.28s var(--ease-expo);
  white-space: nowrap;
}

.cursor-ring.is-labeled {
  width: 68px;
  height: 68px;
  margin-left: -34px;
  margin-top: -34px;
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.cursor-ring.is-labeled .cursor-label {
  opacity: 1;
  transform: scale(1);
}

.cursor-ring.is-dragging {
  width: 52px;
  height: 52px;
  margin-left: -26px;
  margin-top: -26px;
  border-color: var(--accent-bright);
  background: var(--accent-soft);
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1320px, calc(100vw - 32px));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 12px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  transition:
    opacity 0.55s var(--ease-expo),
    transform 0.55s var(--ease-expo),
    background-color 0.5s ease,
    border-color 0.5s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  pointer-events: auto;
}

.brand-emblem {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-bright);
  transition: transform 0.5s var(--ease-expo);
}

.brand:hover .brand-emblem {
  transform: rotate(45deg);
}

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

.brand-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.nav-link.active .nav-idx {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(128, 128, 128, 0.05);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulseDot 2.2s ease-in-out infinite;
}

.telemetry-pill .sep {
  opacity: 0.35;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(128, 128, 128, 0.06);
  font-size: 12px;
  color: var(--text-primary);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s var(--ease-expo);
}

.icon-pill:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.icon-pill[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-bright);
}

/* Audio equalizer micro-bars */
.audio-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.audio-bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.7;
  transition: height 0.25s ease;
}

.audio-bars i:nth-child(2) {
  height: 8px;
}

.audio-bars i:nth-child(3) {
  height: 5px;
}

.icon-pill[aria-pressed="true"] .audio-bars i {
  opacity: 1;
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}

.icon-pill[aria-pressed="true"] .audio-bars i:nth-child(2) {
  animation-delay: 0.22s;
}

.icon-pill[aria-pressed="true"] .audio-bars i:nth-child(3) {
  animation-delay: 0.45s;
}

/* ==========================================================================
   Vertical Chapter Progress Rail
   ========================================================================== */

.chapter-rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo);
}

.rail-track {
  width: 1px;
  height: 76px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 25%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: height 0.2s linear;
}

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

.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: transform 0.35s var(--ease-expo), background-color 0.35s ease, border-color 0.35s ease;
}

.rail-dot:hover {
  transform: scale(1.4);
  border-color: var(--accent);
}

.rail-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 12px var(--accent-glow);
}

.rail-code {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Content Flow & Pass-Through Pointer Layering
   ========================================================================== */

.content-flow {
  position: relative;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-expo), transform 0.6s var(--ease-expo);
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 118px 0 72px;
  pointer-events: none;
}

.container {
  width: min(1280px, calc(100vw - 64px));
  margin: 0 auto;
  pointer-events: none;
}

/* ==========================================================================
   Chapter 01: Hero Stage
   ========================================================================== */

.section-hero {
  min-height: 100svh;
  padding-top: 120px;
  padding-bottom: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 40px;
}

.hero-copy {
  pointer-events: auto;
  max-width: 600px;
}

.eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow-line {
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 6.2vw, 5.4rem);
  line-height: 1.07;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.title-line {
  display: block;
}

.title-accent em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(125deg, var(--text-primary) 10%, var(--accent-bright) 58%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.82;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 34px;
  font-weight: 300;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}

/* Luxury Primary & Ghost Buttons */
.btn-primary,
.btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  overflow: hidden;
  transition: transform 0.35s var(--ease-expo), border-color 0.35s ease, box-shadow 0.35s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: var(--btn-text-on-accent);
  font-weight: 500;
  box-shadow: 0 14px 34px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 18px 44px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-primary .btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.34) 50%, transparent 80%);
  transform: translateX(-110%);
  transition: transform 0.8s var(--ease-expo);
}

.btn-primary:hover .btn-bg {
  transform: translateX(110%);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Hero Metrics Bento Strip */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.metric-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right stage subtle orbit cue */
.hero-stage-hint {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 420px;
  pointer-events: none;
}

.orbit-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.orbit-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px dashed var(--accent);
  animation: spinSlow 9s linear infinite;
}

/* Scroll Cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 0.45s ease;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

.scroll-cue-text {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--text-muted);
}

.scroll-cue-line {
  width: 1px;
  height: 36px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.scroll-cue-line i {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: var(--accent);
  animation: scrollDrop 2s var(--ease-expo) infinite;
}

/* ==========================================================================
   3D Tilt Card & Specular Glow Primitive
   ========================================================================== */

.tilt-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.24s var(--ease-smooth), border-color 0.35s ease, box-shadow 0.35s ease;
}

.tilt-card:hover {
  border-color: var(--border-strong);
}

.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    260px circle at var(--mx) var(--my),
    var(--accent-soft),
    transparent 65%
  );
  transition: opacity 0.35s ease;
}

.tilt-card:hover .card-glow {
  opacity: 1;
}

/* ==========================================================================
   Chapter 02 & 03: Split Architectural Editorial Layouts
   ========================================================================== */

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.split-reversed {
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
}

.panel-column {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spacer-column {
  pointer-events: none;
  min-height: 280px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.15;
  color: var(--text-primary);
}

.section-desc {
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Sculptural Form Selector List */
.form-selector-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-item {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    border-color 0.35s ease,
    background-color 0.35s ease,
    transform 0.35s var(--ease-expo),
    box-shadow 0.35s ease;
}

.form-item:hover {
  border-color: var(--border-strong);
  transform: translateX(6px);
}

.form-item.active {
  border-color: var(--accent);
  background: var(--bg-elevated-strong);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 32px rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--accent-soft);
}

.form-item-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.form-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  width: 24px;
}

.form-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.form-cn {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.form-arrow {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.35s var(--ease-expo), color 0.3s ease;
}

.form-item.active .form-arrow,
.form-item:hover .form-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.form-brief {
  padding-left: 38px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Spec Telemetry Strip */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}

.spec-cell {
  background: var(--bg-elevated-strong);
  backdrop-filter: blur(16px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spec-k {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.spec-v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-bright);
}

/* ==========================================================================
   Chapter 03: Material Cards & Optics Console
   ========================================================================== */

.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.material-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: left;
}

.material-card.active {
  border-color: var(--accent);
  background: var(--bg-elevated-strong);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 0 1px var(--accent-soft);
}

.swatch-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset -4px -5px 10px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.swatch-obsidian {
  background: radial-gradient(circle at 30% 28%, #f5dfb2 0%, #9b7a47 26%, #181719 64%, #060608 100%);
}

.swatch-titanium {
  background: radial-gradient(circle at 30% 28%, #ffffff 0%, #9fc7f3 32%, #29384e 68%, #0a0f18 100%);
}

.swatch-amber {
  background: radial-gradient(circle at 30% 28%, #ffdfb8 0%, #e07d3c 36%, #592610 72%, #130905 100%);
}

.swatch-porcelain {
  background: radial-gradient(circle at 30% 28%, #ffffff 0%, #f1ede4 48%, #c9bfa9 84%, #9a8d79 100%);
  border-color: rgba(20, 20, 20, 0.16);
}

.mat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.mat-meta strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.mat-meta span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.mat-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--accent);
}

/* Optics Studio Console */
.optics-console {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated-strong);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.console-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.console-reset {
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.console-reset:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.slider-row label {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 400;
}

.slider-row label small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-left: 6px;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
}

/* Precision Metallic Range Slider */
.lux-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent) var(--pct, 50%),
    var(--border) var(--pct, 50%),
    var(--border) 100%
  );
  outline: none;
}

.lux-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px var(--accent-glow);
  transition: transform 0.2s var(--ease-expo);
}

.lux-range::-webkit-slider-thumb:hover {
  transform: scale(1.22);
}

.lux-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px var(--accent-glow);
}

/* ==========================================================================
   Chapter 04: Interactive Gallery & Floating Studio Dock
   ========================================================================== */

.section-gallery {
  min-height: 100svh;
  padding-top: 108px;
  padding-bottom: 32px;
}

.gallery-layout {
  min-height: calc(100svh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.gallery-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.gallery-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  letter-spacing: 0.02em;
}

.gallery-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
}

.gallery-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.studio-dock {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated-strong);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.dock-segment {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock-chip {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  transition: color 0.25s ease, background-color 0.25s ease;
}

.dock-chip:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.dock-chip.active {
  color: var(--btn-text-on-accent);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  font-weight: 500;
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.dock-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}

.dock-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  transition: transform 0.28s var(--ease-expo), box-shadow 0.28s ease;
}

.dock-swatch:hover {
  transform: scale(1.16);
}

.dock-swatch.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent);
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.dock-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.dock-icon-btn.active {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.site-footer {
  pointer-events: auto;
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ==========================================================================
   Zen Mode (Immersive Pure 3D Exhibition)
   ========================================================================== */

body.is-zen .site-header,
body.is-zen .chapter-rail,
body.is-zen .content-flow {
  opacity: 0;
  pointer-events: none !important;
  transform: translateY(-10px);
}

body.is-zen .site-header {
  transform: translate(-50%, -18px);
}

.zen-hud {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 24px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo);
}

body.is-zen .zen-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.zen-pill-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-lg);
}

.zen-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.zen-chip:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.zen-chip.active {
  background: var(--accent);
  color: var(--btn-text-on-accent);
  font-weight: 500;
}

.zen-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 2px;
}

.zen-exit-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  color: var(--text-primary);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.zen-exit-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ==========================================================================
   Toast & Reveal Motion
   ========================================================================== */

.toast {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translate(-50%, -12px);
  z-index: 300;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated-strong);
  backdrop-filter: blur(18px);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-expo), transform 0.35s var(--ease-expo);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-expo), transform 0.95s var(--ease-expo);
  transition-delay: var(--d, 0s);
}

body.is-loaded .reveal-up {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.84);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes scrollDrop {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(230%);
  }
}

@keyframes eqBounce {
  0% {
    height: 3px;
  }
  100% {
    height: 11px;
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

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

  .chapter-rail {
    display: none;
  }

  .hero-grid,
  .split-layout,
  .split-reversed {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-stage-hint,
  .spacer-column {
    display: none;
  }

  .section {
    padding: 106px 0 64px;
    align-items: flex-end;
  }

  .section-hero {
    align-items: flex-end;
    padding-bottom: 72px;
  }

  .hero-copy,
  .panel-column {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100vw - 28px);
  }

  .site-header {
    top: 12px;
    width: calc(100vw - 20px);
    padding: 8px 10px 8px 14px;
  }

  .telemetry-pill {
    display: none;
  }

  .pill-text {
    display: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

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

  .studio-dock {
    border-radius: var(--radius-lg);
    padding: 12px;
  }

  .dock-divider {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.15s !important;
  }
}
