/* freeplayinc.org
   Fonts are served from the site: Anybody, Instrument Sans and Doto (SIL Open Font License). */

@font-face {
  font-family: 'Anybody';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  src: url('/fonts/anybody-latin-wdth-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url('/fonts/instrument-sans-latin-wdth-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Doto';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/doto-latin-full-normal.woff2') format('woff2');
}

:root {
  --ink: #0d0c11;
  --paper: #f4eedf;
  --card: #fffaf0;
  --gold: #ffc81e;
  --gold-deep: #f0b000;
  --red: #ff4127;
  --blue: #2438f5;
  --display: 'Anybody', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --dot: 'Doto', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --gut: clamp(18px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1rem, .95rem + .25vw, 1.15rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--gold); }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--gold); padding: 12px 18px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gut), 1320px); margin-inline: auto; }

/* Type */
.readout {
  font-family: var(--dot);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(.95rem, .9rem + .2vw, 1.1rem);
  line-height: 1.2;
}
.eyebrow {
  font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .08em;
  font-size: clamp(1rem, .95rem + .3vw, 1.25rem);
  display: inline-flex; align-items: center; gap: .6em; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ''; width: .7em; height: .7em; background: currentColor; border-radius: 50%; }
.h2 {
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 112%;
  font-size: clamp(2.4rem, 1.2rem + 5.4vw, 6rem);
  line-height: .95;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.h2--xl { font-size: clamp(2.7rem, 1rem + 7.6vw, 8.6rem); font-stretch: 105%; line-height: .9; }
.h3 {
  font-family: var(--display); font-weight: 850; font-stretch: 110%;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.4rem); line-height: .95; letter-spacing: -.02em;
}
.big { font-size: clamp(1.2rem, 1.02rem + .8vw, 1.7rem); line-height: 1.35; font-weight: 500; text-wrap: pretty; }
.fine { font-size: .9rem; opacity: .75; }
.cap { font-size: .9rem; line-height: 1.4; margin-top: 16px; opacity: .8; max-width: 46ch; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.btn {
  --sh: 4px;
  display: inline-flex; align-items: center; gap: .5em;
  padding: .72em 1.25em;
  border: 2.5px solid currentColor; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none;
  background: transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform .18s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); --sh: 6px; background: color-mix(in srgb, currentColor 14%, transparent); }
.btn--solid:hover { background: var(--btn-bg, var(--ink)); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translate(3px, 3px); --sh: 1px; }
.btn--solid { background: var(--btn-bg, var(--ink)); color: var(--btn-fg, var(--gold)); border-color: var(--btn-bd, var(--ink)); box-shadow: var(--sh) var(--sh) 0 var(--btn-sh, rgba(13, 12, 17, .35)); }
.link { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link svg { width: 1.1em; height: 1.1em; transition: transform .18s var(--ease); }
.link:hover svg { transform: translateX(4px); }

/* Reveal on scroll (only when the script is running) */
.js [data-rv] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rv].is-in { opacity: 1; transform: none; }

/* Header */
.head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut);
  color: var(--ink);
  pointer-events: none;
  transition: color .3s, transform .45s var(--ease);
}
.head.is-away:not(.is-open) { transform: translateY(-110%); }
.head > * { pointer-events: auto; }
.head[data-tone="light"] { color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 850; font-stretch: 115%; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.brand__coin { width: 34px; height: 34px; transition: transform .6s var(--ease); }
.brand:hover .brand__coin { transform: rotate(360deg); }
.nav { display: flex; gap: clamp(12px, 2vw, 30px); }
.nav a { text-decoration: none; font-weight: 650; font-size: .95rem; position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover::after, .nav a.is-on::after { transform: scaleX(1); }
.head__tools { display: flex; gap: 8px; }
.chip {
  font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem;
  padding: 7px 12px; border: 2px solid currentColor; border-radius: 999px; background: transparent; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: currentColor; }
.chip[aria-pressed="true"]::first-line { color: var(--gold); }
.chip--menu { display: none; }

@media (max-width: 900px) {
  .chip--menu { display: inline-block; }
  .js .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 4px;
    padding: 90px var(--gut) 40px;
    background: var(--ink); color: var(--gold);
    visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s;
  }
  .js .nav a { font-family: var(--display); font-weight: 850; font-stretch: 112%; font-size: clamp(2.2rem, 11vw, 4rem); line-height: 1.1; letter-spacing: -.02em; }
  .js .nav a::after { display: none; }
  .js .head.is-open { color: var(--gold); }
  .js .head.is-open .nav { visibility: visible; opacity: 1; }
  html:not(.js) .nav { display: none; }
}
@media (max-width: 480px) {
  #sound { display: none; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--gold);
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding: clamp(84px, 11vh, 120px) var(--gut) clamp(28px, 5vh, 56px);
}
.hero__dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__in { position: relative; flex: 1; display: flex; flex-direction: column; width: min(100%, 1560px); margin-inline: auto; }
.hero__est { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.blink { animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.mega {
  font-family: var(--display);
  font-weight: 900;
  font-size: 23.5vw; /* the script refines this so each line fills the row */
  line-height: .78;
  letter-spacing: -.02em;
  text-transform: uppercase;
  margin: clamp(10px, 2.2vh, 28px) 0 clamp(18px, 3.5vh, 44px);
  user-select: none;
  -webkit-user-select: none;
}
.mega__line { display: flex; justify-content: center; white-space: nowrap; }
.mega__line + .mega__line { margin-top: .02em; }
.mega .l {
  display: inline-block;
  font-variation-settings: 'wdth' var(--wd, 122), 'wght' var(--wg, 900);
  will-change: font-variation-settings;
}
.js .mega .l { transform: translateY(105%); opacity: 0; }
.js .mega.is-in .l { transform: none; opacity: 1; transition: transform 1s var(--ease), opacity .4s; transition-delay: calc(var(--i) * 55ms); }
.js .mega__line { overflow: hidden; padding-block: .04em; margin-block: -.04em; }

.hero__row { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.hero__lede { font-size: clamp(1.15rem, 1rem + .9vw, 1.75rem); line-height: 1.32; font-weight: 550; max-width: 30em; margin-bottom: 1.4rem; text-wrap: pretty; }

/* Coin machine */
.arcade { position: relative; justify-self: end; display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 40px); padding-left: 110px; min-height: 190px; }
.machine {
  position: relative;
  width: min(340px, 78vw);
  background: var(--ink); color: var(--gold);
  border-radius: 22px;
  padding: 16px 18px 14px;
  box-shadow: 8px 8px 0 rgba(13, 12, 17, .28);
}
.machine__sign { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; }
.machine__old { color: #7a7482; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.machine__new { color: var(--gold); text-shadow: 0 0 14px rgba(255, 200, 30, .8); animation: blink 1.4s steps(1) infinite; }
.machine__plate {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; align-items: stretch;
  margin: 12px 0;
}
.slot, .tray { background: #25222d; border-radius: 12px; height: 84px; position: relative; box-shadow: inset 0 0 0 2px #3a3644; }
.slot i { position: absolute; left: 50%; top: 14px; bottom: 14px; width: 9px; margin-left: -4.5px; border-radius: 5px; background: #000; box-shadow: 0 0 0 2px #5a5466, 0 0 0 5px #25222d; transition: box-shadow .2s; }
.arcade.is-near .slot i { box-shadow: 0 0 0 2px var(--gold), 0 0 18px 4px rgba(255, 200, 30, .65); }
.arcade.is-busy .slot i { box-shadow: 0 0 0 2px var(--red), 0 0 18px 4px rgba(255, 65, 39, .65); }
.tray { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; overflow: hidden; }
.tray::before { content: ''; position: absolute; left: 14px; right: 14px; top: 14px; height: 30px; border-radius: 6px 6px 18px 18px; background: #000; box-shadow: inset 0 0 0 2px #3a3644; }
.tray span { font-size: .72rem; color: #7a7482; }
.machine__msg { min-height: 2.5em; font-size: .92rem; color: #fff; display: flex; align-items: center; }
.machine__msg::before { content: '>'; margin-right: .5em; color: var(--gold); }

.coin {
  position: absolute; left: 0; bottom: 26px;
  width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%; background: none;
  cursor: grab; touch-action: none; z-index: 5;
  filter: drop-shadow(5px 6px 0 rgba(13, 12, 17, .3));
  transition: filter .2s;
}
.coin svg { width: 100%; height: 100%; }
.coin.is-held { cursor: grabbing; filter: drop-shadow(10px 14px 0 rgba(13, 12, 17, .22)); }
.coin::after {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 2.5px dashed var(--ink); opacity: .55;
  animation: spin 14s linear infinite;
}
.coin.is-held::after, .arcade.is-busy .coin::after { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .hero__row { grid-template-columns: 1fr; align-items: start; }
  .arcade { justify-self: start; padding-left: 104px; }
}
@media (max-width: 480px) {
  .arcade { padding-left: 92px; }
  .coin { width: 72px; height: 72px; }
  .machine { width: min(250px, 100%); padding: 14px; }
  .slot, .tray { height: 70px; }
}

/* Ticker */
.ticker { background: var(--ink); color: var(--gold); overflow: hidden; padding: clamp(14px, 2.2vw, 26px) 0; position: relative; z-index: 2; }
.ticker__track { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); width: max-content; animation: tick 38s linear infinite; will-change: transform; }
.ticker span { font-family: var(--display); font-weight: 850; font-stretch: 135%; text-transform: uppercase; font-size: clamp(1.3rem, 1rem + 2vw, 2.6rem); line-height: 1; white-space: nowrap; }
.ticker i { width: clamp(16px, 2vw, 28px); aspect-ratio: 1; border-radius: 50%; background: var(--red); flex: none; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Story */
.story { background: var(--paper); padding: clamp(80px, 12vw, 170px) 0; }
.story__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.story__text > * + * { margin-top: 1.3rem; }
.story__text .h2 { margin-top: 0; margin-bottom: 2rem; }
.story__text p:not(.big):not(.eyebrow) { max-width: 36em; }
.tally { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 2.2rem !important; }
.tally li { border: 2.5px solid var(--ink); border-radius: 999px; padding: .35em 1em .35em .45em; font-weight: 700; display: inline-flex; align-items: center; gap: .55em; }
.tally b { font-family: var(--display); font-stretch: 120%; font-weight: 900; background: var(--ink); color: var(--gold); border-radius: 999px; min-width: 2em; height: 2em; display: grid; place-items: center; font-size: 1.05em; }

.scores { background: var(--ink); color: var(--gold); border-radius: 26px; padding: clamp(20px, 3vw, 38px); box-shadow: 10px 10px 0 rgba(13, 12, 17, .18); position: sticky; top: 90px; }
.scores__title { text-align: center; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); color: #fff; margin-bottom: 1rem; letter-spacing: .14em; }
.scores__list a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 3.2em 4.4em; gap: .6em; align-items: baseline; padding: .42em .5em; border-radius: 8px; text-decoration: none; transition: background .15s, color .15s; }
.scores__list a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores__list a span:nth-child(3) { opacity: .6; }
.scores__list time { text-align: right; white-space: nowrap; }
.scores__list a span:first-child { white-space: nowrap; }
.scores__list a:hover, .scores__list a:focus-visible { background: var(--gold); color: var(--ink); }
.scores__list li:nth-child(1) a { color: #fff; }
.scores__list li:nth-child(1) a:hover { color: var(--ink); }
.js .scores__list li { opacity: 0; transform: translateX(-14px); }
.js .scores.is-in .scores__list li { opacity: 1; transform: none; transition: opacity .3s, transform .4s var(--ease); transition-delay: calc(var(--i) * 90ms + 200ms); }
.scores__note { font-size: .82rem; color: #a59fad; margin-top: 1rem; text-align: center; }

@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; }
  .scores { position: static; }
}
@media (max-width: 480px) {
  .scores__list { font-size: .86rem; }
  .scores__list a { grid-template-columns: 2.9em minmax(0, 1fr) 4.4em; gap: .4em; padding-inline: .2em; }
  .scores__list a span:nth-child(3) { display: none; }
}

/* Chapters */
.chapter { padding: clamp(84px, 12vw, 180px) 0 clamp(60px, 8vw, 120px); }
.chapter__cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 80px); margin-top: clamp(28px, 4vw, 56px); align-items: start; }
.chapter__cols p:last-child { max-width: 34em; }
@media (max-width: 760px) { .chapter__cols { grid-template-columns: 1fr; } }

.chapter--games { background: var(--ink); color: var(--paper); padding-bottom: clamp(50px, 6vw, 90px); }
.chapter--games .eyebrow { color: var(--gold); }

/* Game stack */
.stack { background: var(--ink); position: relative; }
.game { position: sticky; top: 0; }
.game__card {
  position: relative;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  border-radius: clamp(22px, 3vw, 44px) clamp(22px, 3vw, 44px) 0 0;
  overflow: hidden;
  transform-origin: 50% 0;
  display: flex; align-items: center;
  will-change: transform;
}
.game__card::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.game__in {
  width: min(100% - 2 * var(--gut), 1400px); margin-inline: auto;
  padding: clamp(84px, 11vh, 120px) 0 clamp(48px, 8vh, 90px);
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 80px); align-items: center;
}
.game__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 1.4rem; opacity: .9; }
.game__flag { background: var(--accent); color: var(--on-accent, var(--ink)); padding: .3em .7em; border-radius: 999px; }
.game__name { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); }
.game__icon { width: clamp(56px, 6vw, 92px); border-radius: 22%; box-shadow: 4px 4px 0 rgba(0, 0, 0, .28); flex: none; }
.game h3 {
  font-family: var(--display); font-weight: 900; font-stretch: 100%;
  font-size: clamp(2.9rem, 1.2rem + 6.2vw, 7.2rem);
  line-height: .86; letter-spacing: -.03em;
  transition: font-stretch 1.2s var(--ease);
}
.js .game h3 { font-stretch: 60%; }
.js .game.is-seen h3 { font-stretch: 100%; }
.tag { display: inline-block; margin-top: 1.2rem; font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; color: var(--accent-text, var(--accent)); }
.game__lede { font-size: clamp(1.1rem, 1rem + .55vw, 1.42rem); line-height: 1.38; font-weight: 500; margin-top: 1rem; max-width: 31em; text-wrap: pretty; }
.feats { margin: 1.3rem 0 1.7rem; display: grid; gap: .5rem; }
.feats li { position: relative; padding-left: 1.5em; max-width: 34em; }
.feats li::before { content: ''; position: absolute; left: 0; top: .5em; width: .62em; height: .62em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--fg); }
.game .btn--solid { --btn-bg: var(--accent); --btn-fg: var(--on-accent, var(--ink)); --btn-bd: var(--fg); --btn-sh: var(--fg); }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 0; padding-inline: 4%; }
.shot {
  --r: 0deg; --x: 0%; --s: 1;
  border: 3px solid var(--ink); border-radius: clamp(14px, 1.8vw, 26px); overflow: hidden; background: var(--ink);
  box-shadow: 9px 11px 0 rgba(0, 0, 0, .3);
  transform: translate3d(var(--x), calc(var(--py, 0) * 1px), 0) rotate(var(--r)) scale(var(--s));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  position: relative;
}
.shot img { width: 100%; }
.shots:not(.shots--land):not(.shots--two) { padding-inline: 9%; }
.shots:not(.shots--land):not(.shots--two) .shot { width: 132%; margin-left: -16%; }
.shots:not(.shots--land):not(.shots--two) .shot:nth-child(1) { --r: -6deg; --x: -3%; z-index: 1; }
.shots:not(.shots--land):not(.shots--two) .shot:nth-child(2) { --s: 1.14; z-index: 2; }
.shots:not(.shots--land):not(.shots--two) .shot:nth-child(3) { --r: 6deg; --x: 3%; z-index: 1; }
@media (hover: hover) {
  .shots .shot:hover { --r: 0deg !important; --s: 1.2 !important; z-index: 4 !important; box-shadow: 16px 20px 0 rgba(0, 0, 0, .3); }
  .shots--land .shot:hover { --s: 1.06 !important; }
}
.shots--land { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); padding: 0; }
.shots--land .shot:nth-child(1) { grid-column: 1 / -1; --r: -1.2deg; }
.shots--land .shot:nth-child(2) { --r: 2deg; }
.shots--land .shot:nth-child(3) { --r: -1.5deg; }
.shots--land .shot:nth-child(4) { --r: 1.5deg; }
.shots--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); max-width: 520px; padding: 0; }
.shots--two .shot:nth-child(1) { --r: -3deg; }
.shots--two .shot:nth-child(2) { --r: 3deg; margin-top: 12%; }

.game--updraft { --bg: #bcd4f2; --fg: #2c2740; --accent: #e9463b; --on-accent: #fff; --accent-text: #b3261c; }
.game--updraft .game__card { background: linear-gradient(180deg, #a9c8f0 0%, #cfdcf3 45%, #f3d9e2 100%); }
.game--sumup { --bg: #15102e; --fg: #f6f3ff; --accent: #ff5d9e; --on-accent: #15102e; }
.game--sumup .shot, .game--forkline .shot, .game--woodlogic .shot { border-color: var(--fg); }
.game--sudoku { --bg: #fdeea4; --fg: #14121a; --accent: #2f6bff; --on-accent: #fff; --accent-text: #1c48c9; }
.game--woodlogic { --bg: #6b4424; --fg: #fdf0d8; --accent: #f3c14b; }
.game--woodlogic .game__card { background: repeating-linear-gradient(92deg, rgba(0, 0, 0, .05) 0 3px, transparent 3px 46px), linear-gradient(180deg, #7d5330, #5f3b1f); }
.game--forkline { --bg: #2a2352; --fg: #f8eed6; --accent: #f6b73c; }
.game--forkline .game__card { background: radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 34% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 22%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 77% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 91% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 38%, #fff 50%, transparent 51%), linear-gradient(180deg, #221c46, #3a2f6b); }

@media (max-width: 900px) {
  .game__in { grid-template-columns: 1fr; padding-top: 92px; }
  .shots { max-width: 560px; margin-inline: auto; width: 100%; }
  .shots--land { max-width: 640px; }
}

/* Apps */
.chapter--apps { background: var(--paper); border-radius: clamp(22px, 3vw, 44px) clamp(22px, 3vw, 44px) 0 0; position: relative; margin-top: calc(-1 * clamp(22px, 3vw, 44px)); }
.apps { margin-top: clamp(50px, 8vw, 120px); display: grid; gap: clamp(28px, 4vw, 56px); }
.app {
  background: var(--card); border: 3px solid var(--ink); border-radius: clamp(20px, 2.6vw, 36px);
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(22px, 4vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 76px); align-items: center;
}
.app--flip .app__info { order: 2; }
.app__info > * + * { margin-top: 1.1rem; }
.app__info .h3 { margin-top: .9rem; }
.status { display: inline-flex; align-items: center; gap: .55em; border: 2.5px solid var(--ink); border-radius: 999px; padding: .35em .85em; font-size: .9rem; }
.status::before { content: ''; width: .7em; height: .7em; border-radius: 50%; background: #b9b2a2; }
.status--live { background: var(--ink); color: var(--gold); }
.status--live::before { background: #39e58c; animation: blink 1.4s steps(1) infinite; }
.spec { border-top: 2.5px solid var(--ink); margin-top: 1.6rem !important; }
.spec div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 1em; padding: .7em 0; border-bottom: 1.5px solid rgba(13, 12, 17, .25); }
.spec dt { font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; padding-top: .15em; }
.app .btns { margin-top: 1.6rem; }
.app .btn--solid { --btn-fg: var(--gold); }
.app__visual { min-width: 0; }
.app__visual .shots--two { margin-inline: auto; }

.browser { border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 8px 8px 0 var(--gold-deep); }
.browser__bar, .win__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--ink); color: #cfc9d6; }
.browser__bar i, .win__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
.browser__bar i:nth-child(2), .win__bar i:nth-child(2) { background: var(--gold); }
.browser__bar i:nth-child(3), .win__bar i:nth-child(3) { background: #39e58c; }
.browser__bar span, .win__bar span { margin-left: 10px; font-family: var(--dot); font-weight: 900; font-size: .88rem; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser__view { position: relative; aspect-ratio: 1280 / 800; background: #eee; }
.browser__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .35s; }
.browser__view img.is-on { opacity: 1; }
.browser__tabs { display: flex; border-top: 3px solid var(--ink); }
.browser__tabs button { flex: 1; padding: 10px 6px; border: 0; border-right: 2px solid var(--ink); background: var(--card); cursor: pointer; font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; }
.browser__tabs button:last-child { border-right: 0; }
.browser__tabs button.is-on { background: var(--gold); }
.browser__tabs button:focus-visible { outline-offset: -4px; }

.flow { display: grid; justify-items: center; gap: 0; padding: clamp(18px, 3vw, 34px); border: 3px solid var(--ink); border-radius: 20px; background: var(--gold); box-shadow: 8px 8px 0 var(--ink); }
.flow__doc { position: relative; width: 150px; background: #fff; border: 3px solid var(--ink); border-radius: 8px; padding: 12px 14px 16px; display: grid; gap: 7px; transform: rotate(-3deg); }
.flow__doc b { font-family: var(--dot); font-weight: 900; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; }
.flow__doc i { height: 5px; border-radius: 3px; background: #c9c3b6; }
.flow__doc i:nth-child(3) { width: 70%; } .flow__doc i:nth-child(5) { width: 55%; }
.flow__snap { position: absolute; inset: -13px; --c: var(--ink); --l: 24px; --t: 5px;
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) left top / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--t) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--l) var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--t) var(--l) no-repeat;
  animation: snap 2.4s steps(1) infinite; }
@keyframes snap { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.flow__pipe { width: 4px; height: 46px; margin: 14px 0 0; background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 16px); background-size: 4px 16px; animation: pipe .7s linear infinite; }
.flow__pipe--fan { margin: 0; }
@keyframes pipe { to { background-position: 0 16px; } }
.flow__core { font-family: var(--display); font-weight: 900; font-stretch: 118%; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); line-height: 1; background: var(--ink); color: var(--gold); padding: .55em .9em; border-radius: 14px; }
.flow__out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; border-top: 4px dashed var(--ink); padding-top: 16px; }
.flow__out li { background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: .7em .8em; font-weight: 700; text-align: center; line-height: 1.2; animation: pop 4.8s infinite; animation-delay: calc(var(--i, 0) * 1.2s); }
.flow__out li:nth-child(2) { --i: 1; } .flow__out li:nth-child(3) { --i: 2; } .flow__out li:nth-child(4) { --i: 3; }
@keyframes pop { 0%, 22%, 100% { background: #fff; transform: none; } 6%, 14% { background: var(--ink); color: var(--gold); transform: translateY(-4px); } }

.typed { border: 3px solid var(--ink); border-radius: 20px; background: var(--ink); color: #fff; padding: clamp(18px, 3vw, 32px); box-shadow: 8px 8px 0 var(--gold-deep); }
.typed__label { color: var(--gold); margin-bottom: .9rem; }
.typed__line { background: #25222d; border-radius: 12px; padding: 14px 16px; font-size: clamp(1.02rem, .95rem + .5vw, 1.3rem); font-weight: 550; line-height: 1.4; min-height: 4.6em; }
.typed__caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--gold); animation: blink 1s steps(1) infinite; }
.typed__rows { display: grid; gap: 8px; margin-top: 14px; }
.typed__rows li { display: flex; align-items: center; gap: .7em; border: 2px solid #4b4657; border-radius: 10px; padding: .55em .8em; font-weight: 600; }
.typed__rows li::before { content: ''; width: .6em; height: .6em; border-radius: 50%; background: var(--gold); flex: none; }
.js .typed__rows li { opacity: .18; transition: opacity .3s, border-color .3s; }
.js .typed__rows li.is-on { opacity: 1; border-color: var(--gold); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--ink); }
  .app--flip .app__info { order: 0; }
  .spec div { grid-template-columns: 1fr; gap: .1em; }
}

/* Web */
.chapter--web { background: var(--blue); color: #fff; }
.chapter--web .eyebrow { color: var(--gold); }
.desk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 3vw, 44px); align-items: start; }
.desk__intro { padding-right: 8px; }
.desk__intro .big { margin-top: 1.4rem; }
.desk__hint { margin-top: 1rem; font-size: .95rem; opacity: .85; }
.win {
  --r: 0deg;
  background: var(--card); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 10px 10px 0 var(--ink);
  rotate: var(--r);
  translate: var(--dx, 0px) var(--dy, 0px);
  transition: rotate .4s var(--ease), box-shadow .3s var(--ease);
  position: relative;
}
.win:nth-child(2) { --r: 1.4deg; } .win:nth-child(3) { --r: -1.2deg; margin-top: 36px; }
.win:nth-child(4) { --r: -1.6deg; } .win:nth-child(5) { --r: 1deg; margin-top: -30px; } .win:nth-child(6) { --r: -.8deg; }
.win:hover, .win:focus-within, .win.is-held { --r: 0deg; box-shadow: 16px 16px 0 var(--ink); }
.win.is-held { z-index: 9; transition: none; }
.win__bar { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.win.is-held .win__bar { cursor: grabbing; }
.win__shot { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 3px solid var(--ink); background: #ddd; }
.win__shot img { position: absolute; left: 0; top: 0; width: 100%; transition: top 5s ease-in-out, transform 5s ease-in-out; }
@media (hover: hover) { .win:hover .win__shot img { top: 100%; transform: translateY(-100%); } }
.win__body { padding: 18px 20px 22px; display: grid; gap: .6rem; }
.win__body h3 { font-family: var(--display); font-weight: 850; font-stretch: 108%; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.75rem); line-height: 1.02; letter-spacing: -.01em; }
.win__body p { font-size: .98rem; line-height: 1.45; }
.win--here .win__bar { background: var(--gold); color: var(--ink); }
@media (max-width: 1080px) { .desk { grid-template-columns: repeat(2, minmax(0, 1fr)); } .win { margin-top: 0 !important; } }
@media (max-width: 680px) { .desk { grid-template-columns: 1fr; } .win { --r: 0deg !important; box-shadow: 6px 6px 0 var(--ink); } .desk__hint { display: none; } }

/* Rules */
.chapter--rules { background: var(--ink); color: var(--paper); }
.chapter--rules .eyebrow { color: var(--gold); }
.chapter--rules .big { margin-top: 1.6rem; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin: clamp(40px, 6vw, 90px) 0; }
.board li { min-width: 0; overflow: hidden; border: 2.5px solid #3a3644; border-radius: 20px; padding: clamp(14px, 2vw, 26px); display: grid; gap: .4rem; background: #15131b; }
.board__n { font-family: var(--display); font-weight: 900; font-stretch: 104%; font-size: clamp(3.2rem, 1.2rem + 5.4vw, 6.8rem); line-height: .86; color: var(--gold); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.board__k { font-weight: 650; line-height: 1.2; }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: rule; border-top: 2.5px solid var(--paper); }
.rules li { counter-increment: rule; padding: clamp(20px, 2.6vw, 36px) clamp(16px, 2vw, 30px) clamp(24px, 3vw, 44px) 0; border-bottom: 1.5px solid #3a3644; }
.rules li::before { content: '0' counter(rule); font-family: var(--dot); font-weight: 900; color: var(--gold); font-size: 1.1rem; letter-spacing: .08em; }
.rules h3 { font-family: var(--display); font-weight: 850; font-stretch: 108%; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.02; margin: .7rem 0 .6rem; letter-spacing: -.01em; }
.rules p { max-width: 26em; color: #d8d2c6; }
@media (max-width: 980px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board li:last-child { grid-column: 1 / -1; } .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

/* Support and footer */
.support { background: var(--gold); padding: clamp(84px, 12vw, 180px) 0 clamp(50px, 7vw, 100px); border-radius: clamp(22px, 3vw, 44px) clamp(22px, 3vw, 44px) 0 0; margin-top: calc(-1 * clamp(22px, 3vw, 44px)); position: relative; }
.support .big { max-width: 32em; margin: 1.8rem 0 2rem; }
.foot { background: var(--gold); color: var(--ink); overflow: hidden; padding-top: clamp(30px, 5vw, 70px); }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); gap: clamp(22px, 4vw, 60px); border-top: 3px solid var(--ink); padding-top: clamp(24px, 3vw, 40px); }
.foot__h { font-family: var(--dot); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; margin-bottom: .8rem; }
.foot li { margin: .3rem 0; }
.foot a:not(.btn) { text-decoration: none; font-weight: 600; }
.foot a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot__fine { display: grid; gap: .35rem; justify-items: start; font-size: .95rem; }
.foot__fine .btn { margin-top: .9rem; }
.foot__mega { font-family: var(--display); font-weight: 900; font-stretch: 150%; text-transform: uppercase; font-size: 11vw; line-height: .74; letter-spacing: -.03em; white-space: nowrap; text-align: center; margin-top: clamp(30px, 5vw, 70px); margin-bottom: -.07em; }
@media (max-width: 820px) { .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot__fine { grid-column: 1 / -1; } }

/* Calm mode */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-rv], .js .mega .l, .js .scores__list li, .js .typed__rows li { opacity: 1 !important; transform: none !important; }
  .js .game h3 { font-stretch: 100%; }
  .game { position: static; }
}

/* Doto is light at small sizes, so its small labels get a hairline stroke. */
.readout, .eyebrow, .tag, .chip, .spec dt, .foot__h, .browser__bar span, .win__bar span, .browser__tabs button, .rules li::before, .flow__doc b, .status { -webkit-text-stroke: .45px currentColor; }
