/* IT Flip Day Game 2026 tokens and shared pieces. Source of truth for colours: replica/design/tokens.json */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* stage: the dark room the game is played in */
  --stage: #131216;
  --stage-2: #1D1C21;
  --stage-3: #2A2930;
  --line: #3A3842;
  --text: #F7F6F4;
  --text-muted: #A9A7B2;

  /* paper: the white chrome (top bars, ROOT's speech, the editor) */
  --paper: #FFFFFF;
  --paper-2: #F4F3F0;
  --paper-line: #D9D6D0;
  --ink: #000000;
  --ink-2: #3A3A3A;
  --ink-muted: #6B6B6B;

  /* accents */
  --green: #6EF06A;        /* go, correct, online, money earned */
  --green-2: #69E465;
  --on-green: #000000;
  --lilac: #C5B4F7;        /* the card in focus, your pick, zombie processes */
  --lilac-2: #B5A1F3;
  --on-lilac: #000000;
  --violet: #AB8FFB;       /* accent text on the stage */
  --plum: #4D1537;         /* deep accent on paper and on green */
  --plum-2: #3A1029;
  --on-plum: #FFFFFF;
  --alert: #FF9F43;        /* warnings and terminations (never red) */
  --on-alert: #000000;
  --on-player: #000000;
  --focus: #FFFFFF;

  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-label: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  --r-s: 4px;
  --r-m: 6px;
  --shadow: 0 16px 92px rgb(0 0 0 / 0.1);
  --shadow-stage: 0 16px 92px rgb(0 0 0 / 0.55);
  --fast: 0.15s;
  --slow: 0.3s;
  --ease: cubic-bezier(0, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--stage);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Cut corners are the shape language: a notch bottom-right (--cut), and on big panels top-left too (--cut-tl).
   Two layers, so a 1px edge can follow the diagonal: the element paints the edge colour, ::before paints the fill.
   Keyboard focus thickens the edge instead of drawing an outline, because clip-path would cut an outline off. */
.cut, .btn {
  --cut: 0.6em;
  --cut-tl: 0px;
  --fill: var(--stage-2);
  --edge: var(--fill);
  --edge-w: 1px;
  position: relative;
  isolation: isolate;
  border: 0;
  background: var(--edge);
  clip-path: polygon(var(--cut-tl) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut-tl));
}
.cut::before, .btn::before {
  --i: calc(var(--cut) - var(--edge-w) * 0.59);
  --i-tl: max(0px, calc(var(--cut-tl) - var(--edge-w) * 0.59));
  content: '';
  position: absolute;
  inset: var(--edge-w);
  z-index: -1;
  background: var(--fill);
  clip-path: polygon(var(--i-tl) 0, 100% 0, 100% calc(100% - var(--i)), calc(100% - var(--i)) 100%, 0 100%, 0 var(--i-tl));
  transition: background var(--fast) var(--ease);
}
.cut:focus-visible, .btn:focus-visible { outline: none; --edge: var(--focus); --edge-w: 3px; }

/* Buttons: upper-case mono labels. Green on the stage, black on paper and on lilac. */
.btn {
  --fill: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  color: var(--on-green);
  font-family: var(--font-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.btn:not(:disabled):hover { --fill: var(--green-2); }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn.ink { --fill: var(--ink); color: var(--paper); --focus: var(--green); }
.btn.ink:not(:disabled):hover { --fill: #26252B; }
.btn.outline { --fill: var(--stage); --edge: var(--line); color: var(--text); }
.btn.outline:not(:disabled):hover { --fill: var(--stage-2); --edge: var(--text-muted); }
.btn:disabled { opacity: 0.45; cursor: default; }

/* Line icons, and the small square tile they sit in. */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.25em;
}
.tile {
  display: inline-grid;
  place-items: center;
  width: 2em;
  height: 2em;
  flex: none;
  border-radius: var(--r-s);
  background: rgb(255 255 255 / 0.1);
}

.wordmark {
  font-family: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark .x { color: var(--plum); }

.avatar {
  --bg: var(--c, var(--green));
  display: inline-grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: var(--r-m);
  background: var(--bg);
  color: var(--on-player);
  font-family: var(--font-display);
  font-weight: 600;
  flex: none;
  position: relative;
}
.avatar.zombie {
  --bg: var(--stage-3);
  background: var(--bg);
  color: var(--lilac);
  outline: 2px dashed var(--lilac);
  outline-offset: 1px;
}
.avatar.zombie::after {
  content: 'Z';
  position: absolute;
  right: -0.45em;
  top: -0.45em;
  font-size: 0.6em;
  width: 1.5em;
  height: 1.5em;
  border-radius: var(--r-s);
  display: grid;
  place-items: center;
  background: var(--lilac);
  color: var(--on-lilac);
}
/* the player's character: a round portrait, framed by a ring in the player's own colour */
.avatar.has-face { border-radius: 50%; }
.avatar .face { width: calc(100% - 0.3em); height: calc(100% - 0.3em); display: block; border-radius: 50%; object-fit: cover; user-select: none; }
.avatar.zombie .face { filter: grayscale(1) contrast(0.9) brightness(0.8); }
.avatar.offline { opacity: 0.35; }
.avatar.out { filter: grayscale(1) brightness(0.6); }

.money { font-family: var(--font-label); font-weight: 500; font-variant-numeric: tabular-nums; }

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