/* ═══════════════════════════════════════════════════════════
   FINAL FANTASY IX — Tribute Landing Page
   Storybook-fantasy identity: parchment, deep blue, gold, crystal
   ═══════════════════════════════════════════════════════════ */

:root {
  --night-900: #0a0e24;
  --night-800: #10173a;
  --night-700: #182250;
  --night-600: #223066;
  --parchment: #f1e6c8;
  --parchment-deep: #e4d3ac;
  --parchment-ink: #2b2416;
  --gold: #d4af6a;
  --gold-deep: #b98a3e;
  --gold-bright: #f0d9a0;
  --crystal: #8fd8ec;
  --crystal-deep: #4fa8c8;
  --white: #fdfaf2;
  --shadow-lg: 0 24px 60px rgba(4, 6, 20, .55);
  --shadow-md: 0 10px 30px rgba(4, 6, 20, .4);
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'EB Garamond', Georgia, serif;
  --nav-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
}

body {
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--white);
  background: var(--night-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--crystal);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold-deep); color: var(--night-900); }

.container { width: min(1180px, 92vw); margin-inline: auto; }

/* ── Preloader ─────────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: 1.2rem;
  background: radial-gradient(ellipse at 50% 40%, var(--night-700), var(--night-900) 70%);
  transition: opacity .7s var(--ease-out), visibility .7s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-crystal { animation: crystal-pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(212, 175, 106, .45)); }
.preloader-text {
  font-family: var(--font-display); font-size: .85rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--gold);
}
@keyframes crystal-pulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: .75; }
  50% { transform: translateY(-8px) scale(1.05); opacity: 1; }
}

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(8, 11, 30, .92), rgba(8, 11, 30, .78));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 106, .18);
}
/* Top-of-page state: still a dark, blurred surface so the nav reads
   clearly over the bright hero key art; scrolled state adds the border. */
.nav.at-top {
  background: linear-gradient(to bottom, rgba(8, 11, 30, .85), rgba(8, 11, 30, .62));
  border-bottom-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  width: min(1280px, 94vw); margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo { height: 34px; width: auto; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.nav-links { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 1.9rem); }
.nav-links a {
  font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: rgba(253, 250, 242, .78); padding: .4rem .15rem; position: relative;
  transition: color .25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.nav-cta {
  color: var(--night-900); background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  padding: .5rem 1.1rem; border-radius: 3px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(212, 175, 106, .35);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.nav-links a.nav-cta::after { display: none; }
.nav-links a.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(212, 175, 106, .5); color: var(--night-900); }
.nav-controls { display: flex; align-items: center; gap: .8rem; }

.audio-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(212, 175, 106, .35); color: var(--gold);
  transition: background .25s, color .25s, box-shadow .25s;
}
.audio-toggle:hover { background: rgba(212, 175, 106, .12); }
.audio-toggle svg { display: block; }
.audio-toggle .icon-sound-on { display: none; }
.audio-toggle[aria-pressed="true"] { background: var(--gold-deep); color: var(--night-900); box-shadow: 0 0 16px rgba(212, 175, 106, .5); }
.audio-toggle[aria-pressed="true"] .icon-sound-on { display: block; }
.audio-toggle[aria-pressed="true"] .icon-sound-off { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--gold); transition: transform .3s var(--ease-out), opacity .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.nav-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--crystal-deep), var(--gold)); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: .95rem 2.1rem; border-radius: 3px;
  transition: transform .3s var(--ease-out), box-shadow .3s, background .3s, color .3s;
}
.btn-gold {
  color: var(--night-900); font-size: 1.02rem;
  padding: 1.1rem 2.6rem;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  box-shadow: 0 10px 30px rgba(212, 175, 106, .45), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-gold:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 40px rgba(212, 175, 106, .6); }
.btn-ghost {
  color: var(--gold-bright); font-size: .8rem; font-weight: 600;
  padding: .5rem .2rem .45rem; border-radius: 0;
  border-bottom: 1px solid rgba(240, 217, 160, .55);
  background: transparent;
  text-shadow: 0 1px 6px rgba(10, 14, 36, .95), 0 2px 18px rgba(10, 14, 36, .85);
  transition: color .25s, border-color .25s, text-shadow .25s;
}
.btn-ghost:hover { color: var(--white); border-bottom-color: var(--gold); text-shadow: 0 0 16px rgba(240, 217, 160, .55), 0 2px 8px rgba(10, 14, 36, .95); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--night-900);
}
.hero-layer { position: absolute; inset: -6% -6% -6% -6%; pointer-events: none; will-change: transform; }

.hero-sky {
  background:
    radial-gradient(ellipse 65% 50% at 68% 30%, rgba(143, 216, 236, .20), transparent 60%),
    radial-gradient(ellipse 80% 60% at 25% 15%, rgba(79, 98, 168, .35), transparent 65%),
    linear-gradient(to bottom, #1a2450 0%, #131b40 45%, var(--night-900) 100%);
}
.hero-art {
  background: url('../img/hero/hero-cast.webp') right center / auto 112% no-repeat;
  opacity: .95;
  mask-image:
    linear-gradient(to right, transparent 4%, black 34%),
    linear-gradient(to bottom, black 62%, transparent 99%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to right, transparent 4%, black 34%),
    linear-gradient(to bottom, black 62%, transparent 99%);
  -webkit-mask-composite: source-in;
}
.hero-clouds {
  background-repeat: repeat-x;
  background-size: 1400px auto;
  opacity: .5;
}
.hero-clouds--back {
  background-image: radial-gradient(ellipse 340px 70px at 12% 24%, rgba(190, 205, 240, .14), transparent 70%),
                    radial-gradient(ellipse 420px 80px at 58% 14%, rgba(190, 205, 240, .10), transparent 70%),
                    radial-gradient(ellipse 300px 60px at 86% 30%, rgba(190, 205, 240, .12), transparent 70%);
  animation: clouds-drift 110s linear infinite;
}
.hero-clouds--front {
  background-image: radial-gradient(ellipse 480px 90px at 30% 82%, rgba(170, 190, 235, .10), transparent 70%),
                    radial-gradient(ellipse 380px 70px at 78% 74%, rgba(170, 190, 235, .12), transparent 70%);
  animation: clouds-drift 75s linear infinite reverse;
}
@keyframes clouds-drift {
  from { background-position-x: 0, 0, 0; }
  to { background-position-x: 1400px, 1400px, 1400px; }
}
.hero-mist {
  background: radial-gradient(ellipse 60% 26% at 50% 96%, rgba(168, 196, 232, .16), transparent 70%);
}
.hero-mist--a { animation: mist-sway 26s ease-in-out infinite alternate; }
.hero-mist--b {
  background: radial-gradient(ellipse 46% 20% at 30% 100%, rgba(212, 175, 106, .10), transparent 70%);
  animation: mist-sway 34s ease-in-out infinite alternate-reverse;
}
@keyframes mist-sway {
  from { transform: translateX(-4%) scale(1); }
  to { transform: translateX(4%) scale(1.06); }
}
.hero-particles { inset: 0; width: 100%; height: 100%; }

.hero-content {
  position: relative; z-index: 5; text-align: center;
  padding: calc(var(--nav-h) + 3vh) 5vw 5vh;
  display: grid; justify-items: center; gap: 1.45rem;
}
/* Dark scrim behind the text stack: keeps eyebrow / tagline / CTAs
   readable over the bright key art without dimming the whole hero. */
.hero-content::before {
  content: ''; position: absolute; z-index: -1; inset: -9vh -26vw -7vh;
  background: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(8, 11, 30, .78) 0%, rgba(8, 11, 30, .55) 45%, rgba(8, 11, 30, 0) 80%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(.8rem, 1.5vw, 1rem);
  letter-spacing: .3em; text-transform: uppercase; color: var(--crystal);
  text-shadow: 0 1px 3px rgba(10, 14, 36, 1), 0 2px 22px rgba(10, 14, 36, .95);
}
.hero-logo {
  width: clamp(300px, 46vw, 620px); height: auto;
  margin: .7rem 0 .5rem;
  filter: drop-shadow(0 6px 30px rgba(4, 6, 20, .8)) drop-shadow(0 0 42px rgba(212, 175, 106, .28));
  animation: logo-float 7s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-tagline {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem); font-weight: 500;
  letter-spacing: .01em; line-height: 1.5;
  color: var(--white); max-width: 42ch;
  text-shadow: 0 2px 8px rgba(10, 14, 36, .95), 0 4px 28px rgba(10, 14, 36, .85);
}
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.7rem; justify-content: center; margin-top: .4rem; }
.hero-platforms {
  font-family: var(--font-display); font-size: .78rem; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(253, 250, 242, .8); margin-top: .8rem;
  text-shadow: 0 1px 8px rgba(10, 14, 36, .95);
}
/* Scroll cue lives in the normal flow (last item of .hero-content), so it
   can never overlap the platform strip at any viewport size. */
.hero-scrollcue {
  display: grid; justify-items: center; gap: .6rem;
  margin-top: .6rem; text-decoration: none;
}
.hero-scrollcue-text {
  font-family: var(--font-display); font-size: .68rem; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 8px rgba(10, 14, 36, .95);
}
.hero-scrollcue-line {
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: cue-drop 2.2s var(--ease-out) infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Sections shared ───────────────────────────────────── */
.section { position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-rune { color: var(--gold); font-size: .9rem; letter-spacing: 1rem; display: block; margin-bottom: 1rem; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem); letter-spacing: .08em;
}
.section-sub { font-style: italic; font-size: 1.12rem; opacity: .75; margin-top: .5rem; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ── Story ─────────────────────────────────────────────── */
.section-story {
  background:
    radial-gradient(ellipse 70% 40% at 85% 8%, rgba(79, 168, 200, .08), transparent 60%),
    linear-gradient(to bottom, var(--night-900), var(--night-800) 55%, var(--night-900));
}
.story-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.story-art { position: relative; }
.story-art img {
  border-radius: 4px; box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 74% 38%; width: 100%;
}
.story-art-frame {
  position: absolute; inset: 12px; border: 1px solid rgba(212, 175, 106, .5);
  border-radius: 2px; pointer-events: none;
}
.story-lede { font-size: 1.28rem; color: var(--gold-bright); margin-bottom: 1.1rem; }
.story-copy p + p { margin-top: 1rem; }
.story-beats { list-style: none; margin-top: 1.6rem; display: grid; gap: 1rem; }
.story-beats li {
  padding-left: 1.4rem; position: relative; color: rgba(253, 250, 242, .88);
}
.story-beats li::before {
  content: '◆'; position: absolute; left: 0; top: .1em;
  color: var(--gold); font-size: .7em; line-height: 2.1;
}
.story-beats strong { color: var(--gold); font-weight: 600; }
.story-quote {
  margin-top: 2rem; padding: 1.2rem 1.6rem;
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 106, .07); border-radius: 0 4px 4px 0;
}
.story-quote p { font-size: 1.25rem; font-style: italic; color: var(--gold-bright); }
.story-quote cite { display: block; margin-top: .5rem; font-style: normal; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(253,250,242,.6); }

/* ── Characters ────────────────────────────────────────── */
.section-chars {
  background:
    radial-gradient(ellipse 60% 34% at 12% 100%, rgba(185, 138, 62, .09), transparent 65%),
    linear-gradient(to bottom, var(--night-900), #0d1229 50%, var(--night-900));
}
.chars-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.char-card {
  position: relative; border-radius: 6px; overflow: hidden;
  background: linear-gradient(to bottom, rgba(34, 48, 102, .5), rgba(16, 23, 58, .85));
  border: 1px solid rgba(212, 175, 106, .22);
  padding: 1.4rem 1.1rem 1.2rem;
  display: grid; justify-items: center; text-align: center; gap: .55rem;
  transition: transform .45s var(--ease-out), border-color .45s, box-shadow .45s, background .45s;
}
.char-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 55% at 50% 0%, var(--char-accent, rgba(143, 216, 236, .16)), transparent 70%);
  opacity: 0; transition: opacity .45s;
}
.char-card:hover, .char-card:focus-within {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md), 0 0 30px rgba(212, 175, 106, .12);
}
.char-card:hover::before, .char-card:focus-within::before { opacity: 1; }
.char-art {
  height: 168px; display: grid; place-items: end center; position: relative; z-index: 1;
  transition: transform .5s var(--ease-out);
}
.char-card:hover .char-art, .char-card:focus-within .char-art { transform: translateY(-6px) scale(1.06); }
.char-art img {
  max-height: 168px; width: auto; max-width: 100%;
  filter: drop-shadow(0 10px 18px rgba(4, 6, 20, .65));
}
.char-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: .1em; color: var(--gold-bright); z-index: 1;
}
.char-role {
  font-family: var(--font-display); font-size: .66rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--crystal); z-index: 1;
}
.char-bio { font-size: .95rem; line-height: 1.55; color: rgba(253, 250, 242, .82); z-index: 1; }

/* ── World ─────────────────────────────────────────────── */
.section-world {
  background: linear-gradient(to bottom, var(--night-900), var(--night-800));
}
.world-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.world-card {
  position: relative; min-height: 300px; border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.8rem; isolation: isolate;
  border: 1px solid rgba(212, 175, 106, .2);
  transition: transform .45s var(--ease-out), border-color .45s, box-shadow .45s;
}
.world-card .world-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.03); transition: transform .8s var(--ease-out), filter .8s;
  filter: saturate(.92) brightness(.82);
}
.world-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8, 11, 30, .94) 8%, rgba(8, 11, 30, .45) 52%, rgba(8, 11, 30, .15));
}
.world-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: var(--shadow-md); }
.world-card:hover .world-img { transform: scale(1.09); filter: saturate(1.05) brightness(.95); }
.world-card h3 {
  font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .1em;
  color: var(--gold-bright); margin-bottom: .4rem;
  text-shadow: 0 2px 10px rgba(4, 6, 20, .8);
}
.world-card p { font-size: .98rem; color: rgba(253, 250, 242, .88); max-width: 46ch; text-shadow: 0 1px 8px rgba(4, 6, 20, .8); }

/* ── Features ──────────────────────────────────────────── */
.section-features {
  background:
    radial-gradient(ellipse 55% 30% at 88% 12%, rgba(143, 216, 236, .07), transparent 60%),
    linear-gradient(to bottom, var(--night-800), var(--night-900));
}
.features-remaster {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.feature-card {
  background: linear-gradient(to bottom, rgba(241, 230, 200, .06), rgba(241, 230, 200, .02));
  border: 1px solid rgba(212, 175, 106, .25); border-radius: 6px;
  padding: 1.7rem 1.5rem;
  display: grid; gap: .7rem; align-content: start;
  transition: transform .4s var(--ease-out), border-color .4s, box-shadow .4s;
}
.feature-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: var(--shadow-md); }
.feature-card--wide { grid-row: span 2; align-content: center; justify-items: start;
  background: linear-gradient(160deg, rgba(212, 175, 106, .14), rgba(241, 230, 200, .03)); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  border: 1px solid rgba(212, 175, 106, .45);
  background: rgba(212, 175, 106, .08);
}
.feature-card h3 { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: .08em; color: var(--gold-bright); }
.feature-card p { font-size: .98rem; color: rgba(253, 250, 242, .85); }
.feature-card--wide h3 { font-size: 1.35rem; }
.feature-card--wide p { font-size: 1.1rem; }

.features-classic-title {
  font-family: var(--font-display); text-align: center; font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: .1em;
  color: rgba(253, 250, 242, .85);
  margin: clamp(3rem, 6vw, 4.5rem) 0 clamp(1.4rem, 3vw, 2.2rem);
}
.features-classic {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.classic-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 1.2rem; align-items: baseline;
  padding: 1.2rem 1.4rem; border-radius: 6px;
  border: 1px solid rgba(143, 216, 236, .18);
  background: rgba(24, 34, 80, .35);
  transition: border-color .35s, transform .35s var(--ease-out);
}
.classic-row:hover { border-color: var(--crystal); transform: translateX(6px); }
.classic-row h4 {
  font-family: var(--font-display); font-size: .92rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--crystal);
}
.classic-row p { font-size: .97rem; color: rgba(253, 250, 242, .82); }

/* ── Media ─────────────────────────────────────────────── */
.section-media {
  background:
    radial-gradient(ellipse 50% 30% at 8% 90%, rgba(185, 138, 62, .08), transparent 60%),
    linear-gradient(to bottom, var(--night-900), #0c1026);
}
.media-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(.8rem, 1.6vw, 1.2rem);
}
.media-item {
  position: relative; border-radius: 4px; overflow: hidden; cursor: zoom-in;
  border: 1px solid rgba(212, 175, 106, .18);
  aspect-ratio: 16 / 9;
  transition: transform .4s var(--ease-out), border-color .4s, box-shadow .4s;
}
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.media-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 11, 30, .55), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.media-item:hover, .media-item:focus-visible { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow-md); }
.media-item:hover img, .media-item:focus-visible img { transform: scale(1.07); }
.media-item:hover::after, .media-item:focus-visible::after { opacity: 1; }
.media-item--video { cursor: pointer; grid-column: span 2; }
.media-item--video .media-play {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
}
.media-play span {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 14, 36, .72); border: 2px solid var(--gold);
  color: var(--gold); transition: transform .35s var(--ease-out), background .35s, color .35s;
}
.media-item--video:hover .media-play span { transform: scale(1.12); background: var(--gold); color: var(--night-900); }
.media-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-display); font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--night-900);
  background: var(--gold); padding: .28rem .6rem; border-radius: 2px;
}

/* ── Buy ───────────────────────────────────────────────── */
.section-buy { overflow: hidden; }
.buy-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 14, 36, .88), rgba(10, 14, 36, .68) 45%, rgba(10, 14, 36, .92)),
    url('../img/art/25th-two-moons.webp') center 30% / cover no-repeat;
}
.section-buy .container { position: relative; }
.buy-platforms {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem; max-width: 980px; margin-inline: auto;
}
.platform-chip {
  display: grid; gap: .15rem; text-align: center; text-decoration: none;
  padding: 1.15rem 1rem; border-radius: 5px;
  border: 1px solid rgba(212, 175, 106, .3);
  background: rgba(16, 23, 58, .72); backdrop-filter: blur(6px);
  transition: transform .35s var(--ease-out), border-color .35s, background .35s, box-shadow .35s;
}
.platform-chip:hover {
  transform: translateY(-4px); border-color: var(--gold);
  background: rgba(34, 48, 102, .85); box-shadow: var(--shadow-md);
}
.platform-name { font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; font-size: .95rem; color: var(--gold-bright); }
.platform-store { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(253, 250, 242, .6); }
.buy-note { text-align: center; margin-top: 2.2rem; font-style: italic; color: rgba(253, 250, 242, .7); }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(212, 175, 106, .25);
  background: linear-gradient(to bottom, var(--night-900), #070a1c);
  padding: 3rem 0 2.4rem;
}
.footer-inner { display: grid; justify-items: center; gap: 1.4rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 1.6rem; }
.footer-logo { height: 52px; width: auto; opacity: .9; }
.footer-rating { opacity: .95; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.footer-links a {
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .2em;
  text-transform: uppercase; text-decoration: none; color: rgba(253, 250, 242, .65);
  transition: color .25s;
}
.footer-links a:hover { color: var(--gold); }
.footer-legal, .footer-disclaimer {
  max-width: 86ch; font-size: .8rem; line-height: 1.6; color: rgba(253, 250, 242, .42);
}
.footer-disclaimer { color: rgba(253, 250, 242, .32); font-style: italic; }

/* ── Lightbox ──────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1rem; padding: clamp(.6rem, 3vw, 2.4rem);
  background: rgba(6, 8, 22, .94);
  backdrop-filter: blur(10px);
  animation: lb-fade .35s var(--ease-out);
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-stage { display: grid; gap: .9rem; justify-items: center; min-width: 0; }
.lightbox-media { max-width: min(1100px, 100%); }
.lightbox-media img, .lightbox-media video {
  max-width: 100%; max-height: 76vh; border-radius: 4px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(212, 175, 106, .35);
}
.lightbox-caption { font-size: 1.02rem; font-style: italic; color: var(--parchment); text-align: center; }
.lightbox-close {
  position: absolute; top: 1.1rem; right: 1.3rem; z-index: 3;
  font-size: 2.2rem; line-height: 1; color: var(--gold); padding: .4rem .7rem;
  transition: transform .3s var(--ease-out), color .3s;
}
.lightbox-close:hover { transform: rotate(90deg); color: var(--gold-bright); }
.lightbox-nav {
  font-size: 2.6rem; color: var(--gold); padding: 1rem .8rem;
  border-radius: 6px; transition: background .25s, transform .25s var(--ease-out), color .25s;
}
.lightbox-nav:hover { background: rgba(212, 175, 106, .12); transform: scale(1.12); color: var(--gold-bright); }

/* ── Responsive ────────────────────────────────────────── */
.only-desktop { display: inline; }

@media (max-width: 1020px) {
  .chars-grid { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
  .features-remaster { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-row: auto; grid-column: span 2; }
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8, 11, 30, .97); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(212, 175, 106, .3);
    padding: .6rem 0 1rem;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: .9rem 6vw; font-size: .9rem; }
  .nav-links a.nav-cta { margin: .6rem 6vw 0; text-align: center; }
  .nav-burger { display: flex; }
  .story-grid { grid-template-columns: 1fr; }
  .story-art { max-width: 520px; margin-inline: auto; }
  .chars-grid { grid-template-columns: repeat(2, 1fr); }
  .world-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-item--video { grid-column: span 2; }
  .features-classic { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox-nav { position: fixed; bottom: 1rem; z-index: 3; font-size: 2rem; background: rgba(8,11,30,.7); }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  .lightbox-media img, .lightbox-media video { max-height: 64vh; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .only-desktop { display: none; }
  .chars-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .char-art, .char-art img { height: 128px; max-height: 128px; }
  .char-bio { font-size: .86rem; }
  .char-name { font-size: .9rem; }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .features-remaster { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: auto; }
  .classic-row { grid-template-columns: 1fr; gap: .3rem; }
  .hero-ctas { gap: 1.3rem; }
  .hero-content { padding-bottom: 7vh; }
  .hero-ctas .btn-gold { padding: 1rem 2rem; font-size: .92rem; }
  .hero-ctas .btn-ghost { padding: .5rem .2rem .45rem; font-size: .78rem; }
  .hero-content::before { inset: -8vh -14vw -7vh; }
  .footer-brand { flex-direction: column; gap: .9rem; }
  .hero-art { opacity: .6; background-position: 68% center; }
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-layer { transform: none !important; }
}
