/* =============================================================
   PROJECT ※ — 灰域纪元 / ASHEN EPOCH
   Cinematic AAA Game Landing Page — Master Stylesheet
   ============================================================= */

/* =============================================================
   0. CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================================= */
:root {
  /* ---- Palette ---- */
  --bg-abyss:        #06060a;
  --bg-dark:         #0a0a0f;
  --bg-card:         #0d0d14;
  --cyan:            #00e5ff;
  --cyan-glow:       rgba(0, 229, 255, 0.3);
  --cyan-dim:        rgba(0, 229, 255, 0.12);
  --red:             #ff1744;
  --red-glow:        rgba(255, 23, 68, 0.25);
  --amber:           #ffab40;
  --amber-glow:      rgba(255, 171, 64, 0.2);
  --text-primary:    #e8e6e3;
  --text-secondary:  rgba(232, 230, 227, 0.55);
  --text-dim:        rgba(232, 230, 227, 0.25);
  --border-subtle:   rgba(255, 255, 255, 0.06);

  /* ---- Typography scale ---- */
  --fs-display:      clamp(3rem, 8vw, 7rem);
  --fs-h1:           clamp(2rem, 5vw, 3.5rem);
  --fs-h2:           clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3:           clamp(1.1rem, 2vw, 1.5rem);
  --fs-body:         clamp(0.9rem, 1.2vw, 1.05rem);
  --fs-small:        clamp(0.7rem, 0.9vw, 0.8rem);
  --fs-hud:          0.65rem;

  /* ---- Font stacks ---- */
  --ff-heading:      'Rajdhani', sans-serif;
  --ff-body-zh:      'Noto Sans SC', sans-serif;
  --ff-body-en:      'Outfit', sans-serif;
  --ff-mono:         'JetBrains Mono', monospace;

  /* ---- Spacing ---- */
  --space-xs:        0.5rem;
  --space-sm:        1rem;
  --space-md:        2rem;
  --space-lg:        4rem;
  --space-xl:        8rem;

  /* ---- Timing ---- */
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart:  cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:     cubic-bezier(0.76, 0, 0.24, 1);
  --duration-fast:   0.2s;
  --duration-base:   0.4s;
  --duration-slow:   0.8s;
  --duration-reveal: 1.2s;

  /* ---- Layout ---- */
  --nav-height:      60px;
  --cinema-bar:      5vh;
  --content-max:     1200px;
  --chapter-max:     700px;

  /* ---- Z layers ---- */
  --z-grain:         100;
  --z-nav:           50;
  --z-loading:       9999;
}


/* =============================================================
   1. RESET & BASE
   ============================================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  font-family: var(--ff-body-en);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--text-primary);
  background-color: var(--bg-abyss);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

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

canvas {
  display: block;
}


/* ---- Selection ---- */
::selection {
  background: var(--cyan);
  color: var(--bg-abyss);
}

::-moz-selection {
  background: var(--cyan);
  color: var(--bg-abyss);
}


/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-abyss);
}

::-webkit-scrollbar-thumb {
  background: var(--cyan-dim);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg-abyss);
}


/* =============================================================
   2. KEYFRAME ANIMATIONS
   ============================================================= */

/* 1 — Ken Burns : hero background drift */
@keyframes kenBurns {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}

/* 2 — Glitch text jitter */
@keyframes glitchText {
  0%   { text-shadow: 2px 0 var(--cyan), -2px 0 var(--red); clip-path: inset(0 0 0 0); }
  5%   { text-shadow: -3px 0 var(--red), 3px 0 var(--cyan); clip-path: inset(40% 0 20% 0); }
  10%  { text-shadow: 3px 2px var(--cyan), -1px -2px var(--red); clip-path: inset(0 0 0 0); }
  15%  { text-shadow: -1px 0 var(--red), 1px 0 var(--cyan); clip-path: inset(60% 0 5% 0); }
  20%  { text-shadow: 0 0 transparent; clip-path: inset(0 0 0 0); }
  100% { text-shadow: 0 0 transparent; clip-path: inset(0 0 0 0); }
}

/* 3 — Fade in from below */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* 4 — Fade in from left */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-30px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* 5 — Breathing pulse for scroll indicator */
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* 6 — CRT scanline sweep */
@keyframes scanline {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* 7 — Rune circle rotation */
@keyframes runeRotate {
  from { transform: translate3d(-50%, -50%, 0) rotate(0deg); }
  to   { transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}

/* 8 — Loading progress bar */
@keyframes progressBar {
  from { width: 0; }
  to   { width: 100%; }
}

/* 9 — Pulsing glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 6px var(--cyan-glow), 0 0 20px transparent; }
  50%      { box-shadow: 0 0 12px var(--cyan-glow), 0 0 40px var(--cyan-glow); }
}

/* 10 — Typewriter cursor blink */
@keyframes typewriterCursor {
  0%, 100% { border-right-color: var(--cyan); }
  50%      { border-right-color: transparent; }
}

/* 11 — Cinematic circle reveal */
@keyframes cinematicReveal {
  0%   { clip-path: circle(0% at 50% 50%); }
  100% { clip-path: circle(150% at 50% 50%); }
}

/* 12 — Subtle float */
@keyframes floatUp {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -8px, 0); }
}

/* 13 — Film grain noise shift */
@keyframes noiseShift {
  0%   { background-position: 0 0; }
  20%  { background-position: -20% 30%; }
  40%  { background-position: 40% -10%; }
  60%  { background-position: -30% 50%; }
  80%  { background-position: 60% -40%; }
  100% { background-position: 10% 20%; }
}

/* 14 — Snowfall */
@keyframes snowfall {
  0%   { transform: translate3d(0, -10%, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(20px, 110vh, 0) rotate(360deg); opacity: 0.3; }
}

/* 15 — Chevron bounce */
@keyframes chevronBounce {
  0%, 100% { transform: translate3d(-50%, 0, 0); }
  50%      { transform: translate3d(-50%, 6px, 0); }
}

/* 16 — Typing indicator dots */
@keyframes typingDots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
}

/* 17 — Subtle horizontal scan */
@keyframes horizScan {
  0%   { transform: translate3d(-100%, 0, 0); }
  100% { transform: translate3d(100%, 0, 0); }
}

/* 18 — Data flicker */
@keyframes dataFlicker {
  0%, 95%, 100% { opacity: 1; }
  96%  { opacity: 0.3; }
  97%  { opacity: 0.8; }
  98%  { opacity: 0.2; }
  99%  { opacity: 0.9; }
}


/* =============================================================
   3. LOADING SCREEN (#loading-screen)
   ============================================================= */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading);
  background: var(--bg-abyss);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: clip-path 1.2s var(--ease-in-out),
              opacity 0.6s ease 1s;
  clip-path: circle(150% at 50% 50%);
  will-change: clip-path, opacity;
}

body.loaded #loading-screen {
  clip-path: circle(0% at 50% 50%);
  opacity: 0;
  pointer-events: none;
}

#loading-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.loading-logo {
  font-family: var(--ff-heading);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
  animation: glitchText 3s ease-in-out infinite;
  user-select: none;
  letter-spacing: 0.05em;
  will-change: transform, text-shadow;
}

.loading-logo::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.loading-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-glow));
  animation: progressBar 2.5s var(--ease-out-expo) forwards;
  will-change: width;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.loading-text {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-right: 1px solid var(--cyan);
  padding-right: 4px;
  animation: typewriterCursor 0.8s step-end infinite;
  white-space: nowrap;
}


/* =============================================================
   4. FILM GRAIN OVERLAY (#film-grain)
   ============================================================= */
#film-grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.035;
  will-change: background-position;
  animation: noiseShift 0.3s steps(6) infinite;
  background-image:
    repeating-radial-gradient(
      circle at 17% 32%,
      rgba(255,255,255,0.06) 0px,
      transparent 1px
    ),
    repeating-radial-gradient(
      circle at 63% 68%,
      rgba(255,255,255,0.05) 0px,
      transparent 1px
    ),
    repeating-radial-gradient(
      circle at 44% 11%,
      rgba(255,255,255,0.04) 0px,
      transparent 1px
    );
  background-size: 3px 3px, 4px 4px, 5px 5px;
  mix-blend-mode: overlay;
}

/* Horizontal scan line that sweeps across the grain */
#film-grain::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.03);
  animation: scanline 8s linear infinite;
  will-change: background-position;
}


/* =============================================================
   5. NAVIGATION (#main-nav)
   ============================================================= */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: transparent;
  transition: background var(--duration-base) ease,
              backdrop-filter var(--duration-base) ease,
              border-color var(--duration-base) ease;
  border-bottom: 1px solid transparent;
}

#main-nav.nav-scrolled {
  background: rgba(6, 6, 10, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border-subtle);
}

.nav-logo {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  position: relative;
}

.nav-logo::before {
  content: '//';
  color: var(--cyan);
  margin-right: 0.4em;
  font-weight: 400;
  opacity: 0.6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.nav-links a {
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 0.3em 0;
  transition: color var(--duration-fast) ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-hud {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  display: flex;
  gap: 1.5rem;
  margin-left: 2rem;
}

.nav-hud span {
  animation: dataFlicker 4s ease infinite;
}


/* =============================================================
   6. HERO SECTION (#hero)
   ============================================================= */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-abyss);
}

/* ---- Ken Burns background ---- */
.hero-image-container {
  position: absolute;
  inset: -5%;              /* bleed for scale animation */
  width: 110%;
  height: 110%;
  will-change: transform;
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 20s ease-in-out infinite alternate;
  will-change: transform;
  transform: translate3d(0, 0, 0);   /* force GPU layer */
}

/* ---- Gradient overlay ---- */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6, 6, 10, 0.25) 0%,
      rgba(6, 6, 10, 0.55) 50%,
      var(--bg-abyss) 100%
    ),
    linear-gradient(90deg,
      rgba(6, 6, 10, 0.4) 0%,
      transparent 30%,
      transparent 70%,
      rgba(6, 6, 10, 0.4) 100%
    );
  z-index: 2;
}

/* ---- Cinema letterbox bars ---- */
.hero-cinema-bars {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hero-cinema-bars::before,
.hero-cinema-bars::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: var(--cinema-bar);
  background: var(--bg-abyss);
}

.hero-cinema-bars::before { top: 0; }
.hero-cinema-bars::after  { bottom: 0; }

/* ---- Hero content ---- */
.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: var(--space-md);
  animation: fadeInUp var(--duration-reveal) var(--ease-out-expo) 0.3s both;
}

.hero-title {
  font-family: var(--ff-body-zh);
  font-weight: 400;
  font-size: var(--fs-display);
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: 0.08em;
  margin-bottom: 0.15em;
  text-shadow:
    0 0 40px rgba(0, 229, 255, 0.08),
    0 2px 60px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: clamp(0.8rem, 2vw, 1.3rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.2em;
}

.hero-subtitle::before,
.hero-subtitle::after {
  content: '—';
  margin: 0 0.6em;
  color: var(--text-dim);
}

.hero-tagline {
  font-family: var(--ff-body-en);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---- HUD corners ---- */
.hero-hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hero-hud > div {
  position: absolute;
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  line-height: 1.6;
  animation: dataFlicker 6s ease infinite;
}

.hud-top-left {
  top: calc(var(--cinema-bar) + 16px);
  left: 24px;
}

.hud-top-right {
  top: calc(var(--cinema-bar) + 16px);
  right: 24px;
  text-align: right;
}

.hud-bottom-left {
  bottom: calc(var(--cinema-bar) + 16px);
  left: 24px;
}

.hud-bottom-right {
  bottom: calc(var(--cinema-bar) + 16px);
  right: 24px;
  text-align: right;
}

/* Accent bracket decoration for HUD */
.hud-top-left::before,
.hud-bottom-right::after {
  color: var(--cyan);
  opacity: 0.3;
}

.hud-top-left::before { content: '[ '; }
.hud-bottom-right::after { content: ' ]'; }

/* ---- Scroll indicator ---- */
.hero-scroll-indicator {
  position: absolute;
  bottom: calc(var(--cinema-bar) + 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: breathe 3s ease-in-out infinite;
  cursor: pointer;
}

.hero-scroll-indicator span {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero-scroll-indicator::after {
  content: '⌄';
  font-size: 1.2rem;
  color: var(--cyan);
  animation: chevronBounce 1.5s ease-in-out infinite;
  position: relative;
  left: 50%;
}


/* =============================================================
   7. CHAPTER SECTIONS (.chapter-section)
   ============================================================= */
.chapter-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-abyss);
}

/* ---- Parallax background ---- */
.chapter-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  overflow: hidden;
}

.chapter-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.1s linear;   /* JS parallax smoothing */
}

.chapter-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      var(--bg-abyss) 0%,
      rgba(6, 6, 10, 0.6) 30%,
      rgba(6, 6, 10, 0.6) 70%,
      var(--bg-abyss) 100%
    ),
    linear-gradient(90deg,
      var(--bg-abyss) 0%,
      transparent 40%
    );
}

.chapter-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ---- Chapter content ---- */
.chapter-content {
  position: relative;
  z-index: 3;
  max-width: var(--chapter-max);
  padding: var(--space-xl) clamp(1.5rem, 6vw, 5rem);
  /* Start hidden — revealed by .is-visible */
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
  will-change: opacity, transform;
}

.chapter-section.is-visible .chapter-content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.chapter-number {
  font-family: var(--ff-mono);
  font-size: var(--fs-small);
  color: var(--cyan);
  letter-spacing: 0.3em;
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.chapter-number::before {
  content: '//';
  margin-right: 0.3em;
  opacity: 0.4;
}

.chapter-title-en {
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: var(--fs-h1);
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 0.3em;
}

.chapter-title-zh {
  font-family: var(--ff-body-zh);
  font-weight: 400;
  font-size: var(--fs-h2);
  color: var(--text-primary);
  padding-left: 1em;
  border-left: 2px solid var(--cyan);
  margin-bottom: 1.5em;
  line-height: 1.4;
}

.chapter-text {
  font-family: var(--ff-body-zh);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.5em;
}

.chapter-hud {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  animation: dataFlicker 5s ease infinite;
}

.chapter-hud span {
  white-space: nowrap;
}

/* ---- Chapter accent color variants ---- */
/* Port — amber */
.chapter-port .chapter-number          { color: var(--amber); }
.chapter-port .chapter-title-zh        { border-left-color: var(--amber); }
.chapter-port .chapter-hud             { border-top-color: rgba(255, 171, 64, 0.1); }

/* Ruins — cyan (default accent, minimal overrides) */
.chapter-ruins .chapter-number         { color: var(--cyan); }
.chapter-ruins .chapter-title-zh       { border-left-color: var(--cyan); }

/* Journey — amber */
.chapter-journey .chapter-number       { color: var(--amber); }
.chapter-journey .chapter-title-zh     { border-left-color: var(--amber); }
.chapter-journey .chapter-hud          { border-top-color: rgba(255, 171, 64, 0.1); }

/* Memory — red */
.chapter-memory .chapter-number        { color: var(--red); }
.chapter-memory .chapter-title-zh      { border-left-color: var(--red); }
.chapter-memory .chapter-hud           { border-top-color: rgba(255, 23, 68, 0.08); }

/* Hope — amber */
.chapter-hope .chapter-number          { color: var(--amber); }
.chapter-hope .chapter-title-zh        { border-left-color: var(--amber); }
.chapter-hope .chapter-hud             { border-top-color: rgba(255, 171, 64, 0.1); }

/* ---- Staggered reveal for children ---- */
.chapter-section.is-visible .chapter-number {
  animation: fadeInLeft var(--duration-slow) var(--ease-out-expo) 0.1s both;
}

.chapter-section.is-visible .chapter-title-en {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.2s both;
}

.chapter-section.is-visible .chapter-title-zh {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.35s both;
}

.chapter-section.is-visible .chapter-text {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.5s both;
}

.chapter-section.is-visible .chapter-hud {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.65s both;
}


/* =============================================================
   8. CHARACTER SECTION (#character-section)
   ============================================================= */
#character-section {
  position: relative;
  padding: var(--space-xl) 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0, 229, 255, 0.03) 0%, transparent 60%),
    var(--bg-dark);
  overflow: hidden;
}

.character-container {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ---- Character image ---- */
.character-image-wrapper {
  flex: 0 0 40%;
  position: relative;
}

.character-image {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: contrast(1.05) brightness(0.95);
}

.character-scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  animation: scanline 12s linear infinite;
  will-change: background-position;
  mix-blend-mode: multiply;
}

.character-frame {
  position: absolute;
  inset: -12px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid var(--border-subtle);
}

/* Corner accent marks */
.character-frame::before,
.character-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--cyan);
  border-style: solid;
}

.character-frame::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.character-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

/* ---- Character info ---- */
.character-info {
  flex: 1;
  min-width: 0;
}

.character-codename {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: var(--fs-h1);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.15em;
  line-height: 1.1;
}

.character-codename::before {
  content: '「';
  color: var(--cyan);
  opacity: 0.5;
  font-weight: 400;
}

.character-codename::after {
  content: '」';
  color: var(--cyan);
  opacity: 0.5;
  font-weight: 400;
}

.character-name {
  font-family: var(--ff-body-zh);
  font-weight: 300;
  font-size: var(--fs-h3);
  color: var(--text-secondary);
  margin-bottom: 2em;
}

.character-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2em;
}

.stat-item {
  padding-left: 0.8em;
  border-left: 2px solid var(--cyan-dim);
  transition: border-color var(--duration-fast) ease;
}

.stat-item:hover {
  border-left-color: var(--cyan);
}

.stat-item .stat-label {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.2em;
}

.stat-item .stat-value {
  font-family: var(--ff-body-zh);
  font-weight: 400;
  font-size: var(--fs-body);
  color: var(--text-primary);
}

.character-bio {
  font-family: var(--ff-body-zh);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 2;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-subtle);
}

/* ---- Rune circle decoration ---- */
.rune-circle {
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translate3d(-50%, -50%, 0);
  width: clamp(400px, 50vw, 700px);
  height: clamp(400px, 50vw, 700px);
  border: 1px dashed var(--border-subtle);
  border-radius: 50%;
  animation: runeRotate 60s linear infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.rune-circle::before {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px dashed var(--border-subtle);
  border-radius: 50%;
  opacity: 0.5;
}

.rune-circle::after {
  content: '';
  position: absolute;
  inset: 80px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  opacity: 0.3;
}


/* =============================================================
   9. DOWNLOAD SECTION (#download-section)
   ============================================================= */
#download-section {
  position: relative;
  padding: var(--space-xl) 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-abyss);
}

/* Background image container */
#download-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

/* Heavy dark overlay */
#download-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(6, 6, 10, 0.6) 0%, var(--bg-abyss) 70%),
    linear-gradient(180deg, var(--bg-abyss) 0%, transparent 15%, transparent 85%, var(--bg-abyss) 100%);
  z-index: 1;
}

.download-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.download-logo {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: var(--fs-h1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.4em;
}

.download-logo span {
  color: var(--cyan);
}

.download-subtitle {
  font-family: var(--ff-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3em;
}

.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3em;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.9em 2.2em;
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: var(--fs-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--duration-base) ease,
    box-shadow var(--duration-base) ease,
    transform var(--duration-fast) ease,
    background var(--duration-base) ease;
  will-change: transform, box-shadow;
}

.platform-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cyan-glow), transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-base) ease;
}

.platform-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow), inset 0 0 20px rgba(0, 229, 255, 0.05);
  transform: scale(1.03) translate3d(0, -2px, 0);
}

.platform-btn:hover::before {
  opacity: 1;
}

.platform-btn:active {
  transform: scale(0.98) translate3d(0, 0, 0);
}

/* Platform icon placeholder */
.platform-btn .btn-icon {
  font-size: 1.3em;
  opacity: 0.8;
}

.platform-btn .btn-label {
  position: relative;
  z-index: 1;
}

/* Platform-specific accent lines */
.platform-btn.steam { border-left: 2px solid var(--cyan); }
.platform-btn.ps5   { border-left: 2px solid #2196f3; }
.platform-btn.switch { border-left: 2px solid var(--red); }

.download-info {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  line-height: 2;
  max-width: 500px;
  margin: 0 auto;
}


/* =============================================================
   10. FOOTER (#main-footer)
   ============================================================= */
#main-footer {
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--bg-abyss);
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-subtle) 20%,
    rgba(0, 229, 255, 0.08) 50%,
    var(--border-subtle) 80%,
    transparent 100%
  );
  margin-bottom: var(--space-md);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.footer-content .copyright {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color var(--duration-fast) ease;
  position: relative;
}

.social-links a:hover {
  color: var(--cyan);
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.social-links a:hover::after {
  width: 100%;
}


/* =============================================================
   11. UTILITY CLASSES
   ============================================================= */

/* Monospace data styling */
.mono { font-family: var(--ff-mono); }
.hud-data {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

/* Accent colors */
.accent-cyan  { color: var(--cyan); }
.accent-red   { color: var(--red); }
.accent-amber { color: var(--amber); }

/* Section divider — used between major sections */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

/* Glitch effect class */
.glitch {
  animation: glitchText 3s ease-in-out infinite;
}

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


/* =============================================================
   12. RESPONSIVE — DESKTOP LARGE (≤ 1200px)
   ============================================================= */
@media (max-width: 1200px) {
  :root {
    --space-xl: 6rem;
  }

  .character-container {
    gap: 2.5rem;
  }

  .rune-circle {
    width: 400px;
    height: 400px;
  }
}


/* =============================================================
   13. RESPONSIVE — TABLET (≤ 768px)
   ============================================================= */
@media (max-width: 768px) {
  :root {
    --nav-height: 50px;
    --cinema-bar: 3vh;
    --space-xl:   4rem;
  }

  /* Nav */
  .nav-hud {
    display: none;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }

  /* Hero */
  .hero-subtitle {
    letter-spacing: 0.3em;
  }

  .hero-hud > div {
    font-size: 0.55rem;
  }

  .hud-top-right,
  .hud-bottom-left {
    display: none;
  }

  /* Chapters */
  .chapter-content {
    padding: var(--space-lg) var(--space-md);
  }

  /* Character — stack vertically */
  .character-container {
    flex-direction: column;
    text-align: center;
  }

  .character-image-wrapper {
    flex: none;
    width: 70%;
    max-width: 360px;
    margin: 0 auto;
  }

  .character-info {
    text-align: left;
  }

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

  .rune-circle {
    width: 300px;
    height: 300px;
    top: 20%;
    left: 50%;
  }

  /* Download */
  .platform-buttons {
    flex-direction: column;
    align-items: center;
  }

  .platform-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}


/* =============================================================
   14. RESPONSIVE — MOBILE (≤ 480px)
   ============================================================= */
@media (max-width: 480px) {
  :root {
    --cinema-bar: 2vh;
    --space-xl:   3rem;
    --space-lg:   2rem;
  }

  /* Nav */
  .nav-logo {
    font-size: 0.9rem;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-links a {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  /* Hero */
  .hero-title {
    letter-spacing: 0.04em;
  }

  .hero-subtitle::before,
  .hero-subtitle::after {
    display: none;
  }

  .hero-tagline {
    display: none;
  }

  .hero-hud {
    display: none;
  }

  .hero-scroll-indicator span {
    font-size: 0.5rem;
  }

  /* Chapters */
  .chapter-content {
    padding: var(--space-md) var(--space-sm);
  }

  .chapter-title-en {
    letter-spacing: 0.04em;
  }

  .chapter-hud {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Character */
  .character-image-wrapper {
    width: 90%;
  }

  .character-stats {
    grid-template-columns: 1fr;
  }

  .character-codename {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* Download */
  .download-subtitle {
    letter-spacing: 0.25em;
  }

  .platform-btn {
    padding: 0.8em 1.5em;
    font-size: 0.85rem;
  }

  /* Footer */
  .social-links {
    gap: 1rem;
  }
}


/* =============================================================
   15. REDUCED MOTION — ACCESSIBILITY
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-image-container img {
    animation: none;
  }

  #film-grain {
    animation: none;
    opacity: 0;
  }

  .rune-circle {
    animation: none;
  }

  .chapter-content {
    opacity: 1;
    transform: none;
  }
}


/* =============================================================
   16. ADDITIONAL COMPONENT STYLES
   ============================================================= */

/* ---- Loading Center & Meta ---- */
.loading-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loading-meta {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 3rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.2em;
  opacity: 0.3;
  z-index: 2;
}

.loading-dots {
  animation: typingDots 1.2s steps(3) infinite;
}

/* ---- Nav Inner ---- */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

#main-nav {
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.nav-logo-mark {
  color: var(--cyan);
  margin-right: 0.2em;
}

.nav-logo-text {
  font-family: var(--ff-heading);
  font-weight: 700;
  letter-spacing: 0.15em;
}

.hud-separator {
  color: var(--text-dim);
  opacity: 0.3;
}

.hud-label {
  color: var(--text-dim);
  opacity: 0.5;
  font-size: 0.6rem;
  margin-left: 0.15em;
  margin-right: 0.5em;
}

/* ---- Hero Eyebrow ---- */
.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.5;
  margin-bottom: 1.5em;
}

/* ---- HUD lines ---- */
.hud-line {
  display: block;
}

.hud-value-warn {
  color: var(--red) !important;
}

/* ---- HUD data items in chapters ---- */
.hud-data-item {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.hud-data-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  opacity: 0.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hud-data-value {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.hud-data-unit {
  font-size: 0.55rem;
  color: var(--text-dim);
  opacity: 0.5;
}

/* ---- Chapter content alignment variants ---- */
.chapter-content-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.chapter-content-center .chapter-title-zh {
  border-left: none;
  padding-left: 0;
  display: inline-block;
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 0.3em;
}

.chapter-content-right {
  margin-left: auto;
  margin-right: clamp(2rem, 8vw, 8rem);
}

/* ---- Chapter text elegant (Memory chapter) ---- */
.chapter-text-elegant {
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 2.2;
}

/* ---- Chapter bg pan (Journey chapter) ---- */
.chapter-bg-pan img {
  animation: kenBurns 30s ease-in-out infinite alternate;
}

/* ---- Chapter overlay - hope variant ---- */
.chapter-overlay-hope {
  background:
    linear-gradient(180deg,
      var(--bg-abyss) 0%,
      rgba(6, 6, 10, 0.4) 30%,
      rgba(6, 6, 10, 0.3) 70%,
      var(--bg-abyss) 100%
    ),
    linear-gradient(90deg,
      var(--bg-abyss) 0%,
      transparent 40%
    ) !important;
}

/* ---- Download background image ---- */
.download-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.download-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  filter: blur(2px) grayscale(0.3);
}

.download-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(6, 6, 10, 0.65) 0%, var(--bg-abyss) 75%),
    linear-gradient(180deg, var(--bg-abyss) 0%, transparent 15%, transparent 85%, var(--bg-abyss) 100%);
}

/* ---- Download logo decomposed ---- */
.download-eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2em;
}

.download-logo {
  margin-bottom: 1.5em;
}

.download-logo-mark {
  font-family: var(--ff-heading);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--cyan);
  display: block;
  line-height: 1;
  text-shadow: 0 0 40px var(--cyan-glow), 0 0 80px rgba(0, 229, 255, 0.15);
  animation: pulseGlow 3s ease-in-out infinite;
  margin-bottom: 0.2em;
}

.download-logo-title {
  font-family: var(--ff-body-zh);
  font-weight: 400;
  font-size: var(--fs-h1);
  color: var(--text-primary);
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.download-logo-subtitle {
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--text-secondary);
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.download-description {
  font-family: var(--ff-body-zh);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 2.5em;
}

/* ---- Platform button inner layout ---- */
.platform-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.platform-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.platform-btn-label {
  font-family: var(--ff-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.platform-btn-name {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* Platform-specific left borders */
.platform-btn-steam { border-left: 2px solid var(--cyan); }
.platform-btn-ps5   { border-left: 2px solid #4a90d9; }
.platform-btn-switch { border-left: 2px solid var(--red); }

/* ---- Download info items ---- */
.download-info-item {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-bottom: 0.3em;
}

.download-info-label {
  color: var(--text-dim);
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.15em;
  min-width: 5em;
  text-align: right;
}

.download-info-value {
  color: var(--text-secondary);
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.05em;
}

/* ---- Character header ---- */
.character-header {
  margin-bottom: 2em;
}

.character-image-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--cyan);
  letter-spacing: 0.2em;
  opacity: 0.5;
  z-index: 3;
  background: rgba(6, 6, 10, 0.6);
  padding: 0.3em 0.6em;
  border: 1px solid var(--border-subtle);
}

.stat-value-active {
  color: var(--cyan) !important;
}

.stat-value-warn {
  color: var(--red) !important;
  font-weight: 400;
}

.character-bio p {
  margin-bottom: 1em;
}

.character-bio-warning {
  color: var(--red) !important;
  font-size: var(--fs-small);
  font-family: var(--ff-mono);
  letter-spacing: 0.1em;
  padding: 0.8em;
  border: 1px solid rgba(255, 23, 68, 0.15);
  background: rgba(255, 23, 68, 0.04);
  margin-top: 1em;
}

/* ---- Footer layout ---- */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.footer-logo {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.footer-copy {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-bottom {
  text-align: center;
  padding: var(--space-md) clamp(1.5rem, 4vw, 3rem) 0;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-meta {
  font-family: var(--ff-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.25em;
  opacity: 0.3;
}

/* ---- Scroll indicator children ---- */
.scroll-text {
  font-family: var(--ff-mono);
  font-size: var(--fs-hud);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-chevron {
  color: var(--cyan);
  animation: chevronBounce 1.5s ease-in-out infinite;
}

/* ---- Scroll-triggered animation classes (set by scroll.js) ---- */
[data-animate] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
  will-change: opacity, transform;
}

[data-animate="fade-left"] {
  transform: translate3d(-30px, 0, 0);
}

[data-animate].is-animated {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Character & download section reveal */
#character-section [data-animate],
#download-section [data-animate] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}

#character-section.is-visible [data-animate].is-animated,
#download-section.is-visible [data-animate].is-animated {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

#character-section [data-animate="fade-left"] {
  transform: translate3d(-50px, 0, 0);
}

/* ---- Typewriter cursor blink ---- */
@keyframes blink {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 0; }
}


/* =============================================================
   17. PRINT STYLES
   ============================================================= */
@media print {
  #loading-screen,
  #film-grain,
  .hero-cinema-bars,
  .hero-hud,
  .hero-scroll-indicator,
  .rune-circle,
  .chapter-particles,
  .character-scanlines,
  .nav-hud {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  #main-nav {
    position: static;
    background: #fff;
    border-bottom: 1px solid #ccc;
  }
}
