/* =============================================================================
   CORE — tokens, page shell, chrome, reveal system, lightbox.
   Loaded by every page. Per-page layout lives in home.css / title.css.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&family=Barlow+Condensed:ital,wght@0,300;0,400;0,500;0,600;1,400;1,600&display=swap');

/* -- tokens ---------------------------------------------------------------- */
:root {
  /* Collection-level palette. Title pages override these via [data-game]. */
  --deep:    #050506;
  --deeper:  #000000;
  --panel:   #0d0d10;
  --ink:     #e8e8ea;
  --muted:   #8b8b93;
  --faint:   rgba(255,255,255,.06);
  --accent:  #ff2e17;                 /* Neo Geo red */
  --accent2: #ffc73a;                 /* cabinet gold */
  --line:    rgba(255,255,255,.12);
  --glow:    rgba(255,46,23,.5);
  --skew:    -8deg;

  --display: 'Oswald', 'Helvetica Neue Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --ui:      'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;

  --gut:     clamp(20px, 5vw, 64px);
  --maxw:    1440px;

  --ease:    cubic-bezier(.16,.84,.28,1);      /* soft settle  */
  --slam:    cubic-bezier(.2,1.5,.35,1);       /* arcade snap  */
  --dur:     .6s;
}

/* -- reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* `hidden` always wins, even over components that set their own display. */
[hidden] { display: none !important; }

/* Plates render pixelated by default (native-res Neo Geo art). A game with
   high-resolution renders sets `smooth: true` and its images scale normally. */
.smooth, .smooth * { image-rendering: auto !important; }

html {
  background: var(--deeper);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: .92;
  letter-spacing: .01em;
  margin: 0;
  text-transform: uppercase;
}

::selection { background: var(--accent); color: #000; }

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

/* -- layout helpers -------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.kicker {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: '';
  width: 26px; height: 1px;
  background: currentColor;
  flex: none;
}

/* Big ghosted section label, CFC2's favourite move. */
.sectionlabel {
  position: relative;
  font-family: var(--display);
  font-size: clamp(44px, 8vw, 118px);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.16);
  margin: 0 0 6px;
  user-select: none;
}
.sectionlabel > b {
  position: absolute; inset: 0;
  -webkit-text-stroke: 0;
  color: var(--ink);
  font-weight: inherit;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease);
}
.rv.in .sectionlabel > b, .in .sectionlabel > b { clip-path: inset(0 0 0 0); }

.hr {
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent 70%);
  border: 0;
  margin: 0;
}

/* -- ambient overlays ------------------------------------------------------ */
.scanlines,
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0 2px,
    rgba(0,0,0,.16) 2px 3px
  );
  opacity: .32;
}

.vignette {
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0,0,0,.72) 100%);
  z-index: 55;
}

/* -- site header ----------------------------------------------------------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gut);
  background: linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,0));
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease);
}
.top.stuck {
  background: rgba(4,4,6,.88);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.wordmark { display: flex; align-items: center; gap: 11px; flex: none; }
.wordmark .coin {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--accent);
  position: relative;
  transition: transform .5s var(--slam), border-color .4s var(--ease);
}
.wordmark .coin::after {
  content: '';
  position: absolute; left: 50%; top: 4px;
  width: 2px; height: 10px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: background .4s var(--ease);
}
.wordmark:hover .coin { transform: rotateY(180deg) scale(1.08); }

.wordmark .wm { display: flex; flex-direction: column; line-height: 1; }
.wordmark .wm b {
  font-family: var(--display);
  font-size: 15px; font-weight: 600;
  letter-spacing: .17em;
}
.wordmark .wm span {
  font-family: var(--ui);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: .3em;
  color: var(--muted);
  margin-top: 3px;
}

.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav a {
  position: relative;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 15px;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.topnav a::after {
  content: '';
  position: absolute; left: 15px; right: 15px; bottom: 5px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.topnav a:hover, .topnav a[aria-current] { color: var(--ink); }
.topnav a:hover::after, .topnav a[aria-current]::after { transform: scaleX(1); }

@media (max-width: 1040px) {
  .topnav a { padding: 9px 10px; letter-spacing: .14em; }
}
@media (max-width: 820px) {
  .topnav a { padding: 8px 7px; font-size: 10.5px; letter-spacing: .1em; }
  .wordmark .wm span { display: none; }
  .wordmark .wm b { font-size: 13px; letter-spacing: .12em; }
}
@media (max-width: 600px) {
  .top { gap: 10px; }
  /* If the nav outgrows a phone, let the row swipe instead of clipping. */
  .topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .wordmark .wm b { font-size: 0; }
  .wordmark .wm b::after {
    content: 'WLS'; font-size: 15px; letter-spacing: .17em;
  }
}

/* -- buttons --------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 13px 26px;
  border: 1px solid var(--line);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease), border-color .35s var(--ease),
              transform .35s var(--slam);
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-101%) skewX(var(--skew));
  transition: transform .45s var(--ease);
  z-index: -1;
}
.btn:hover { color: #000; border-color: var(--accent); transform: translateY(-2px); }
.btn:hover::before { transform: translateX(0) skewX(var(--skew)); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #000; }
.btn.solid::before { background: var(--ink); }
.btn.solid:hover { color: #000; }

.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* -- reveal system --------------------------------------------------------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .85s var(--ease),
    transform .85s var(--ease);
  transition-delay: var(--rvd, 0ms);
  will-change: opacity, transform;
}
.rv.in { opacity: 1; transform: none; }

/* Wipe-in variant for plates and panels. */
.rvw {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease);
  transition-delay: var(--rvd, 0ms);
}
.rvw.in { clip-path: inset(0 0 0 0); }

/* =============================================================================
   LIGHTBOX — full stage view, notes, downloads
   ========================================================================== */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.lb.open { opacity: 1; pointer-events: auto; }

.lb-back {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(10px);
}

.lb-card {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100dvh - clamp(24px, 6vw, 80px));
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.03);
  transform: translateY(22px) scale(.97);
  opacity: 0;
  transition: transform .5s var(--slam), opacity .4s var(--ease);
  overflow: hidden;
}
.lb.open .lb-card { transform: none; opacity: 1; }

/* corner ticks */
.lb-card::before, .lb-card::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--accent);
  pointer-events: none;
  z-index: 3;
}
.lb-card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.lb-card::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.lb-plate {
  position: relative;
  background: #000;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
}
.lb-plate img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  animation: lbplate .8s var(--ease) both;
}
@keyframes lbplate {
  from { opacity: 0; transform: scale(1.05); filter: blur(6px); }
  to   { opacity: 1; transform: none;        filter: none; }
}
.lb-plate .sheen {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: sheen 1.5s .35s var(--ease) both;
  pointer-events: none;
}
@keyframes sheen { to { transform: translateX(120%); } }

.lb-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--ui);
  font-size: 10px; font-weight: 600;
  letter-spacing: .22em;
  padding: 5px 10px;
  background: rgba(0,0,0,.7);
  border: 1px solid var(--line);
  color: var(--accent);
  z-index: 2;
}

.lb-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
}

.lb-head { padding: 26px 26px 18px; border-bottom: 1px solid var(--line); }
.lb-head .idx {
  font-family: var(--ui);
  font-size: 11px; letter-spacing: .3em; color: var(--muted);
  display: block; margin-bottom: 10px;
}
.lb-head h3 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: .95;
  margin-bottom: 8px;
}
.lb-head .loc {
  font-family: var(--ui);
  font-size: 13px; letter-spacing: .1em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0;
}

.lb-body { padding: 22px 26px; overflow-y: auto; flex: 1; min-height: 0; }
.lb-body .lab {
  font-family: var(--ui);
  font-size: 10.5px; font-weight: 600; letter-spacing: .28em;
  color: var(--muted);
  margin: 0 0 10px;
}
.lb-body .credit {
  margin: -6px 0 18px;
  font-family: var(--ui); font-size: 14px; font-weight: 600; letter-spacing: .04em;
}
.lb-body .credit a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.lb-body .credit a:hover { color: var(--ink); border-color: var(--ink); }
.lb-body .note {
  margin: 0 0 18px;
  color: #c9c9cf;
  font-size: 15.5px;
  line-height: 1.7;
}

.lb-foot {
  margin-top: auto;
  padding: 18px 26px 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.lb-dl {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}
.lb-dl .btn { justify-content: center; padding: 14px 12px; }
.lb-soon {
  margin: 0;
  padding: 14px 0;
  text-align: center;
  font-family: var(--ui);
  font-size: 12px; font-weight: 600; letter-spacing: .28em;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.lb-x {
  position: absolute; top: 10px; right: 10px;
  z-index: 5;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.6);
  font-size: 20px; line-height: 1;
  transition: background .3s var(--ease), transform .3s var(--slam), border-color .3s;
}
.lb-x:hover { background: var(--accent); color: #000; border-color: var(--accent); transform: rotate(90deg); }

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 4;
  width: 46px; height: 70px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--line);
  font-size: 20px;
  transition: background .3s var(--ease), color .3s;
}
.lb-nav:hover { background: var(--accent); color: #000; }
.lb-prev { left: 10px; }
.lb-next { left: auto; right: 10px; }

@media (max-width: 900px) {
  .lb-card { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); }
  .lb-plate { min-height: 200px; max-height: 42dvh; }
  .lb-next { right: 10px; }
}

/* -- footer ---------------------------------------------------------------- */
.foot {
  padding: 70px var(--gut) 54px;
  border-top: 1px solid var(--line);
  background: var(--deeper);
}
.foot .inner {
  max-width: var(--maxw); margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-end;
}
.foot h4 { font-size: 22px; letter-spacing: .12em; margin-bottom: 8px; }
.foot p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.foot .fine { font-size: 12.5px; color: #5c5c64; margin-top: 14px; line-height: 1.7; }
.foot .up { margin-left: auto; }

/* Social links: platform label + handle, one chip each. */
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.socials a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  font-family: var(--ui); font-size: 14px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.socials a span {
  font-size: 11px; letter-spacing: .24em;
  color: var(--accent);
}
.socials a:hover, .socials a:focus-visible { border-color: var(--accent); color: #fff; }

/* =============================================================================
   TYPE LOCKUP — stands in for an official logo until you drop a real one in
   ========================================================================== */
.lock {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  user-select: none;
}

.lock .over {
  font-family: var(--display);
  font-size: clamp(9px, 1vw, 12.5px);
  font-weight: 500;
  letter-spacing: .42em;
  text-indent: .42em;
  color: rgba(255,255,255,.72);
  white-space: nowrap;
  position: relative;
  padding-bottom: 8px;
}
.lock .over::after {
  content: '';
  position: absolute; left: 50%; bottom: 0;
  width: 100%; max-width: 240px; height: 1px;
  transform: translateX(-50%) scaleX(.35);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: transform .7s var(--ease);
}

.lock .main {
  position: relative;
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 700;
  line-height: .86;
  letter-spacing: -.02em;
  transform: skewX(var(--skew));
  background: linear-gradient(180deg,
    #ffffff 0%, #ffffff 38%,
    color-mix(in srgb, var(--accent) 65%, #ffffff) 52%,
    color-mix(in srgb, var(--accent) 92%, #000000) 74%,
    #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.85));
  transition: filter .5s var(--ease);
}
/* chromatic split flicker — the arcade "select" pop */
@keyframes split {
  0%   { transform: skewX(var(--skew)) translateX(0); }
  25%  { transform: skewX(var(--skew)) translateX(-3px); }
  50%  { transform: skewX(var(--skew)) translateX(3px); }
  100% { transform: skewX(var(--skew)) translateX(0); }
}

.lock .sub {
  font-family: var(--display);
  font-size: clamp(10px, 1.15vw, 15px);
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;
  padding: 5px 16px;
  color: #05050a;
  background: var(--accent);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  white-space: nowrap;
  transition: letter-spacing .6s var(--ease), padding .6s var(--ease);
}

/* real-logo override */
.lock.img img { max-height: 190px; width: auto; margin-inline: auto; }

/* -- reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rv  { opacity: 1 !important; transform: none !important; }
  .rvw { clip-path: none !important; }
  .sectionlabel > b { clip-path: none !important; }
}
