/* ---------------------------------------------------------------------------
   tokens.css — the room.

   House rule for this whole site: the chrome is achromatic. Every saturated
   colour you see belongs to a game and arrives per-cabinet as --g-light,
   --g-glow, --g-ink and --g-deep. Nothing in here may add a competing hue.
   The single exception is --attract, which is reserved for focus and active
   state, because those need to stay constant while everything else changes.
--------------------------------------------------------------------------- */

:root {
  --room-deep: #0c0910;
  --room: #141019;
  --riser: #1c1723;
  --riser-lit: #241d2d;
  --edge: #2b2334;
  --hair: rgba(243, 238, 247, 0.09);
  --hair-bright: rgba(243, 238, 247, 0.18);

  --light: #f3eef7;
  --dust: #a99db6;
  --dust-dim: #746a80;

  --attract: #ffb43d;
  --attract-ink: #2a1c05;

  --face: 'Archivo', 'Archivo Expanded', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--2: clamp(0.66rem, 0.64rem + 0.1vw, 0.72rem);
  --step--1: clamp(0.74rem, 0.71rem + 0.15vw, 0.82rem);
  --step-0: clamp(0.88rem, 0.85rem + 0.15vw, 0.96rem);
  --step-1: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem);
  --step-2: clamp(1.3rem, 1.1rem + 0.9vw, 1.85rem);
  --step-3: clamp(2.1rem, 1.2rem + 4vw, 4.75rem);

  --gutter: clamp(1rem, 0.35rem + 2.6vw, 2.75rem);
  /* Full-bleed backgrounds, capped content. On a 2300px display an uncapped
     wall sprawls and the sign's two ends stop reading as one object. */
  --shell-max: 132rem;
  --pad-x: max(var(--gutter), calc((100% - var(--shell-max)) / 2));
  --tile-min: 17rem;
  --tile-gap: clamp(0.85rem, 0.5rem + 1.2vw, 1.6rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);

  /* Neutral stand-ins so a cabinet still renders if a game has no colour. */
  --g-light: #b9aec6;
  --g-glow: #6f6480;
  --g-ink: #1a1520;
  --g-deep: #110d16;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--room-deep);
  color: var(--light);
  font-family: var(--face);
  font-size: var(--step-0);
  font-variation-settings: 'wdth' 100, 'wght' 420;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

body.is-playing {
  overflow: hidden;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

::selection {
  background: var(--attract);
  color: var(--attract-ink);
}

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

.room {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, #221a2c 0%, transparent 62%),
    radial-gradient(90% 55% at 8% 100%, #18131f 0%, transparent 70%),
    radial-gradient(90% 55% at 92% 100%, #171220 0%, transparent 70%),
    var(--room-deep);
}

/* Faint dust in the projector beam. Static: no animation, no cost. */
.room__grain {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.room__haze {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 9, 16, 0.86) 0%, transparent 24%);
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--attract);
  color: var(--attract-ink);
  font-variation-settings: 'wdth' 92, 'wght' 700;
}

.skip:focus {
  inset-inline-start: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
