/* benjaminarthur.net — the arcade
   A dark room off the back of a paper portfolio: neon, CRT glass, and carpet
   that glows under black light. Deliberately shares nothing with style.css. */

:root {
  --void: #0a0510;          /* the room */
  --void-lift: #140a1e;
  --cab: #1a1024;           /* cabinet body */
  --cab-edge: #2e1c40;
  --glass: #05080a;         /* screen glass */
  --neon: #ff2ea6;          /* the sign out front */
  --neon-2: #2ee6ff;        /* its cool twin */
  --amber: #ffcf3f;
  --chalk: #efe6ff;
  --dim: #9a89b4;

  --pixel: "Press Start 2P", "Courier New", monospace;
  --term: "VT323", "Courier New", monospace;

  --step-note: 1.2rem;      /* VT323 runs small; it needs the extra */
}

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

html { background: var(--void); }

body.arcade-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--chalk);
  font-family: var(--term);
  font-size: var(--step-note);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--neon); color: #fff; padding: .6rem 1rem;
  font-family: var(--pixel); font-size: .6rem;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---------- the room ---------- */

/* Black-light carpet: cyan and magenta confetti on navy, the way every
   mall arcade in 1994 had it. Fades out before it reaches the games. */
.room {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 46, 166, .5) 0 2px, transparent 3px),
    radial-gradient(circle at 63% 41%, rgba(46, 230, 255, .45) 0 2px, transparent 3px),
    radial-gradient(circle at 81% 77%, rgba(255, 207, 63, .4) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 88%, rgba(46, 230, 255, .3) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 12%, rgba(255, 46, 166, .3) 0 2px, transparent 3px),
    radial-gradient(ellipse 120% 70% at 50% 0%, rgba(120, 40, 190, .35) 0%, transparent 70%),
    linear-gradient(180deg, #160a24 0%, #0a0510 55%);
  background-size: 90px 90px, 90px 90px, 90px 90px, 90px 90px, 90px 90px, 100% 100%, 100% 100%;
  opacity: .9;
}

/* CRT glass over the whole room. Pure decoration, never in the way. */
.scanlines {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

/* ---------- marquee ---------- */

.marquee {
  position: relative; z-index: 1;
  padding: clamp(2rem, 7vw, 4.5rem) 1rem 1.25rem;
  text-align: center;
}

.marquee__box {
  display: inline-block;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1.25rem, 5vw, 3.5rem);
  border: 3px solid rgba(255, 46, 166, .5);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 46, 166, .1), rgba(46, 230, 255, .06));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 0 30px rgba(255, 46, 166, .35),
    0 0 90px rgba(255, 46, 166, .18);
}

.marquee__kicker {
  margin: 0 0 .85rem;
  font-family: var(--pixel); font-size: clamp(.42rem, 1.5vw, .58rem);
  letter-spacing: .22em; text-transform: uppercase; color: var(--neon-2);
  text-shadow: 0 0 10px rgba(46, 230, 255, .8);
}

.marquee__title { margin: 0; }
.marquee__word {
  display: flex; justify-content: center; gap: clamp(.1em, .6vw, .22em);
  font-family: var(--pixel);
  font-size: clamp(1.6rem, 9vw, 4.25rem);
  line-height: 1;
  color: #fff;
}
/* Each letter is its own tube, so they can buzz out of step. */
.marquee__word span {
  text-shadow:
    0 0 6px #fff,
    0 0 18px var(--neon),
    0 0 40px var(--neon),
    0 0 80px rgba(255, 46, 166, .7);
  animation: buzz 7s infinite;
}
.marquee__word span:nth-child(2) { animation-delay: -1.3s; }
.marquee__word span:nth-child(3) { animation-delay: -2.6s; }
.marquee__word span:nth-child(4) { animation-delay: -3.9s; }
.marquee__word span:nth-child(5) { animation-delay: -5.2s; }
.marquee__word span:nth-child(6) { animation-delay: -6.5s; }

@keyframes buzz {
  0%, 96%, 100% { opacity: 1; }
  96.5% { opacity: .35; }
  97.5% { opacity: 1; }
  98% { opacity: .5; }
}

.marquee__sub {
  margin: 1rem 0 0; color: var(--dim);
  font-size: 1.15rem; letter-spacing: .06em;
}

/* Insert coin */
.coin {
  margin: clamp(1.25rem, 4vw, 2rem) 0 0;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: center;
}
.coin__btn {
  font-family: var(--pixel); font-size: clamp(.5rem, 1.8vw, .68rem);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); background: none;
  border: 2px solid rgba(255, 207, 63, .45); border-radius: 3px;
  padding: .7rem 1.1rem; cursor: pointer;
  animation: blink 1.4s steps(1) infinite;
  transition: color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.coin__btn:hover, .coin__btn:focus-visible {
  animation: none; color: #fff; border-color: var(--amber);
  box-shadow: 0 0 16px rgba(255, 207, 63, .55);
}
.coin__btn:active { transform: translateY(1px); }
.coin__btn.is-paid { animation: none; }

@keyframes blink { 0%, 55% { opacity: 1; } 55.1%, 100% { opacity: .3; } }

.coin__credits {
  font-family: var(--pixel); font-size: clamp(.5rem, 1.8vw, .62rem);
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.coin__credits b { color: var(--neon-2); }

/* ---------- attract scroller ---------- */

.attract {
  position: relative; z-index: 1;
  margin: clamp(1.5rem, 5vw, 2.5rem) 0 0;
  padding: .5rem 0;
  border-top: 1px solid rgba(46, 230, 255, .2);
  border-bottom: 1px solid rgba(46, 230, 255, .2);
  background: rgba(46, 230, 255, .04);
  overflow: hidden; white-space: nowrap;
}
.attract__track {
  display: inline-flex; animation: crawl 42s linear infinite;
}
.attract__track span {
  padding-right: 2rem;
  font-family: var(--pixel); font-size: .58rem; letter-spacing: .1em;
  color: rgba(46, 230, 255, .85);
}
@keyframes crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- the floor of cabinets ---------- */

.floor {
  position: relative; z-index: 1;
  max-width: 78rem; margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 6vw, 3rem);
}

.floor__heading {
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  font-family: var(--pixel); font-size: clamp(.6rem, 2.2vw, .8rem);
  letter-spacing: .2em; text-transform: uppercase; color: var(--chalk);
  text-shadow: 0 0 14px rgba(239, 230, 255, .4);
}

.cabs {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}

.cab { display: flex; }
.cab--featured { grid-column: span 2; }
@media (max-width: 40rem) { .cab--featured { grid-column: span 1; } }

/* A cabinet: lit marquee on top, glass in the middle, control panel below. */
.cab__link {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  text-decoration: none; color: inherit;
  background: linear-gradient(180deg, var(--cab) 0%, #120a1a 100%);
  border: 1px solid var(--cab-edge);
  border-radius: 10px 10px 6px 6px;
  overflow: hidden;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s;
}
.cab__link:hover, .cab__link:focus-visible {
  transform: translateY(-6px);
  border-color: hsl(var(--hue) 90% 65% / .7);
  box-shadow:
    0 26px 40px -18px rgba(0, 0, 0, .95),
    0 0 26px hsl(var(--hue) 95% 60% / .4),
    0 0 0 1px rgba(255, 255, 255, .05) inset;
}
.cab__link:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* the lit strip above the screen */
.cab__marquee {
  display: block; padding: .85rem 1rem;
  background: linear-gradient(180deg, hsl(var(--hue) 80% 26%), hsl(var(--hue) 75% 14%));
  border-bottom: 1px solid hsl(var(--hue) 70% 40% / .5);
  box-shadow: 0 0 22px hsl(var(--hue) 90% 55% / .28) inset;
  text-align: center;
}
.cab__name {
  display: block;
  font-family: var(--pixel); font-size: .62rem; line-height: 1.5;
  letter-spacing: .06em; color: #fff;
  text-shadow: 0 0 12px hsl(var(--hue) 100% 75% / .9);
}
.cab__sub {
  display: block; margin-top: .4rem;
  font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  color: hsl(var(--hue) 70% 82% / .85);
}

/* the glass: no screenshots, just the code glowing in attract mode */
.cab__screen {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(ellipse 80% 65% at 50% 45%, hsl(var(--hue) 70% 16%) 0%, var(--glass) 75%),
    var(--glass);
  border-bottom: 1px solid var(--cab-edge);
  overflow: hidden;
}
.cab--featured .cab__screen { aspect-ratio: 16 / 9; }

.cab__code {
  font-family: var(--pixel);
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  letter-spacing: .08em;
  color: hsl(var(--hue) 100% 72%);
  text-shadow: 0 0 10px hsl(var(--hue) 100% 60% / .9), 0 0 34px hsl(var(--hue) 100% 55% / .6);
}
.cab--featured .cab__code { font-size: clamp(2rem, 6vw, 3.4rem); }

/* scanlines on the glass itself, finer than the room's */
.cab__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px);
}
/* a soft sweep that crosses the glass on hover, like an attract loop waking up */
.cab__glow {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, hsl(var(--hue) 100% 80% / .16) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.cab__link:hover .cab__glow, .cab__link:focus-visible .cab__glow { transform: translateX(120%); }

.cab__badge {
  position: absolute; top: .6rem; right: .6rem;
  padding: .3rem .45rem;
  font-family: var(--pixel); font-size: .42rem; letter-spacing: .1em; text-transform: uppercase;
  color: #150b04; background: var(--amber); border-radius: 2px;
}
.cab__badge--wip { background: var(--dim); color: #120a18; }

/* control panel */
.cab__panel {
  display: flex; flex-direction: column; gap: .7rem; flex: 1;
  padding: 1rem 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent);
}
.cab__note { color: #d9cdea; font-size: 1.12rem; line-height: 1.45; }

.cab__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem;
  font-family: var(--pixel); font-size: .42rem; letter-spacing: .08em; text-transform: uppercase;
}
.cab__tag {
  padding: .32rem .45rem; border-radius: 2px;
  color: hsl(var(--hue) 90% 80%); background: hsl(var(--hue) 80% 50% / .16);
  border: 1px solid hsl(var(--hue) 80% 60% / .3);
}
.cab__ctrl, .cab__year { color: var(--dim); }
.cab__year { margin-left: auto; }

.cab__play {
  margin-top: auto; padding-top: .15rem;
  font-family: var(--pixel); font-size: .55rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber);
}
.cab__link:hover .cab__play, .cab__link:focus-visible .cab__play { color: #fff; }

.floor__note {
  max-width: 34rem; margin: clamp(2rem, 6vw, 3rem) auto 0;
  text-align: center; color: var(--dim); font-size: 1.12rem;
}

/* ---------- exit ---------- */

.exit {
  position: relative; z-index: 1;
  padding: clamp(2rem, 6vw, 3rem) 1rem clamp(3rem, 8vw, 4rem);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.exit__link {
  font-family: var(--pixel); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--neon-2); text-decoration: none;
  border-bottom: 2px solid rgba(46, 230, 255, .35);
  padding-bottom: .3rem;
  transition: color .2s, border-color .2s, text-shadow .2s;
}
.exit__link::before { content: "< "; }
.exit__link:hover, .exit__link:focus-visible {
  color: #fff; border-color: var(--neon-2);
  text-shadow: 0 0 14px rgba(46, 230, 255, .9);
}
.exit__small { margin: 1.5rem 0 0; color: #6b5d80; font-size: 1rem; }

/* ---------- a quieter room ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee__word span,
  .coin__btn,
  .attract__track { animation: none !important; }
  .cab__link, .cab__glow { transition: none; }
  .cab__link:hover, .cab__link:focus-visible { transform: none; }
}
