/* ============================================================
   MIMICRY! — Crafting Chaos Games Night
   Containment-lab theme: hazard yellow + black, lab whites,
   steel greys, coral for the mimics themselves.
   ============================================================ */

:root {
  /* Hazard */
  --hazard: #f5c518;
  --hazard-deep: #d9a800;
  --ink: #14110f;
  --ink-soft: #2a2522;

  /* Lab */
  --lab-white: #f1edde;
  --steel: #7d8a8d;
  --steel-light: #9aa5a8;
  --steel-dark: #4a5457;
  --glass: #bad0d7;

  /* Mimics */
  --mimic: #d9463e;
  --mimic-soft: #d78983;
  --mimic-deep: #a3322c;

  /* Status */
  --live: #43d17a;
  --unknown: #e8a33d;
  --twitch: #9146ff;

  --border: 3px solid var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 var(--ink);

  --font-display: 'Cherry Bomb One', 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --pod-radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Flex/grid display rules below must never resurrect a [hidden] element. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* The hazard tape is deliberately over-wide (scaleX) so its stripes run past
     the edges; keep that from creating a horizontal scrollbar. */
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--lab-white);
  background: var(--ink);
  /* Faint blueprint grid: the lab floor. */
  background-image:
    linear-gradient(rgba(186, 208, 215, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 208, 215, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hazard); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--hazard);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Hazard tape ---------- */

.tape {
  height: 22px;
  background: repeating-linear-gradient(
    -45deg,
    var(--hazard) 0 22px,
    var(--ink) 22px 44px
  );
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.tape--thin { height: 14px; }
.tape--top { transform: rotate(-0.6deg) scaleX(1.05); }
.tape--bottom { transform: rotate(0.5deg) scaleX(1.05); }

/* ---------- Klaxon (half or more of the roster live) ---------- */

.klaxon {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.6s ease;
  box-shadow: inset 0 0 180px 40px rgba(217, 70, 62, 0.55);
}
body[data-full-alert='true'] .klaxon {
  opacity: 1;
  animation: klaxon 2.4s ease-in-out infinite;
}
@keyframes klaxon {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 0;
  overflow: hidden;   /* clips the over-wide hazard tape */
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../assets/art/key-art.jpg') center / cover no-repeat;
  opacity: 0.28;
  filter: saturate(0.8) contrast(1.05);
}
/* Rotating gameplay clips, desktop only. Sits above the key art but below the
   darkening gradient, and inherits .hero__bg's opacity so it can never overpower
   the text on top of it. */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  filter: blur(1.5px) saturate(0.9);
  pointer-events: none;
}
.hero__video.is-playing { opacity: 1; }

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 17, 15, 0.55), rgba(20, 17, 15, 0.92));
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
}

/* Movie-trailer voiceover. Too long for the all-caps treatment a short eyebrow
   would get, so it reads as a spoken line and hands off to the logo. */
.hero__eyebrow {
  max-width: 46ch;
  margin: 0 auto 1.1rem;
  font-size: clamp(0.92rem, 0.88rem + 0.25vw, 1.08rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--lab-white);
  text-wrap: balance;
}

.hero__eyebrow em {
  font-style: normal;
  font-weight: 800;
  color: var(--hazard);
}

.hero__eyebrow-tail {
  display: block;
  margin-top: 0.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82em;
  color: var(--steel-light);
}

.hero__title { margin: 0; }

/* The wordmark is the link to the Steam page. */
.hero__logo-link {
  display: block;
  width: min(100%, 620px);
  margin: 0 auto;
  border-radius: 12px;
  transition: transform 0.2s ease;
}
.hero__logo-link:hover { transform: scale(1.025); }
.hero__logo-link:focus-visible { outline-offset: 6px; }

.hero__logo {
  width: min(100%, 620px);
  margin: 0 auto;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.45));
  animation: logo-bob 5s ease-in-out infinite;
}
@keyframes logo-bob {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-8px) rotate(0.5deg); }
}

.hero__tagline {
  margin: 0.5rem 0 1.5rem;
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 700;
  color: var(--lab-white);
}
.hero__tagline em { color: var(--mimic-soft); font-style: normal; }

.hero__when {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--lab-white);
  color: var(--ink);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-hard-sm);
  font-weight: 800;
  font-size: 1.05rem;
}
.hero__when-sep { color: var(--mimic); }

.hero__countdown {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--hazard);
  letter-spacing: 0.05em;
}

/* ---------- Breach counter ---------- */

.breach {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.5rem auto 0;
  padding: 0.85rem 1.5rem;
  border: var(--border);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.7vw, 1.5rem);
  line-height: 1.25;
  text-align: left;
  background: var(--steel-dark);
  color: var(--lab-white);
  box-shadow: var(--shadow-hard);
  transition: background 0.4s ease, color 0.4s ease;
}
.breach__icon { font-size: 1.3em; line-height: 1; }

.breach[data-state='breach'] {
  background: var(--hazard);
  color: var(--ink);
  animation: breach-pulse 1.8s ease-in-out infinite;
}
@keyframes breach-pulse {
  0%, 100% { box-shadow: var(--shadow-hard); transform: scale(1); }
  50% { box-shadow: 6px 6px 0 var(--ink), 0 0 34px 6px rgba(245, 197, 24, 0.55); transform: scale(1.02); }
}

.breach[data-state='contained'] { background: var(--steel-dark); color: var(--lab-white); }
.breach[data-state='unknown'] { background: var(--unknown); color: var(--ink); }
.breach[data-state='loading'] { opacity: 0.8; }

.hero__updated {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--steel-light);
  font-family: var(--font-mono);
  min-height: 1.2em;
}

/* ---------- Section headings ---------- */

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
  color: var(--lab-white);
}

.section-title__stamp {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mimic);
  border: 2px dashed currentColor;
  border-radius: 6px;
  padding: 0.15rem 0.6rem;
  width: max-content;
  margin: 0 auto 0.75rem;
  transform: rotate(-2deg);
  opacity: 0.9;
}

/* ---------- Roster grid ---------- */

.roster {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  text-align: center;
}

.roster__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}

/* ---------- PURGE button ---------- */

/* The official Exterminator, already on fire, stands beside the control that
   sets everything else on fire. */
.purge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.purge-wrap__mascot {
  width: clamp(64px, 9vw, 104px);
  height: auto;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.5));
  transform: scaleX(-1) rotate(-4deg);
  pointer-events: none;
}

@media (max-width: 620px) {
  .purge-wrap__mascot { display: none; }
}

.purge {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.9rem 1.9rem;
  border: var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #e8563a, #b32b1c);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--shadow-hard), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
}

.purge__sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Warning halo — this button is meant to look like it should not be pressed. */
.purge__ring {
  position: absolute;
  inset: -7px;
  border-radius: 20px;
  border: 3px dashed var(--hazard);
  opacity: 0.55;
  animation: purge-halo 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes purge-halo {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.035); }
}

.purge:hover, .purge:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
.purge:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.purge[disabled] {
  cursor: default;
  filter: grayscale(0.7) brightness(0.62);
  transform: none;
  box-shadow: var(--shadow-hard-sm);
}
.purge[disabled] .purge__ring { display: none; }

.roster__hint {
  margin: 0 0 2rem;
  color: var(--steel-light);
  font-size: 0.95rem;
}

/* ---------- Flame sweep ---------- */

.grid-wrap { position: relative; }

.flames {
  position: absolute;
  inset: -30px -10px 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.flame {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 168px;
  height: 252px;
  opacity: 0;
  transform-origin: 50% 100%;
  animation: flame-up 1.15s var(--d) cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}
.flame svg { width: 100%; height: 100%; filter: drop-shadow(0 0 34px rgba(247, 140, 30, 0.9)); }

@keyframes flame-up {
  0% { opacity: 0; transform: translate(-50%, 30%) scale(calc(var(--s) * 0.35)) rotate(var(--r)); }
  22% { opacity: 1; }
  65% { opacity: 1; transform: translate(-50%, -32%) scale(var(--s)) rotate(var(--r)); }
  100% { opacity: 0; transform: translate(-50%, -85%) scale(calc(var(--s) * 0.7)) rotate(var(--r)); }
}

/* Heat wash over the whole grid while it burns. */
.flames[data-active='true']::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 180, 70, 0.55), rgba(255, 90, 30, 0.24) 60%, transparent);
  animation: heat-wash 1.5s ease-out forwards;
}
@keyframes heat-wash {
  0% { opacity: 0; transform: translateX(-30%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(30%); }
}
.roster__hint--touch { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* Fixed row height keeps every pod the same size regardless of the 2x2 host. */
  grid-auto-rows: minmax(232px, auto);
  gap: clamp(1rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.grid__loading {
  grid-column: 1 / -1;
  padding: 3rem;
  color: var(--steel-light);
  text-align: center;
  font-family: var(--font-mono);
}

/* ---------- Containment pod ---------- */

.pod { perspective: 1000px; }

.pod__link {
  display: block;
  position: relative;
  height: 100%;
  min-height: 230px;
  border: var(--border);
  border-radius: var(--pod-radius);
  background:
    linear-gradient(180deg, rgba(186, 208, 215, 0.16), rgba(74, 84, 87, 0.35)),
    var(--ink-soft);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pod__link:hover,
.pod__link:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

/* Glass sheen + scanlines */
.pod__glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0 2px,
      transparent 2px 5px
    ),
    linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 42%);
}

/* Flip container */
.pod__flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.6, -0.28, 0.4, 1.4);
  z-index: 2;
}
.pod__link:hover .pod__flip,
.pod__link:focus-visible .pod__flip,
.pod.is-flipped .pod__flip,
.pod.is-open .pod__flip { transform: rotateY(180deg); }

.pod__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.85rem 2.7rem;
  gap: 0.3rem;
  overflow: hidden;   /* a long stream title must never escape the pod */
  /* backface-visibility alone is unreliable once a pod spans multiple grid
     tracks, so visibility is also driven explicitly and swapped at the
     midpoint of the 0.55s flip. */
  transition: opacity 0s linear 0.27s;
}

.pod__face--prop { opacity: 1; }
.pod__face--card { opacity: 0; }

.pod__link:hover .pod__face--prop,
.pod__link:focus-visible .pod__face--prop,
.pod.is-flipped .pod__face--prop,
.pod.is-open .pod__face--prop { opacity: 0; }

.pod__link:hover .pod__face--card,
.pod__link:focus-visible .pod__face--card,
.pod.is-flipped .pod__face--card,
.pod.is-open .pod__face--card { opacity: 1; }

/* --- Face A: the innocuous prop --- */

.pod__face--prop { background: transparent; }

.pod__prop {
  position: relative;
  width: min(58%, 150px);
  aspect-ratio: 1;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
}

/* A live streamer's prop can't sit still — the giveaway that it isn't furniture.
   This is the main way a live pod is spotted while scanning, so it runs
   continuously rather than on an occasional beat. */
.pod[data-state='live'] .pod__prop {
  animation: prop-wiggle 1.5s ease-in-out infinite;
  transform-origin: 50% 85%;
}
@keyframes prop-wiggle {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-3px); }
}
/* Once the pod is flipped the prop is face-down; stop the animation. */
.pod__link:hover .pod__prop,
.pod__link:focus-visible .pod__prop,
.pod.is-flipped .pod__prop,
.pod.is-open .pod__prop { animation: none; }
.pod__prop svg { width: 100%; height: 100%; }

/* Eyes sprout just before the flip completes — the joke's beat. */
.pod__eyes {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pod__link:hover .pod__eyes,
.pod__link:focus-visible .pod__eyes,
.pod.is-flipped .pod__eyes,
.pod.is-open .pod__eyes { opacity: 1; transform: scale(1); }

.pod__eye { animation: eye-jiggle 0.9s ease-in-out infinite; transform-origin: center; }
.pod__eye--r { animation-delay: 0.12s; }
@keyframes eye-jiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}

.pod__proplabel {
  font-size: 0.76rem;
  color: var(--steel-light);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* The name is readable before the pod ever opens — that is the whole point of
   putting it on the prop face. */
.pod__name--prop {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  color: var(--lab-white);
}

/* --- broken open --- */

.pod.is-open .pod__link {
  border-color: var(--hazard);
}

/* The break itself: a hard jolt as the glass gives way. */
.pod.is-open .pod__link { animation: pod-burst 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes pod-burst {
  0% { transform: scale(1); }
  28% { transform: scale(1.07) rotate(-1.4deg); }
  55% { transform: scale(0.975) rotate(0.8deg); }
  100% { transform: scale(1) rotate(0); }
}

/* --- blasted by the purge ---
   The cascade has usually already opened every pod by the time anyone reaches the
   button, so the purge cannot rely on the break-out itself being the payoff. Each
   pod takes a violent, brightly-lit hit instead, in a wave across the grid.
   Declared after `.is-open` so it wins the animation slot. */

.pod.is-blasted .pod__link {
  animation: pod-blast 0.62s cubic-bezier(0.18, 0.9, 0.28, 1.3);
}
@keyframes pod-blast {
  0% { transform: scale(1); box-shadow: var(--shadow-hard); }
  12% { transform: scale(1.17) rotate(-2.8deg); box-shadow: var(--shadow-hard), 0 0 44px 14px rgba(255, 184, 74, 0.95); }
  34% { transform: scale(0.93) rotate(2.1deg); box-shadow: var(--shadow-hard), 0 0 28px 7px rgba(255, 150, 50, 0.6); }
  58% { transform: scale(1.06) rotate(-1.2deg); box-shadow: var(--shadow-hard), 0 0 15px 3px rgba(255, 150, 50, 0.3); }
  100% { transform: scale(1) rotate(0); box-shadow: var(--shadow-hard); }
}

/* The white-hot flash is confined to the shell's interior. The status plate is a
   sibling of these layers, so live/offline state is never dimmed or blown out. */
.pod.is-blasted .pod__glass,
.pod.is-blasted .pod__crack {
  animation: pod-blast-flash 0.62s cubic-bezier(0.18, 0.9, 0.28, 1.3);
}
@keyframes pod-blast-flash {
  0% { filter: brightness(1); }
  12% { filter: brightness(2.7) saturate(1.5); }
  34% { filter: brightness(1.55); }
  58% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}

/* The whole facility takes the hit, not just the pods. */
.grid-wrap.is-shaking { animation: grid-shake 0.8s ease-in-out; }
@keyframes grid-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-7px, 4px); }
  25% { transform: translate(6px, -5px); }
  40% { transform: translate(-5px, 3px); }
  60% { transform: translate(4px, -2px); }
  80% { transform: translate(-2px, 1px); }
}

/* --- scorched by the purge --- */

/* A live pod keeps its hazard frame — soot must not mute the live signal. */
.pod.is-scorched:not([data-state='live']) .pod__link { border-color: #241a14; }

/* The streamer's card is never dimmed — soot belongs on the container only. */
.pod.is-scorched .pod__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  /* Burn marks on the container: charring pulled tight to the frame plus small
     corner smudges. The centre stays completely clear, so the avatar, name and
     live details are never obscured. */
  box-shadow:
    inset 0 -30px 24px -20px rgba(8, 5, 3, 0.95),
    inset 0 28px 22px -20px rgba(8, 5, 3, 0.8),
    inset 30px 0 22px -22px rgba(8, 5, 3, 0.75),
    inset -30px 0 22px -22px rgba(8, 5, 3, 0.75);
  background:
    radial-gradient(38% 20% at 0% 100%, rgba(8, 5, 3, 0.8), transparent 70%),
    radial-gradient(34% 18% at 100% 100%, rgba(8, 5, 3, 0.7), transparent 72%),
    radial-gradient(26% 15% at 6% 0%, rgba(8, 5, 3, 0.5), transparent 74%),
    radial-gradient(24% 14% at 94% 0%, rgba(8, 5, 3, 0.45), transparent 76%);
}

/* --- Face B: the streamer card --- */

.pod__face--card {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, rgba(186, 208, 215, 0.1), rgba(20, 17, 15, 0.5));
  text-align: center;
}

/* Nothing in the card may shrink — if it ever overflows, clip it instead of
   squashing the text to an unreadable sliver. */
.pod__face > * { flex: none; }

.pod__avatar {
  width: clamp(52px, 26%, 72px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--ink);
  /* Steel ring while contained; the red ring is reserved for escaped mimics. */
  box-shadow: 0 0 0 3px var(--steel-light), var(--shadow-hard-sm);
  object-fit: cover;
  background: var(--steel-dark);
}

.pod__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  line-height: 1.2;
  color: var(--lab-white);
  word-break: break-word;
}

.pod__flavour {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--steel-light);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pod__meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--lab-white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pod__viewers {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--hazard);
}

.pod__uptime {
  font-size: 0.72rem;
  color: var(--steel-light);
  font-family: var(--font-mono);
}

/* A live small pod swaps its flavour line for the real stream title — there is
   only room for one of them. The host pod is big enough to show both. */
.pod[data-state='live'] .pod__flavour { display: none; }
.pod[data-state='live'] .pod__uptime { display: none; }
/* Title + viewer count is one line taller than the offline card, so the
   avatar gives up the difference. */
.pod[data-state='live'] .pod__avatar { width: clamp(44px, 22%, 56px); }
.pod[data-state='live'] .pod__name { font-size: 0.98rem; margin-top: 0.15rem; }

/* --- Status plate (always visible, never colour-only) --- */

.pod__plate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.5rem;
  border-top: 3px solid var(--ink);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  background: var(--steel-dark);
  color: var(--lab-white);
}

.pod__plate .icon { width: 1em; height: 1em; }

/* Offline */
.pod[data-state='offline'] .pod__plate { background: var(--steel-dark); color: var(--lab-white); }

/* Unknown */
.pod[data-state='unknown'] .pod__plate { background: var(--unknown); color: var(--ink); }

/* Live */
.pod[data-state='live'] .pod__plate {
  background: var(--mimic);
  color: #fff;
  animation: plate-flash 1.6s ease-in-out infinite;
}
@keyframes plate-flash {
  0%, 100% { background: var(--mimic); }
  50% { background: var(--mimic-deep); }
}

.pod[data-state='live'] .pod__link {
  border-color: var(--hazard);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(245, 197, 24, 0.28), transparent 65%),
    linear-gradient(180deg, rgba(217, 70, 62, 0.22), rgba(20, 17, 15, 0.6)),
    var(--ink-soft);
  box-shadow: var(--shadow-hard), 0 0 28px rgba(245, 197, 24, 0.28);
}

.pod[data-state='live'] .pod__avatar { box-shadow: 0 0 0 3px var(--mimic), var(--shadow-hard-sm); }

/* Shattered glass overlay — only on escaped pods. */
.pod__crack {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.pod.is-open .pod__crack,
.pod[data-state='live'] .pod__crack { opacity: 1; }

.pod[data-state='live'] .pod__link { animation: pod-rattle 4.5s ease-in-out infinite; }
@keyframes pod-rattle {
  0%, 92%, 100% { transform: translate(0, 0) rotate(0deg); }
  94% { transform: translate(-2px, 1px) rotate(-0.4deg); }
  96% { transform: translate(2px, -1px) rotate(0.4deg); }
  98% { transform: translate(-1px, 0) rotate(-0.2deg); }
}
/* Hover must still win over the rattle. */
.pod[data-state='live'] .pod__link:hover,
.pod[data-state='live'] .pod__link:focus-visible { animation: none; }

/* ---------- About ---------- */

.about {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  background: rgba(74, 84, 87, 0.18);
  overflow: hidden;   /* clips the over-wide hazard tape */
}

.about__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.about__art {
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-1.5deg);
}

.about__copy .section-title { text-align: left; }
.about__copy .section-title__stamp { margin-left: 0; }
.about__copy p { margin: 0 0 1rem; }

/* Screenshot strip: what the lab actually looks like from the inside. */
.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.18s ease;
}
.shots img:hover { transform: translate(-2px, -2px) scale(1.03); }

@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.about__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: var(--border);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn--steam { background: var(--hazard); color: var(--ink); }
.btn--insta { background: var(--lab-white); color: var(--ink); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--ink);
  background: var(--ink);
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem clamp(2rem, 4vw, 3rem);
}

.footer__sticker {
  position: absolute;
  width: clamp(110px, 16vw, 190px);
  opacity: 0.9;
  pointer-events: none;
}
.footer__sticker--l { left: 1.5rem; bottom: 1.25rem; transform: rotate(-9deg); }
.footer__sticker--r { right: 1.5rem; top: 1.25rem; transform: rotate(11deg); }

@media (max-width: 900px) {
  .footer__sticker--l { left: -2rem; bottom: -2rem; }
  .footer__sticker--r { right: -2rem; top: -2rem; }
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.footer__lead { margin: 0 0 0.75rem; font-size: 1.05rem; font-weight: 700; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.5rem;
}
.footer__links a { font-weight: 700; }

.footer__legal { margin: 0; font-size: 0.78rem; line-height: 1.6; color: var(--steel-light); }

/* ---------- 3D mimic ---------- */

.mimic-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 80;
  pointer-events: none;
}

.mimic-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--lab-white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}
.mimic-toggle:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about__inner { grid-template-columns: minmax(0, 1fr); }
  /* min() so the cap never exceeds the track and widen the grid on narrow screens. */
  .about__art { max-width: min(420px, 100%); margin-inline: auto; }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .footer__sticker { opacity: 0.35; }
}

/* Touch devices: hover gag becomes tap-to-flip, hint copy swaps. */
@media (hover: none) {
  .roster__hint--hover { display: none; }
  .roster__hint--touch { display: inline; }
  .pod__link:hover .pod__flip { transform: none; }
  .pod.is-flipped .pod__flip { transform: rotateY(180deg); }
  .pod__link:hover .pod__eyes { opacity: 0; transform: scale(0.4); }
  .pod.is-flipped .pod__eyes { opacity: 1; transform: scale(1); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  body[data-full-alert='true'] .klaxon { animation: none; opacity: 0.5; }
  .pod__flip { transition: none; }
  .hero__logo { animation: none; }
}
