/* ============================================================
   PIXELVAULT — Retro Gaming Archive
   CRT / neon-arcade system: near-black screen, hot-magenta + electric-cyan
   neon, scanlines, pixel display type. Hand-authored, no framework.
   ============================================================ */

:root {
  --bg-900: #08040f;
  --bg-800: #0b0714;
  --bg-700: #150c24;
  --bg-600: #1e1234;

  --pink:   #ff2e88;
  --cyan:   #2ff3ff;
  --amber:  #ffe14d;
  --purple: #a24dff;

  --ink:   #d7cdf0;
  --white: #f3edff;
  --dim:   rgba(215, 205, 240, 0.55);
  --line:  rgba(47, 243, 255, 0.24);
  --line-pink: rgba(255, 46, 136, 0.35);

  --f-pixel: "Press Start 2P", "Courier New", monospace;
  --f-body:  "Chakra Petch", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap-max: 78rem;
}

* { box-sizing: border-box; }

html {
  background-color: var(--bg-800);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg-800);
  background-image:
    radial-gradient(1000px 640px at 82% -12%, rgba(162, 77, 255, 0.20), transparent 60%),
    radial-gradient(900px 560px at -8% 8%, rgba(255, 46, 136, 0.14), transparent 60%);
  overflow-x: hidden;
}

::selection { background: var(--pink); color: var(--white); }

a { color: inherit; text-decoration: none; }
svg { display: block; }

/* CRT overlay — scanlines + vignette */
.crt {
  position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0, rgba(0,0,0,0.18) 1px, transparent 1px, transparent 3px),
    radial-gradient(120% 120% at 50% 50%, transparent 62%, rgba(0,0,0,0.5) 100%);
  mix-blend-mode: multiply;
}

h1, h2, h3, h4 { margin: 0; color: var(--white); line-height: 1.15; }

.mono { font-family: var(--f-pixel); }
.dim { color: var(--dim); }
.mt-1 { margin-top: 0.5rem; } .mt-3 { margin-top: 1.5rem; }

/* -------- Wrap -------- */
.wrap { width: 100%; max-width: var(--wrap-max); margin-inline: auto; padding-inline: 1.4rem; position: relative; z-index: 1; }
@media (min-width: 768px) { .wrap { padding-inline: 2.4rem; } }
.wrap.narrow { max-width: 52rem; }

/* -------- Type scale -------- */
.h-xl {
  font-family: var(--f-pixel); font-weight: 400;
  font-size: clamp(1.35rem, 4.4vw, 2.6rem); line-height: 1.35;
  color: var(--white); text-shadow: 0 0 12px rgba(47, 243, 255, 0.5); overflow-wrap: break-word;
}
.h-lg { font-family: var(--f-body); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.12; letter-spacing: 0.01em; }
.h-md { font-family: var(--f-body); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; }

.label {
  display: inline-block; font-family: var(--f-pixel); font-size: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink);
  padding: 0.45rem 0.7rem; border: 1px solid var(--line-pink);
  margin-bottom: 1.4rem; text-shadow: 0 0 8px rgba(255, 46, 136, 0.6);
}
.label--cyan { color: var(--cyan); border-color: var(--line); text-shadow: 0 0 8px rgba(47, 243, 255, 0.6); }
.lead { font-size: 1.08rem; color: var(--ink); max-width: 44rem; }
.micro { font-family: var(--f-pixel); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cyan); margin-bottom: 0.9rem; }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--f-pixel); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.95rem 1.5rem; border: 2px solid var(--pink); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn-pink { background: var(--pink); color: var(--bg-900); box-shadow: 0 0 0 rgba(255,46,136,0); }
.btn-pink:hover { box-shadow: 0 0 18px rgba(255, 46, 136, 0.7); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.btn-ghost:hover { background: rgba(47, 243, 255, 0.12); box-shadow: 0 0 18px rgba(47, 243, 255, 0.4); }
.btn-wide { width: 100%; margin-top: 0.4rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }

.more { font-family: var(--f-pixel); font-size: 0.6rem; text-transform: uppercase; color: var(--cyan); white-space: nowrap; }
.more:hover { color: var(--amber); text-shadow: 0 0 8px rgba(255, 225, 77, 0.6); }

/* -------- Header -------- */
.cab-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8, 4, 15, 0.9); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line-pink);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 78px; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark { color: var(--cyan); display: grid; place-items: center; filter: drop-shadow(0 0 6px rgba(47,243,255,0.6)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--f-pixel); font-size: 0.85rem; color: var(--white); text-shadow: 0 0 8px rgba(47,243,255,0.5); }
.brand-sub { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--pink); margin-top: 5px; }

.head-nav { display: none; align-items: center; gap: 1.6rem; }
.head-nav a { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); transition: color 0.15s ease, text-shadow 0.15s ease; }
.head-nav a:hover { color: var(--cyan); text-shadow: 0 0 8px rgba(47, 243, 255, 0.7); }
.head-cta { display: none; }
@media (min-width: 1060px) { .head-nav { display: flex; } .head-cta { display: inline-flex; } }

.nav-toggle-input { display: none; }
.nav-burger { display: inline-flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 9px; border: 2px solid var(--line-pink); }
.nav-burger span { width: 22px; height: 2px; background: var(--pink); display: block; }
.mobile-menu { display: none; flex-direction: column; gap: 0.2rem; padding: 0.5rem 0 1.2rem; }
.mobile-menu a { font-weight: 600; text-transform: uppercase; padding: 0.7rem 0.3rem; border-bottom: 1px solid var(--line); }
.nav-toggle-input:checked ~ .mobile-menu { display: flex; }
@media (min-width: 1060px) { .nav-burger { display: none; } }

/* -------- Hero -------- */
.hero { position: relative; overflow: hidden; padding-block: 3.5rem 4rem; border-bottom: 2px solid var(--line-pink); }
@media (min-width: 768px) { .hero { padding-block: 5rem 5.5rem; } }
.hero-grid-bg { position: absolute; inset: auto 0 0 0; height: 60%; z-index: 0; opacity: 0.5; }
.hero-grid-bg svg { width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--f-pixel); font-size: clamp(1.9rem, 8vw, 5rem); line-height: 1.1;
  color: var(--cyan); text-shadow: 0 0 16px rgba(47, 243, 255, 0.6), 4px 4px 0 rgba(162, 77, 255, 0.5);
  margin-block: 0.4rem 1rem; overflow-wrap: break-word;
}
.hero-title .pink { color: var(--pink); text-shadow: 0 0 16px rgba(255, 46, 136, 0.6), 4px 4px 0 rgba(162, 77, 255, 0.5); }
.hero-sub { font-family: var(--f-body); font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--amber); margin-bottom: 1.4rem; }

/* High-score board */
.hiscore { margin-top: 2.6rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.7); }
.hiscore-head { font-family: var(--f-pixel); font-size: 0.6rem; text-align: center; color: var(--amber); padding: 0.7rem; border-bottom: 1px solid var(--line); letter-spacing: 0.1em; }
.hiscore-row { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .hiscore-row { grid-template-columns: repeat(4, 1fr); } }
.hiscore-cell { padding: 1.1rem 0.8rem; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hs-val { display: block; font-family: var(--f-pixel); font-size: 1.1rem; color: var(--cyan); text-shadow: 0 0 10px rgba(47, 243, 255, 0.5); }
.hs-cap { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-top: 0.6rem; }

/* -------- Screens (sections) -------- */
.screen { padding-block: 4rem; position: relative; }
@media (min-width: 768px) { .screen { padding-block: 6rem; } }
.screen--alt { background: rgba(11, 7, 20, 0.7); border-block: 2px solid var(--line); }
.screen--cta { border-top: 2px solid var(--line-pink); }
.screen-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 2.4rem; }
.screen-head h2 { margin-top: 0.3rem; }
.page-screen { padding-block: 3.5rem; border-bottom: 2px solid var(--line-pink); }
@media (min-width: 768px) { .page-screen { padding-block: 5rem; } }
.page-screen h1 { margin-block: 0.3rem 1.3rem; }

/* -------- Era list (home) -------- */
.era-list { display: grid; gap: 1rem; }
.era-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.4rem 1.3rem; align-items: center;
  padding: 1.1rem 1.4rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.era-row:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(47, 243, 255, 0.25); transform: translateX(4px); }
.era-years { font-family: var(--f-pixel); font-size: 0.62rem; color: var(--amber); }
.era-body { display: flex; flex-direction: column; }
.era-name { font-family: var(--f-body); font-weight: 700; font-size: 1.2rem; color: var(--white); }
.era-tag { color: var(--dim); font-size: 0.92rem; }
.era-arrow { color: var(--pink); }

/* -------- Genres grid -------- */
.genre-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .genre-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .genre-grid { grid-template-columns: repeat(3, 1fr); } }
.genre { display: block; padding: 1.5rem; border: 2px solid var(--line-pink); background: rgba(21, 12, 36, 0.5); transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.genre:hover { border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 46, 136, 0.3); transform: translateY(-3px); }
.genre-icon { display: block; font-size: 1.7rem; color: var(--cyan); margin-bottom: 0.7rem; line-height: 1; }
.genre h3, .genre h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.3rem; margin-bottom: 0.4rem; }
.genre p { color: var(--ink); font-size: 0.95rem; }
.genre-one { color: var(--amber) !important; font-family: var(--f-body); font-weight: 600; }
.genre--card { border-color: var(--line); }
.genre-desc { color: var(--dim) !important; margin-top: 0.6rem; }

/* -------- Cabinet cards (home) -------- */
.cab-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cab-grid { grid-template-columns: repeat(3, 1fr); } }
.cab { display: block; padding: 1.5rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.cab:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(47, 243, 255, 0.25); transform: translateY(-3px); }
.cab-format { display: block; font-family: var(--f-pixel); font-size: 0.56rem; color: var(--cyan); margin-bottom: 0.9rem; }
.cab h3 { font-family: var(--f-body); font-weight: 700; font-size: 1.3rem; margin-bottom: 0.5rem; }
.cab p { color: var(--dim); font-size: 0.94rem; }

/* -------- Split -------- */
.split { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 840px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

/* -------- Gen stack (home) -------- */
.gen-stack { display: grid; gap: 0.9rem; }
.gen-chip { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); }
.gen-badge { font-family: var(--f-pixel); font-size: 0.6rem; color: var(--bg-900); background: var(--cyan); padding: 0.4rem 0.5rem; flex-shrink: 0; }
.gen-name { display: block; font-weight: 700; color: var(--white); }
.gen-years { display: block; font-size: 0.62rem; color: var(--dim); margin-top: 2px; }

/* -------- CTA -------- */
.cta { display: grid; gap: 1.6rem; align-items: center; padding: 2.4rem; border: 2px solid var(--pink); background: rgba(21, 12, 36, 0.6); box-shadow: 0 0 30px rgba(255, 46, 136, 0.15) inset; }
@media (min-width: 840px) { .cta { grid-template-columns: 1.6fr 1fr; padding: 3rem; } }
.cta .btn-row { margin-top: 0; }

/* -------- Era detail (page) -------- */
.era-stack { display: grid; gap: 1.6rem; }
.era-card { display: grid; gap: 1.6rem; padding: 2rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); }
@media (min-width: 820px) { .era-card { grid-template-columns: 0.85fr 1.15fr; } }
.era-years-big { display: block; font-family: var(--f-pixel); font-size: 0.72rem; color: var(--amber); margin-bottom: 0.8rem; }
.era-side h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.7rem; }
.era-detail { border-left: 2px solid var(--line-pink); padding-left: 1.6rem; }
@media (max-width: 819px) { .era-detail { border-left: 0; padding-left: 0; border-top: 2px solid var(--line-pink); padding-top: 1.4rem; } }

.dot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.dot-list li { position: relative; padding-left: 1.6rem; color: var(--ink); }
.dot-list li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); }

/* -------- Cabinet cards (page) -------- */
.cab-stack { display: grid; gap: 1.6rem; }
.cab-card { display: grid; gap: 1.6rem; padding: 2rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); }
@media (min-width: 720px) { .cab-card { grid-template-columns: auto 1fr; align-items: center; } }
.cab-art { color: var(--pink); filter: drop-shadow(0 0 8px rgba(255, 46, 136, 0.4)); }
.cab-art svg { width: 96px; height: auto; }
.cab-info h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.5rem; margin: 0.3rem 0 0.5rem; }
.cab-info p { color: var(--dim); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; }
.chips li { font-size: 0.78rem; color: var(--ink); padding: 0.35rem 0.7rem; border: 1px solid var(--line); }

/* -------- Console cards (page) -------- */
.gen-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .gen-grid { grid-template-columns: repeat(2, 1fr); } }
.gen-card { padding: 1.8rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); }
.gen-badge-big { display: inline-block; font-family: var(--f-pixel); font-size: 0.7rem; color: var(--bg-900); background: var(--amber); padding: 0.45rem 0.6rem; margin-bottom: 1rem; }
.gen-card h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.4rem; }
.gen-desc { color: var(--dim); margin: 0.8rem 0 1.2rem; }

/* -------- Glossary -------- */
.term-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .term-grid { grid-template-columns: repeat(2, 1fr); } }
.term { padding: 1.4rem; border: 2px solid var(--line); border-left: 4px solid var(--pink); background: rgba(21, 12, 36, 0.5); }
.term h2 { font-family: var(--f-pixel); font-size: 0.78rem; color: var(--cyan); margin-bottom: 0.7rem; }
.term p { color: var(--ink); font-size: 0.93rem; }

/* -------- Contact / forms -------- */
.line-list { display: grid; gap: 1.3rem; margin: 1.5rem 0 0; }
.line-list div { display: flex; flex-direction: column; }
.line-list dt { font-family: var(--f-pixel); font-size: 0.58rem; color: var(--pink); }
.line-list dd { margin: 0.4rem 0 0; color: var(--white); }
.form-box { padding: 1.8rem; border: 2px solid var(--line); background: rgba(21, 12, 36, 0.6); }
.field { display: grid; margin-bottom: 1.1rem; }
.field label { font-size: 0.58rem; color: var(--cyan); margin-bottom: 0.5rem; }
.req { color: var(--pink); margin-left: 3px; }
.input, .textarea {
  width: 100%; font-family: var(--f-body); font-size: 0.98rem; color: var(--white);
  background: var(--bg-900); border: 2px solid var(--line); padding: 0.7rem 0.9rem; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 46, 136, 0.18); }
.form-done { display: flex; gap: 1rem; align-items: flex-start; padding: 2rem; border: 2px solid var(--cyan); background: rgba(21, 12, 36, 0.6); }
.form-done[hidden] { display: none; }
.tick { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; color: var(--bg-900); background: var(--cyan); font-size: 1.2rem; }

/* -------- FAQ -------- */
.faq-group { margin-bottom: 2.6rem; }
.faq-item { border: 2px solid var(--line); background: rgba(21, 12, 36, 0.5); margin-bottom: 0.8rem; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; gap: 1.2rem;
  font-family: var(--f-body); font-weight: 700; font-size: 1.05rem; color: var(--white);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--pink); font-family: var(--f-pixel); font-size: 0.9rem; }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--dim); }

/* -------- Prose (legal) -------- */
.prose { max-width: 48rem; }
.prose h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.35rem; margin-top: 2.2rem; margin-bottom: 0.7rem; color: var(--white); }
.prose p { margin-bottom: 1rem; color: var(--dim); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

/* -------- Footer -------- */
.cab-foot { border-top: 2px solid var(--line); background: rgba(8, 4, 15, 0.85); position: relative; z-index: 1; }
.foot-grid { display: grid; gap: 2.2rem; padding-block: 3.4rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.7fr repeat(4, 1fr); } }
.foot-brand p { margin-top: 1rem; color: var(--dim); max-width: 22rem; font-size: 0.9rem; }
.foot-socials { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.foot-socials a { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--f-pixel); font-size: 0.56rem; color: var(--cyan); border: 2px solid var(--line); }
.foot-socials a:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(47, 243, 255, 0.4); }
.foot-col h4 { font-family: var(--f-pixel); font-size: 0.58rem; text-transform: uppercase; color: var(--pink); margin-bottom: 1.1rem; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 0.6rem; }
.foot-col li a { font-size: 0.9rem; color: var(--dim); }
.foot-col li a:hover { color: var(--cyan); }
.foot-base { display: flex; flex-direction: column; gap: 0.7rem; padding-block: 1.6rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--dim); }
@media (min-width: 768px) { .foot-base { flex-direction: row; justify-content: space-between; align-items: center; } }
.blink { font-family: var(--f-pixel); font-size: 0.58rem; color: var(--amber); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* -------- Skip link + reveal -------- */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--pink); color: var(--white); padding: 0.6rem 1rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .blink { animation: none; }
  .era-row:hover, .genre:hover, .cab:hover { transform: none; }
}
