/* The StateLess Squad studio page.
 *
 * Sharp: ink outlines and hard offset shadows, no blur.
 * Funky: Unbounded for the display type, Bricolage Grotesque for the rest.
 * Every game card wears the game's own colours, set inline as --g-* by the generator.
 * Motion on the compositor only (transform / opacity), and none with reduced motion.
 */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(fonts/unbounded.woff2) format("woff2-variations");
}

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage.woff2) format("woff2-variations");
}

:root {
  --a1: #ff3fa4;
  --a2: #7c5cff;
  --a3: #31d8ff;
  --pop: #d7ff3a;
  --bg: #fbf7ef;
  --bg2: #f1eadb;
  --ink: #15111f;
  --text: #15111f;
  --muted: #5b5470;
  --line: #15111f;
  --surface: #ffffff;
  --hard: #15111f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0b0816;
  --bg2: #171030;
  --ink: #f6f2ff;
  --text: #f6f2ff;
  --muted: #b2a8d0;
  --line: rgba(246, 242, 255, 0.26);
  --surface: #171127;
  --hard: #7c5cff;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0816;
  --bg2: #171030;
  --ink: #f6f2ff;
  --text: #f6f2ff;
  --muted: #b2a8d0;
  --line: rgba(246, 242, 255, 0.26);
  --surface: #171127;
  --hard: #7c5cff;
  color-scheme: dark;
}

:root {
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 50%, var(--a3));
  --display: "Unbounded", ui-rounded, system-ui, sans-serif;
  --body: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --pad: clamp(16px, 5vw, 40px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --b: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: clip;
}

body {
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
}

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

.wrap {
  width: min(var(--max), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--pop);
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 12px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.grad,
.g-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.g-grad {
  background-image: linear-gradient(100deg, var(--g-a1), var(--g-a2) 55%, var(--g-a3));
}

.arr {
  width: 0.9em;
  height: 0.9em;
  display: inline-block;
  vertical-align: -0.05em;
}

/* -- buttons -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 13px 22px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: var(--b) solid var(--line);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--hard);
  transition: transform 0.18s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn:active {
  transform: translate(3px, 3px);
}

.btn-primary {
  background: var(--pop);
  color: #15111f;
  border-color: #15111f;
}

/* -- nav ------------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: var(--b) solid var(--line);
}

.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* The mascot: its own rounded tile, with a hairline so it holds on light and dark. */
.brand img {
  border-radius: 22%;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, currentColor 22%, transparent);
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--bg2);
}

.theme {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 6px;
  border: var(--b) solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme svg {
  width: 20px;
  height: 20px;
}

.theme .i-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme .i-moon {
    display: block;
  }
}

:root[data-theme="dark"] .theme .i-sun {
  display: none;
}

:root[data-theme="dark"] .theme .i-moon {
  display: block;
}

/* -- hero ----------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 100% 0%, color-mix(in srgb, var(--a2) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--a1) 14%, transparent), transparent 70%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(820px, calc(100svh - 66px));
  padding-block: clamp(40px, 7vw, 88px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  container-type: inline-size;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: var(--b) solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pop);
  border: var(--b) solid #15111f;
}

.wordmark {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
  font-family: var(--display);
  font-weight: 900;
  font-size: min(8.4rem, 100cqi / (var(--chars, 9) * 0.8));
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.wordmark .grad {
  padding-bottom: 0.08em;
}

.mark-wrap {
  position: relative;
  display: inline-block;
}

.sticker {
  position: absolute;
  right: 0;
  bottom: 6%;
  padding: 8px 14px;
  transform: rotate(-7deg);
  text-align: center;
  line-height: 1.15;
  background: var(--pop);
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 12px;
  box-shadow: 3px 3px 0 #15111f;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.7rem, 1.3vw, 0.88rem);
  white-space: nowrap;
}

.tagline {
  margin-top: 22px;
  max-width: 22ch;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 14px;
  max-width: 40ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 500;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 40px;
}

.stats li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stats b {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

/* The wall of screens. */
.wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  height: min(720px, calc(100svh - 120px));
  transform: rotate(5deg);
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}

.col {
  overflow: hidden;
}

.track {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 46s linear infinite;
}

.col-1 .track {
  animation-duration: 38s;
  animation-direction: reverse;
  margin-top: -40%;
}

.col-2 .track {
  animation-duration: 54s;
}

.wall-shot {
  width: 100%;
  height: auto;
  border: var(--b) solid var(--line);
  border-radius: 20px;
  background: var(--bg2);
}

@keyframes rise {
  to {
    transform: translateY(calc(-50% - 8px));
  }
}

/* -- ticker --------------------------------------------------------------------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-block: -10px;
  background: var(--ink);
  color: var(--bg);
  border-block: var(--b) solid var(--ink);
  transform: rotate(-1.6deg) scale(1.02);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 26px;
  padding: 14px 13px;
  animation: slide 60s linear infinite;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker i {
  font-style: normal;
  color: var(--pop);
}

@keyframes slide {
  to {
    transform: translateX(calc(-50% - 13px));
  }
}

/* -- shelves -------------------------------------------------------------------- */

.shelf {
  padding-block: clamp(72px, 10vw, 128px) 0;
}

.shelf-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  grid-row: span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: clamp(48px, 6vw, 64px);
  aspect-ratio: 1;
  border: var(--b) solid var(--line);
  border-radius: 16px;
  background: var(--pop);
  color: #15111f;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.3rem);
  box-shadow: 4px 4px 0 var(--hard);
}

.shelf-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5.6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.shelf-head p:last-child {
  margin-top: 12px;
  max-width: 56ch;
  color: var(--muted);
  font-weight: 500;
  font-size: 1.1rem;
}

/* -- the big cards -------------------------------------------------------------- */

.features {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

.feature article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 560px;
  padding: clamp(24px, 4.5vw, 60px);
  overflow: hidden;
  border: var(--b) solid var(--line);
  border-radius: 34px;
  color: var(--g-text);
  background:
    radial-gradient(70% 80% at 80% 30%, color-mix(in srgb, var(--g-a2) 34%, transparent), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--g-a1) 18%, transparent), transparent 70%),
    linear-gradient(160deg, var(--g-bg), var(--g-bg2));
  box-shadow: 10px 10px 0 var(--g-a1);
}

.feature.flip .feature-copy {
  order: 2;
}

.feature-copy {
  container-type: inline-size;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.icon {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  border: var(--b) solid color-mix(in srgb, var(--g-text) 30%, transparent);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--g-text) 22%, transparent);
}

.genre {
  padding: 5px 11px;
  border: 1.5px solid color-mix(in srgb, var(--g-text) 34%, transparent);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge {
  padding: 6px 12px;
  transform: rotate(-4deg);
  background: var(--pop);
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #15111f;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.74rem;
}

.game-name {
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: min(4.4rem, 100cqi / (var(--chars, 10) * 0.82));
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.game-name a {
  text-decoration: none;
}

.game-tag {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.game-blurb {
  margin-top: 12px;
  max-width: 46ch;
  color: var(--g-muted);
  font-weight: 500;
}

.rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.rules li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  border: 1.5px solid color-mix(in srgb, var(--g-text) 26%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--g-text) 8%, transparent);
  font-weight: 700;
}

.feature-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 30px;
}

.btn-game {
  background: var(--g-a1);
  color: #120d1f;
  border-color: #120d1f;
  box-shadow: 4px 4px 0 var(--g-text);
}

.btn-game.is-soon,
.tile-in .is-soon {
  background: transparent;
  color: var(--g-muted);
  border-style: dashed;
  border-color: currentColor;
  box-shadow: none;
}

.stores-note {
  color: var(--g-muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.stores-note a {
  color: var(--g-text);
}

.feature-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(290px, 78%);
  aspect-ratio: 560 / 1214;
  padding: 8px;
  border-radius: 44px;
  background: #0d0a18;
  border: var(--b) solid color-mix(in srgb, var(--g-text) 30%, #0d0a18);
  box-shadow: 10px 10px 0 color-mix(in srgb, #000 35%, transparent);
}

.screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  background: var(--g-bg2);
}

.peek {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(210px, 54%);
  height: auto;
  border-radius: 28px;
  border: var(--b) solid color-mix(in srgb, var(--g-text) 24%, transparent);
  opacity: 0.92;
}

.peek-0 {
  transform: translate(-108%, -46%) rotate(-9deg);
}

.peek-1 {
  transform: translate(8%, -54%) rotate(9deg);
}

/* -- the grid of tiles ---------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 42vw), 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.tile-in {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: var(--g-text);
  text-decoration: none;
  border: var(--b) solid var(--line);
  border-radius: 26px;
  background: linear-gradient(170deg, var(--g-bg), var(--g-bg2));
  box-shadow: 6px 6px 0 var(--tile-hard, var(--g-a1));
  transition: transform 0.2s var(--ease);
}

a.tile-in:hover {
  transform: translate(-3px, -3px) rotate(-0.6deg);
}

a.tile-in:active {
  transform: translate(3px, 3px);
}

.tile-shot {
  aspect-ratio: 4 / 4.4;
  overflow: hidden;
  border-bottom: var(--b) solid var(--line);
}

.tile-shot .shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 52%);
}

.tile-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 6px;
}

.tile-body .icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  box-shadow: none;
}

.tile-body > div {
  flex: 1;
  min-width: 0;
  container-type: inline-size;
}

.tile-body h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: min(1.22rem, 100cqi / (var(--chars, 8) * 0.72));
  white-space: nowrap;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tile-body p {
  margin-top: 3px;
  color: var(--g-muted);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}

.tile-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 16px 16px;
  padding-top: 8px;
}

.soon {
  color: var(--g-muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.tile-link .tile-in {
  justify-content: space-between;
  min-height: 260px;
  padding: 24px;
  color: #15111f;
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--a3) 60%, transparent), transparent 70%),
    var(--pop);
  border-color: #15111f;
  --tile-hard: #15111f;
}

.link-kicker {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.link-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
}

.link-label small {
  flex-basis: 100%;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.75;
}

.glyph {
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  line-height: 1;
  background: linear-gradient(150deg, var(--from), var(--to));
}

.tile-body .glyph {
  font-size: 1.6rem;
}

/* -- promises ------------------------------------------------------------------- */

.promises {
  padding-block: clamp(88px, 12vw, 150px);
  text-align: center;
}

.promises h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.promise-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 44px;
}

.promise-list li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: var(--b) solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--hard);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
}

.promise-list li:nth-child(2n) {
  transform: rotate(-2deg);
}

.promise-list li:nth-child(3n) {
  transform: rotate(2deg);
}

.fine {
  margin-top: 36px;
  color: var(--muted);
  font-weight: 600;
}

/* -- footer --------------------------------------------------------------------- */

.foot {
  border-top: var(--b) solid var(--line);
  background: var(--bg2);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 28px;
  color: var(--muted);
  font-weight: 600;
}

.foot .brand {
  color: var(--text);
}

/* -- reveal --------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .promise-list li.reveal.in:nth-child(2n) {
  transform: rotate(-2deg);
}

.js .promise-list li.reveal.in:nth-child(3n) {
  transform: rotate(2deg);
}

/* -- dark: hard shadows glow in the game's colour -------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .feature article {
    border-color: color-mix(in srgb, var(--g-a1) 40%, transparent);
  }
}

:root[data-theme="dark"] .feature article {
  border-color: color-mix(in srgb, var(--g-a1) 40%, transparent);
}

/* -- tablet & phone ------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 0;
  }

  .wall {
    height: 420px;
    margin-inline: calc(var(--pad) * -1);
    transform: rotate(4deg) scale(1.06);
  }

  .feature article {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .feature.flip .feature-copy {
    order: 0;
  }

  .feature-media {
    padding-block: 12px 4px;
  }

  .phone {
    width: min(250px, 62%);
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .nav-link {
    display: none;
  }

  .nav-link:last-of-type {
    display: inline;
  }

  .stats {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
  }

  .stats li {
    flex-direction: column;
    gap: 0;
  }

  .stats b {
    font-size: 1.5rem;
  }

  .stats span {
    font-size: 0.92rem;
  }

  .wall {
    height: 340px;
    gap: 10px;
  }

  .track {
    gap: 10px;
  }

  .wall-shot {
    border-radius: 14px;
  }

  .feature article {
    border-radius: 26px;
    box-shadow: 6px 6px 0 var(--g-a1);
  }

  .icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .peek {
    width: 46%;
  }

  .peek-0 {
    transform: translate(-104%, -46%) rotate(-9deg);
  }

  .peek-1 {
    transform: translate(4%, -54%) rotate(9deg);
  }

  .tile-in {
    border-radius: 20px;
    box-shadow: 4px 4px 0 var(--tile-hard, var(--g-a1));
  }

  .tile-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 4px;
  }

  .tile-body .icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    margin-top: -34px;
  }

  .tile-body > div {
    align-self: stretch;
  }

  .tile-body .glyph {
    font-size: 1.25rem;
  }

  .glyph {
    font-size: 2rem;
  }

  .tile-foot {
    margin: auto 12px 12px;
  }

  .tile-link .tile-in {
    min-height: 200px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .track,
  .ticker-track {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -- beta arcade ------------------------------------------------------------------
 * Always the arcade at night, whatever the page's mode: a dark band with a neon
 * floor, demo "cartridges" in each game's colours, and the Beta Pass ticket.
 */

.beta {
  --ink-d: #f6f2ff;
  position: relative;
  isolation: isolate;
  overflow: clip;
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: clamp(64px, 9vw, 112px);
  background: #0b0816;
  color: var(--ink-d);
  border-block: var(--b) solid #15111f;
}

.beta::before {
  /* the glow on the horizon */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--a2) 55%, transparent), transparent 70%),
    radial-gradient(40% 40% at 15% 0%, color-mix(in srgb, var(--a1) 35%, transparent), transparent 70%),
    radial-gradient(40% 40% at 85% 10%, color-mix(in srgb, var(--a3) 30%, transparent), transparent 70%);
}

.beta-scan {
  /* the neon floor: a perspective grid that rolls toward you */
  position: absolute;
  inset: auto -20% -10% -20%;
  height: 55%;
  z-index: -1;
  perspective: 420px;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
}

.beta-scan::before {
  content: "";
  position: absolute;
  inset: 0 0 -80px;
  transform: rotateX(62deg);
  transform-origin: 50% 100%;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--a3) 45%, transparent) 2px, transparent 2px) 0 0 / 80px 80px,
    linear-gradient(color-mix(in srgb, var(--a1) 45%, transparent) 2px, transparent 2px) 0 0 / 80px 80px;
  animation: floor 3.2s linear infinite;
}

@keyframes floor {
  to {
    transform: rotateX(62deg) translateY(80px);
  }
}

.beta-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.beta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  aspect-ratio: auto;
  padding: 8px 14px;
  margin-bottom: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-color: #15111f;
  box-shadow: 4px 4px 0 var(--a1);
}

.live {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff2d55;
  box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.6);
  animation: live 1.6s var(--ease) infinite;
}

@keyframes live {
  50% {
    opacity: 0.35;
  }
}

.beta-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.beta-line {
  margin-top: 16px;
  max-width: 54ch;
  color: #c9c0e6;
  font-weight: 500;
  font-size: 1.12rem;
}

.qr {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  background: var(--pop);
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--a2);
  transform: rotate(2.5deg);
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.25;
}

.qr svg {
  width: 112px;
  height: 112px;
}

/* the pass */

.pass {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 40px);
  padding: 20px 26px;
  background: #fbf7ef;
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--a1);
}

.pass::before,
.pass::after {
  /* ticket notches */
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background: #0b0816;
  border: var(--b) solid #15111f;
}

.pass::before {
  left: -15px;
  clip-path: inset(0 0 0 50%);
}

.pass::after {
  right: -15px;
  clip-path: inset(0 50% 0 0);
}

.pass-main {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 4px 18px;
  align-items: baseline;
}

.pass-kicker {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.pass-no {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.9rem;
  color: #5b5470;
}

.pass-count {
  justify-self: end;
  font-weight: 600;
}

.pass-count b {
  font-family: var(--display);
  font-size: 1.3rem;
}

.pass-meter {
  grid-column: 1 / -1;
  height: 10px;
  border: var(--b) solid #15111f;
  border-radius: 999px;
  overflow: hidden;
  background: #efe8da;
}

.pass-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.pass-reward {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  color: #5b5470;
}

.pass-reward .done,
.pass.full .pass-reward .todo {
  display: none;
}

.pass.full .pass-reward .done {
  display: inline;
  font-weight: 700;
  color: #15111f;
}

.pass.full {
  background: linear-gradient(115deg, #fff0fa, #f0ecff 40%, #e6fbff 70%, #f9ffe0);
}

.pass-stamps {
  display: flex;
  gap: 10px;
  list-style: none;
}

.stamp {
  position: relative;
}

.stamp .icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border-color: #15111f;
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.38;
}

.stamp.done .icon {
  filter: none;
  opacity: 1;
  box-shadow: 3px 3px 0 #15111f;
}

.stamp-ok {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pop);
  border: var(--b) solid #15111f;
  font-size: 0.7rem;
  font-weight: 900;
}

.stamp.done .stamp-ok {
  display: grid;
}

.stamp.fresh .icon {
  animation: stamp-in 0.7s var(--ease);
}

@keyframes stamp-in {
  0% {
    transform: scale(1.8) rotate(-14deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.92) rotate(3deg);
    opacity: 1;
  }
}

.pass-fine {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: #7a728f;
}

/* the cartridges */

.carts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  list-style: none;
}

.cart {
  display: flex;
  flex-direction: column;
  background: var(--g-bg);
  color: var(--g-text);
  border: var(--b) solid #15111f;
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--g-a1);
  overflow: hidden;
  transition: transform 0.2s var(--ease);
}

.cart:hover {
  transform: translate(-3px, -3px);
}

.cart-screen {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-bottom: var(--b) solid #15111f;
  background: var(--g-bg2);
  cursor: pointer;
  overflow: hidden;
}

.cart-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
}

.cart-chip,
.cart-time {
  position: absolute;
  top: 14px;
  padding: 6px 11px;
  border: var(--b) solid #15111f;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cart-chip {
  left: 14px;
  background: var(--pop);
  color: #15111f;
  box-shadow: 3px 3px 0 #15111f;
}

.cart-time {
  right: 14px;
  background: rgba(11, 8, 22, 0.78);
  color: #f6f2ff;
  border-color: rgba(246, 242, 255, 0.4);
  letter-spacing: 0.04em;
  text-transform: none;
}

.cart-go {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: var(--g-a1);
  color: #120d1f;
  border: 3px solid #120d1f;
  box-shadow: 5px 5px 0 #120d1f;
  transition: transform 0.2s var(--ease);
}

.cart-go svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}

.cart-screen:hover .cart-go,
.cart-screen:focus-visible .cart-go {
  transform: scale(1.12);
}

.cart-stamp {
  position: absolute;
  right: 12px;
  bottom: 18px;
  display: none;
  padding: 6px 14px;
  border: 3px solid var(--pop);
  border-radius: 10px;
  color: var(--pop);
  background: rgba(11, 8, 22, 0.7);
  font-family: var(--display);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-9deg);
}

.cart.cleared .cart-stamp {
  display: block;
}

.cart-body {
  display: grid;
  gap: 14px;
  padding: 18px 18px 20px;
  flex: 1;
  align-content: start;
}

.cart-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-title .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex: none;
}

.cart-title .glyph {
  font-size: 1.6rem;
}

.cart-title h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.cart-title p {
  color: var(--g-muted);
  font-size: 0.92rem;
}

.cart-stages,
.player-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.cart-stages li,
.player-stages li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1.5px solid #15111f;
  border-radius: 999px;
  background: color-mix(in srgb, var(--g-a1) 72%, #fff);
  color: #120d1f;
  font-weight: 700;
  font-size: 0.78rem;
}

.cart-stages .locked,
.player-stages .locked {
  background: transparent;
  color: var(--g-muted);
  border: 1.5px dashed color-mix(in srgb, var(--g-text) 45%, transparent);
  font-size: 0.7rem;
}

.redact {
  display: inline-block;
  width: 38px;
  height: 0.8em;
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--g-text) 55%, transparent) 0 3px, transparent 3px 6px);
}

.cart-stages .more,
.player-stages .more {
  background: transparent;
  color: var(--g-muted);
  border-color: transparent;
}

.cart-play {
  justify-self: start;
}

/* -- the player ------------------------------------------------------------------ */

.playing,
.playing body {
  overflow: hidden;
}

.player {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--g-text);
  background:
    radial-gradient(70% 60% at 70% 40%, color-mix(in srgb, var(--g-a2) 40%, var(--g-bg)), var(--g-bg) 75%);
}

.player::backdrop {
  background: #0b0816;
}

.player-in {
  display: grid;
  grid-template-columns: minmax(260px, 360px) auto;
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  height: 100%;
  padding: 24px;
}

.player-side {
  display: grid;
  gap: 16px;
  align-content: center;
}

.player-side .eyebrow {
  width: auto;
  aspect-ratio: auto;
  justify-self: start;
  padding: 6px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-color: #15111f;
  box-shadow: 3px 3px 0 #15111f;
}

.player-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.player-unit,
.player-hint {
  color: var(--g-muted);
  font-weight: 500;
}

.player-stages .past {
  opacity: 0.55;
}

.player-stages .now {
  box-shadow: 3px 3px 0 var(--g-text);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.player .btn {
  color: #15111f;
  background: #fbf7ef;
  border-color: #15111f;
  box-shadow: 4px 4px 0 #15111f;
}

.player .btn-primary {
  background: var(--pop);
}

.player .btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  box-shadow: none;
}

.player-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  height: min(calc(100dvh - 48px), 900px);
  aspect-ratio: 9 / 19.5;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-chip {
  padding: 5px 11px;
  border: var(--b) solid #15111f;
  border-radius: 999px;
  background: var(--pop);
  color: #15111f;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-count {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
}

.player-x {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--b) solid #15111f;
  background: #fbf7ef;
  color: #15111f;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 3px 3px 0 #15111f;
  cursor: pointer;
}

.player-screen {
  position: relative;
  min-height: 0;
  border: 3px solid #15111f;
  border-radius: 40px;
  overflow: hidden;
  background: #000;
  box-shadow: 10px 10px 0 var(--g-a1);
}

.player-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-toast {
  position: absolute;
  left: 50%;
  top: 22%;
  padding: 10px 18px;
  border: var(--b) solid #15111f;
  border-radius: 999px;
  background: var(--pop);
  color: #15111f;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.9);
}

.player-toast.show {
  animation: toast 2.4s var(--ease) forwards;
}

@keyframes toast {
  12%,
  80% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -8px) scale(1);
  }
}

.player-end {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(11, 8, 22, 0);
  transition: background 0.5s var(--ease);
}

/* `display: grid` above would beat the hidden attribute and leave an invisible layer over the game. */
.player-end[hidden] {
  display: none;
}

.player.over .player-end {
  background: rgba(11, 8, 22, 0.72);
}

.end-card {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 24px 22px 22px;
  background: #fbf7ef;
  color: #15111f;
  border: var(--b) solid #15111f;
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--g-a1);
  transform: translateY(110%);
  transition: transform 0.6s var(--ease) 0.15s;
}

.player.over .end-card {
  transform: none;
}

.end-kicker {
  justify-self: start;
  padding: 5px 11px;
  border: var(--b) solid #15111f;
  border-radius: 999px;
  background: var(--g-a1);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.end-card h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.end-cleared {
  font-weight: 600;
}

.end-locked {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px dashed #15111f;
  border-radius: 16px;
  font-size: 0.95rem;
}

.end-pass {
  font-size: 0.85rem;
  color: #5b5470;
}

.end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.end-actions .btn {
  padding: 11px 16px;
  font-size: 0.8rem;
}

/* -- beta: smaller screens ---------------------------------------------------------- */

@media (max-width: 1000px) {
  .carts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .beta-head {
    grid-template-columns: 1fr;
  }

  .qr {
    display: none;
  }

  .pass {
    grid-template-columns: 1fr;
  }

  /* On a phone the game is the whole screen: a slim bar on top, the game below. */
  .player-in {
    display: block;
    padding: 0;
  }

  .player-side {
    display: none;
  }

  .player-stage {
    height: 100%;
    width: 100%;
    aspect-ratio: auto;
    gap: 0;
  }

  .player-bar {
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    background: #0b0816;
    color: #f6f2ff;
    border-bottom: var(--b) solid #15111f;
  }

  .player-x {
    width: 34px;
    height: 34px;
    box-shadow: none;
  }

  .player-screen {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .carts {
    /* a swipeable row of cartridges */
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--pad) * -1);
    padding: 4px var(--pad) 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .carts::-webkit-scrollbar {
    display: none;
  }

  .cart {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }

  .pass {
    padding: 18px 26px 16px;
  }

  .pass-main {
    grid-template-columns: auto 1fr;
  }

  .pass-count {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .pass-stamps {
    flex-wrap: wrap;
  }

  .stamp .icon {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beta-scan::before,
  .live,
  .stamp.fresh .icon,
  .player-toast.show {
    animation: none;
  }

  .end-card,
  .player-end,
  .pass-meter i {
    transition: none;
  }
}
