:root {
  --bg: #040a12;
  --bg-soft: #081120;
  --card: rgba(10, 18, 34, 0.72);
  --card-strong: rgba(9, 17, 32, 0.86);
  --text: #e9eef8;
  --muted: #b9c6dc;
  --accent: #88c7ff;
  --accent-2: #6ef3ff;
  --border: rgba(180, 212, 255, 0.18);
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1830 0%, var(--bg) 48%, #02060c 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
.site-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(83,160,255,.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(110,243,255,.12), transparent 24%),
    radial-gradient(circle at 60% 60%, rgba(88,114,255,.12), transparent 22%);
}
.site-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 140px 120px, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 280px 240px, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 340px 70px, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 540px 160px, rgba(255,255,255,.6), transparent);
  background-size: 600px 300px;
  opacity: .25;
}
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem;
  background: rgba(4, 10, 18, 0.68);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar nav { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.topbar a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.topbar a:hover, .brand { color: var(--text); }
.brand { font-weight: 700; letter-spacing: .04em; }
.lang-switch { display: flex; gap: .4rem; }
.lang-btn {
  border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--muted);
  padding: .5rem .8rem; border-radius: 999px; cursor: pointer; transition: .25s ease;
}
.lang-btn.active, .lang-btn:hover { color: var(--text); background: rgba(136,199,255,.14); }
.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: grid;
  place-items: center;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,10,18,.3), rgba(4,10,18,.75)), url('assets/neighborhood.png') center/cover no-repeat;
  transform: scale(1.06);
  filter: saturate(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 25%, rgba(135, 204, 255, .18), transparent 24%), linear-gradient(90deg, rgba(4,10,18,.85), rgba(4,10,18,.2) 60%, rgba(4,10,18,.7));
}
.hero-inner {
  position: relative; width: min(var(--max), 100%); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center;
}
.hero-copy h1 {
  margin: .2rem 0 .8rem; font-size: clamp(2.4rem, 5vw, 5rem); line-height: .95; max-width: 10ch;
}
.eyebrow, .chapter-kicker {
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); font-size: .82rem; margin: 0 0 .4rem;
}
.hero-tagline { font-size: clamp(1.1rem, 2.3vw, 1.5rem); color: var(--text); max-width: 32rem; }
.hero-text { color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .92rem 1.3rem; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border); transition: transform .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, rgba(122, 187, 255, .28), rgba(110, 243, 255, .2)); color: var(--text); }
.btn-secondary { background: rgba(255,255,255,.04); color: var(--text); }
.hero-visual { position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.cover {
  width: clamp(220px, 32vw, 360px);
  border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.08);
}
.cover-main { transform: rotate(-5deg) translateY(8px); }
.cover-secondary {
  position: absolute; right: 0; bottom: 8%; width: clamp(160px, 22vw, 260px);
  transform: rotate(8deg); opacity: .95;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(16px); opacity: .65;
  background: radial-gradient(circle, rgba(110,243,255,.6) 0%, rgba(110,243,255,0) 72%);
}
.orb-1 { width: 160px; height: 160px; right: 20%; top: 8%; animation: drift 8s ease-in-out infinite; }
.orb-2 { width: 120px; height: 120px; left: 10%; bottom: 8%; animation: drift 11s ease-in-out infinite reverse; }
.scroll-hint {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: .9rem; letter-spacing: .08em;
}
.chapter {
  position: relative; min-height: 90vh; display: grid; align-items: center; padding: 5rem 1.5rem;
}
.chapter::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,10,18,.35), rgba(4,10,18,.72)), var(--bg) center/cover no-repeat;
  background-image: linear-gradient(180deg, rgba(4,10,18,.22), rgba(4,10,18,.82)), var(--bg);
}
.chapter { background: center/cover no-repeat var(--bg); background-image: linear-gradient(180deg, rgba(4,10,18,.3), rgba(4,10,18,.82)), var(--bg); }
.chapter[style] { background-image: linear-gradient(180deg, rgba(4,10,18,.25), rgba(4,10,18,.82)), var(--bg); }
.chapter::after {
  content: ""; position: absolute; inset: 0; background-image: var(--bg); opacity: .01;
}
.chapter-card {
  position: relative; z-index: 1;
  width: min(640px, 100%); margin-inline: auto 12%;
  background: var(--card-strong); border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 2rem; border-radius: var(--radius);
}
.chapter-card h2 { margin: 0 0 .7rem; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
.chapter-card p:last-child { color: var(--muted); margin-bottom: 0; }
.content-section { width: min(var(--max), calc(100% - 3rem)); margin: 0 auto; padding: 5rem 0; }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.story-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.4rem; }
.story-text { padding: 1.6rem; font-size: 1.06rem; }
.story-text p { margin-top: 0; }
.story-side { display: grid; gap: 1.4rem; }
.story-figure img, .wrap-showcase img { width: 100%; display: block; }
.story-figure figcaption, .quote-card figcaption { padding: 1rem 1.2rem 1.2rem; color: var(--muted); }
.quote-card { padding: 1.6rem; display: flex; flex-direction: column; justify-content: center; }
blockquote { margin: 0; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.35; }
.character-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.character { padding: 1.3rem; }
.character h3 { margin-top: 0; }
.character p { color: var(--muted); }
.character-highlight { background: linear-gradient(180deg, rgba(18,30,50,.9), rgba(7,13,24,.85)); }
.editions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.edition { display: grid; grid-template-columns: 210px 1fr; align-items: center; }
.edition img { width: 100%; display: block; }
.edition-copy { padding: 1.4rem; }
.edition-copy h3 { margin-top: 0; }
.edition-type { color: var(--accent-2); font-size: .95rem; }
.wrap-showcase { margin-top: 1.2rem; display: grid; grid-template-columns: minmax(0, 2fr) 1fr; align-items: center; }
.wrap-showcase div { padding: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.gallery-item { padding: 0; cursor: pointer; background: transparent; border: 0; }
.gallery-item img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; }
.game-shell { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; padding: 1.5rem; align-items: center; }
.game-copy p { color: var(--muted); }
.game-status { min-height: 1.6rem; margin-bottom: .8rem; }
.game-progress { display: flex; gap: .45rem; margin: .8rem 0 1rem; flex-wrap: wrap; }
.progress-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); }
.progress-dot.filled { background: var(--accent); box-shadow: 0 0 12px rgba(136,199,255,.7); }
.pads { display: grid; grid-template-columns: repeat(3, 90px); gap: 1rem; }
.pad {
  aspect-ratio: 1 / 1; border-radius: 28px; border: 1px solid var(--border); cursor: pointer;
  color: white; font-size: 2rem; background: rgba(255,255,255,.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.pad:hover { transform: translateY(-2px); }
.pad.active { box-shadow: 0 0 26px rgba(136,199,255,.65); transform: scale(1.04); }
.pad-a.active { background: rgba(110,243,255,.22); }
.pad-b.active { background: rgba(136,199,255,.22); }
.pad-c.active { background: rgba(176,140,255,.22); }
.game-reward {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 18px; border: 1px solid rgba(110,243,255,.22);
  background: rgba(110,243,255,.08);
}
.hidden { display: none !important; }
.trailer-shell { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; padding: 1rem; align-items: stretch; }
.trailer-placeholder {
  min-height: 340px; display: grid; place-items: center; text-align: center; position: relative;
  border-radius: 18px; border: 1px dashed rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(9,17,32,.85), rgba(8,18,32,.55)), url('assets/1987-card.png') center/cover no-repeat;
  overflow: hidden;
}
.play-ring {
  position: absolute; width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 0 60px rgba(136,199,255,.22);
}
.trailer-copy { padding: 1.2rem; }
.trailer-copy code { display: inline-block; margin-top: .8rem; background: rgba(0,0,0,.26); padding: .45rem .7rem; border-radius: 10px; color: var(--accent-2); }
.footer {
  width: min(var(--max), calc(100% - 3rem)); margin: 1rem auto 2rem; padding: 1.5rem 0 0;
  display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); border-top: 1px solid var(--border);
}
.footer-note { max-width: 480px; text-align: right; }
.lightbox {
  position: fixed; inset: 0; background: rgba(4,8,15,.88); backdrop-filter: blur(10px); z-index: 100;
  display: grid; place-items: center; padding: 2rem;
}
.lightbox figure { max-width: min(1100px, 100%); margin: 0; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 18px; }
.lightbox figcaption { margin-top: .9rem; color: var(--muted); text-align: center; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; border: 0; background: rgba(255,255,255,.08); color: white; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; font-size: 1.6rem;
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.06); }
}
@media (max-width: 980px) {
  .hero-inner, .story-grid, .editions-grid, .trailer-shell, .game-shell, .wrap-showcase { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .edition { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .cover-secondary { right: 10%; bottom: 0; }
  .chapter-card { margin-inline: auto; }
  .pads { justify-content: center; }
  .footer { flex-direction: column; }
  .footer-note { text-align: left; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; justify-content: center; }
  .topbar nav { gap: .75rem; }
  .hero { padding-top: 2.5rem; }
  .hero-inner { gap: 1rem; }
  .hero-copy h1 { max-width: unset; }
  .gallery-grid { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: 1fr; }
  .pads { grid-template-columns: repeat(3, minmax(70px, 1fr)); width: 100%; }
}

/* Standalone export: final trailer embed */
.trailer-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #050a12;
  border: 1px solid rgba(255,255,255,.12);
}
.trailer-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
