@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0f17;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf5;
  --muted: #95a0b5;
  --faint: #616c82;

  --green: #3ccf8e;
  --red: #ff6b6b;
  --amber: #f4b84a;
  --violet: #a78bfa;
  --blue: #5aa9ff;
  --orange: #f0884b;
  --brand: #3ccf8e;

  --radius: 18px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* soft colour wash and the promo's dot grid behind the top of the page */
.backdrop {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1100px;
  pointer-events: none;
  background:
    radial-gradient(640px 380px at 50% 4%, color-mix(in srgb, var(--green) 15%, transparent), transparent 70%),
    radial-gradient(560px 360px at 16% 34%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 70%),
    radial-gradient(560px 360px at 86% 30%, color-mix(in srgb, var(--blue) 11%, transparent), transparent 70%);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1.2px, transparent 1.4px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 22%, #000 15%, transparent 75%);
          mask-image: radial-gradient(ellipse 55% 50% at 50% 22%, #000 15%, transparent 75%);
}

header, main, footer { position: relative; }

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.brand .dim { color: var(--faint); font-weight: 500; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: none; stroke: var(--text); stroke-width: 1.8; }
.brand-mark .led { fill: var(--brand); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.gh-link) {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 550;
  transition: color 0.2s, background 0.2s;
}
.nav > a:not(.gh-link):hover { color: var(--text); background: var(--card); }

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.gh-link svg { width: 16px; height: 16px; fill: currentColor; }
.gh-link:hover { color: var(--text); border-color: var(--line-strong); background: var(--card); }

/* ---------- hero ---------- */
.hero { padding-top: 52px; padding-bottom: 8px; text-align: center; }

.hero-mark { width: 84px; height: 84px; margin: 0 auto 26px; overflow: visible; }
.hero-mark rect { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 1 1; }
.hero-mark .led { fill: var(--green); filter: drop-shadow(0 0 2.5px var(--green)); transform-box: fill-box; transform-origin: center; }

h1 {
  margin: 0;
  font-size: clamp(42px, 7.4vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 760;
}
h1 .accent {
  background: linear-gradient(100deg, var(--green), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 660px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}
/* a highlighter stroke, like the marked words on test9 */
.lede mark {
  color: var(--text);
  background: linear-gradient(color-mix(in srgb, var(--amber) 30%, transparent), color-mix(in srgb, var(--amber) 30%, transparent)) no-repeat 0 88% / 100% 42%;
}

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--c) 30%, transparent);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 18%, transparent); }

/* ---------- the tour ---------- */
.tour { padding-top: 72px; padding-bottom: 12px; }

.rule {
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--line-strong);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 30px 40px;
  align-items: center;
}
.tour-player { position: relative; }
.tour-player::before {
  content: "";
  position: absolute;
  inset: 4% 2% -4%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 20%, transparent), transparent);
}

/* a browser window: used for the tour and for the family site */
.window {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #10131a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}
.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: #191c23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar .url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 16px;
  border-radius: 7px;
  background: #262a33;
  color: #b8bfcc;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}
.window-bar .url svg { width: 9px; height: 10px; fill: #8a93a5; }
.window > img { width: 100%; }

.screen16 { position: relative; aspect-ratio: 16 / 9; background: var(--bg); }
.screen16 iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }

.tour-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}
.tour-controls a { transition: color 0.2s; }
.tour-controls a:hover { color: var(--text); }
.tour-toggle {
  margin-left: -10px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.tour-toggle:hover { color: var(--text); background: var(--card); }
.tour-toggle > span { display: inline-flex; align-items: center; gap: 8px; }
.tour-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.tour-toggle > .t-play,
.tour-toggle.paused > .t-pause { display: none; }
.tour-toggle.paused > .t-play { display: inline-flex; }

/* the steps beside the player: the current scene is lit, the rest wait their turn */
.steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.steps a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 12px 14px 12px 10px;
  border-radius: 16px;
  transition: background 0.3s, opacity 0.3s;
}
.steps a:hover { background: var(--card); }
.st-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 50%;
  color: var(--c);
  font-size: 15px;
  font-weight: 750;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.st-body b { display: block; font-size: 17.5px; font-weight: 680; letter-spacing: -0.01em; line-height: 1.3; }
.st-body > span { display: block; margin-top: 2px; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.st-bar { display: none; height: 3px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.st-bar::after { content: ""; display: block; height: 100%; background: var(--c); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.tour.live .st-bar { display: block; }
.tour.live .steps li:not(.on) a { opacity: 0.45; }
.tour.live .steps li:not(.on) a:hover { opacity: 0.85; }
.tour.live .steps li.on a { background: var(--card); }
.tour.live .steps li.on .st-n { background: var(--c); border-color: var(--c); color: var(--bg); }

/* ---------- chapters ---------- */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 40px 72px;
  align-items: center;
  padding-top: 104px;
  padding-bottom: 104px;
  scroll-margin-top: 0;
}
.chapter.flip .ch-visual { order: -1; }
/* the glows, radar and cards may spill sideways; keep them from widening the page on phones */
.chapter { overflow-x: clip; }
.chapter + .chapter { border-top: 1px solid var(--line); }

.ch-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ch-n {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.ch-title {
  margin: 18px 0 0;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.ch-title.with-icon { display: flex; align-items: center; gap: 18px; }
.ch-title.with-icon img { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.7); }
.ch-lead { margin: 18px 0 0; font-size: 22px; font-weight: 620; letter-spacing: -0.015em; line-height: 1.35; }
.copy { max-width: 540px; margin: 16px 0 0; color: var(--muted); font-size: 17px; }
.copy.note { color: var(--faint); font-size: 15px; }
.ch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.host { color: var(--faint); font-family: var(--mono); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--card-hover); opacity: 1; }
.btn-sm { padding: 7px 15px; font-size: 14px; }
.store-badge { display: inline-flex; transition: transform 0.2s ease, opacity 0.2s ease; }
.store-badge img { width: auto; height: 44px; }
.store-badge:hover { transform: translateY(-1px); opacity: 0.9; }

.ch-visual { position: relative; }
.ch-visual::before {
  content: "";
  position: absolute;
  inset: -14% -10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent);
}

/* phones (Deviatak, the games) */
.phone {
  position: absolute;
  padding: 8px;
  border-radius: 15% / 7%;
  background: #121419;
  box-shadow: 0 0 0 1.5px #2d3139, 0 0 0 3px #0a0b0e, 0 40px 70px -24px rgba(0, 0, 0, 0.85);
}
.phone .screen { position: relative; width: 100%; aspect-ratio: 760 / 1652; overflow: hidden; border-radius: 12.5% / 5.8%; background: #000; }
/* web screenshots sit under a drawn status bar, so their screen is a little taller */
.phone.web .screen { aspect-ratio: 680 / 1568; }
.phone .screen img { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.phone .island { position: absolute; z-index: 5; top: 1.6%; left: 50%; width: 31%; height: 3.4%; margin-left: -15.5%; border-radius: 99px; background: #000; }
.phone.web .screen img { top: 6.2%; }
.statusbar {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto 0;
  height: 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9% 0 11%;
  background: var(--sb);
  color: #fff;
  font-size: 10.5px;
  font-weight: 650;
}
.statusbar svg { width: 40px; height: 9px; }

/* 01 · the family site in a window, tilted toward the text */
.window.tilt { transform: perspective(1600px) rotateY(-10deg) rotateX(3deg); transition: transform 0.7s var(--ease); }
.ch-visual:hover .window.tilt { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg); }
.crest { position: absolute; left: -22px; top: -42px; width: auto; height: 104px; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.55)); }
.years { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 0; color: var(--amber); }
.years b { font-size: 36px; font-weight: 760; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.years span { color: var(--faint); font-size: 24px; }
.years small { margin-left: 4px; color: var(--muted); font-size: 14px; }

/* 02 · Car Back: phone and watch over the radar fan */
.devices { aspect-ratio: 520 / 540; }
.radar { position: absolute; left: 50%; bottom: -6%; width: 118%; transform: translateX(-50%); overflow: visible; }
.radar .arc { fill: none; stroke: rgba(255, 255, 255, 0.11); stroke-width: 2; }
.radar .ping { fill: none; stroke: color-mix(in srgb, var(--red) 70%, transparent); stroke-width: 3; opacity: 0; transform-box: view-box; transform-origin: 300px 520px; }
.dev-phone { position: absolute; left: 13%; top: 0; width: auto; height: 100%; transform: rotate(-4deg); }
.dev-watch { position: absolute; right: 3%; bottom: 5%; height: 58%; aspect-ratio: 734 / 986; transform: rotate(5deg); }
.dev-watch img { width: 100%; height: 100%; }
.tap {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 92%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--red) 90%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--red) 60%, transparent);
  opacity: 0;
}

/* 03 · Deviatak: two phones on ruled paper, with the sticky note */
.phones { aspect-ratio: 520 / 580; }
.paper {
  position: absolute;
  inset: -4% -8%;
  background:
    linear-gradient(to right, transparent 13%, rgba(255, 107, 107, 0.24) 13% calc(13% + 2px), transparent calc(13% + 2px)),
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(167, 139, 250, 0.14) 31px 32px);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 30%, transparent 80%);
}
.phones .phone { width: 44%; }
.p-front { left: 14%; top: 7%; transform: rotate(-5deg); z-index: 2; }
.p-back { right: 10%; top: 0; transform: rotate(7deg) scale(0.94); }
.sticky {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 2%;
  width: 34%;
  max-width: 172px;
  padding: 12px 16px 14px;
  border-radius: 3px 3px 14px 3px;
  background: linear-gradient(170deg, #ffe98a 0%, #fbd65a 100%);
  box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.6), inset 0 -10px 18px -12px rgba(150, 100, 0, 0.45);
  color: #1d2440;
  line-height: 1.1;
  transform: rotate(-8deg);
}
.sticky small { display: block; color: #6b5a1a; font-size: 12.5px; font-weight: 600; }
.sticky b { display: block; margin-top: 4px; font-size: clamp(24px, 3vw, 34px); font-weight: 820; letter-spacing: -0.03em; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.facts li {
  min-width: 128px;
  padding: 12px 16px 13px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
}
.facts b { display: block; color: var(--c); font-size: 30px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: 13.5px; }
/* test9's red rubber stamp */
.stamp {
  display: inline-block;
  padding: 5px 14px;
  border: 2.5px solid var(--red);
  border-radius: 9px;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}
.phones .stamp { position: absolute; z-index: 4; right: 3%; bottom: 3%; background: rgba(11, 15, 23, 0.55); }

/* 04 · games: two phones on felt, with Špic's own cards and some chips */
.felt { aspect-ratio: 540 / 560; }
.felt .table {
  position: absolute;
  inset: 10% -6% 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 42%, #23875a 0%, #156140 55%, #0d4129 100%);
  box-shadow: inset 0 0 0 12px #3a2417, inset 0 0 0 14px rgba(255, 255, 255, 0.1), inset 0 0 60px 14px rgba(0, 0, 0, 0.45), 0 40px 100px rgba(0, 0, 0, 0.6);
  opacity: 0.5;
}
.felt .phone { width: 41%; }
.p-left { left: 7%; top: 10%; transform: rotate(-6deg); z-index: 1; }
.p-right { right: 6%; top: 4%; transform: rotate(6deg); }
.hand { position: absolute; z-index: 3; font-size: clamp(44px, 6.4vw, 70px); }
.hand.trojica { left: -2%; bottom: 3%; }
.hand.blackjack { right: -3%; top: -2%; }
.pcard {
  position: absolute;
  width: 1em;
  height: 1.4em;
  border-radius: 0.1em;
  color: var(--suit);
  line-height: 1;
  background: linear-gradient(160deg, #ffffff 0%, #f5f2e9 100%);
  box-shadow: 0 0.02em 0.05em rgba(0, 0, 0, 0.45), 0 0.12em 0.3em rgba(0, 0, 0, 0.45), inset 0 0 0 0.012em rgba(0, 0, 0, 0.2);
}
.pcard.court {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0) 40%, color-mix(in srgb, var(--suit) 9%, transparent) 100%),
    linear-gradient(160deg, #fffdf6 0%, #f4ead0 100%);
}
.pcard .idx { position: absolute; top: 0.07em; left: 0.07em; display: flex; flex-direction: column; align-items: center; gap: 0.025em; }
.pcard .idx b { font-size: 0.36em; font-weight: 800; letter-spacing: -0.06em; line-height: 0.9; }
.pcard svg { display: block; }
.pcard .idx svg { width: 0.23em; height: 0.23em; }
.pcard .pip { position: absolute; right: 0.08em; bottom: 0.09em; width: 0.56em; height: 0.56em; }
.pcard .pip svg { width: 100%; height: 100%; }
.pcard .crown { position: absolute; right: 0.17em; bottom: 0.6em; width: 0.38em; height: 0.2em; color: #c9962a; }
.s-S { --suit: #1c2433; }
.s-H { --suit: #d52a3b; }
.s-D { --suit: #1b6dd6; }
.trojica .pcard:nth-child(1) { left: 0; bottom: 0; transform: rotate(-17deg); }
.trojica .pcard:nth-child(2) { left: 0.62em; bottom: 0.1em; transform: rotate(-4deg); }
.trojica .pcard:nth-child(3) { left: 1.24em; bottom: 0.02em; transform: rotate(9deg); }
.trojica { width: 2.5em; height: 1.6em; }
.blackjack { width: 1.9em; height: 1.8em; }
.blackjack .pcard:nth-child(1) { right: 0.62em; top: 0; transform: rotate(10deg); }
.blackjack .pcard:nth-child(2) { right: 0; top: 0.28em; transform: rotate(23deg); }
.chipstack { position: absolute; z-index: 3; right: 1%; bottom: 7%; width: 17%; aspect-ratio: 1; }
.chipstack i {
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--cc) 0 33%, rgba(255, 255, 255, 0.9) 33.5% 36%, var(--cc) 36.5% 61%, transparent 61.5%),
    repeating-conic-gradient(#f4f1e8 0 11deg, var(--cc) 11deg 30deg);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35), 0 10px 22px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.chipstack i:nth-child(1) { bottom: 0; }
.chipstack i:nth-child(2) { bottom: 12%; }
.chipstack i:nth-child(3) { bottom: 24%; }

.games { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.games li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.games li > img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.6); }
.games b { display: block; font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.games li > div > span:not(.links) { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; }
.games .links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; font-size: 14.5px; }
.games .links a:not(.btn) { color: var(--muted); transition: color 0.2s; }
.games .links a:not(.btn):hover { color: var(--text); }

/* 05 · the server: a spec card, and the two private services */
.tiles { display: grid; gap: 12px; margin-top: 26px; }
.tile {
  --c: var(--brand);
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: var(--card-hover); }
.tile b { display: block; font-size: 18px; font-weight: 650; }
.tile-text > span { display: block; margin-top: 2px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  color: var(--c);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon svg .fill { fill: currentColor; stroke: none; }
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.tag.lock::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Cpath d='M2 4V3a2.5 2.5 0 0 1 5 0v1h.5A1.5 1.5 0 0 1 9 5.5v3A1.5 1.5 0 0 1 7.5 10h-6A1.5 1.5 0 0 1 0 8.5v-3A1.5 1.5 0 0 1 1.5 4H2zm1.2 0h2.6V3a1.3 1.3 0 0 0-2.6 0v1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Cpath d='M2 4V3a2.5 2.5 0 0 1 5 0v1h.5A1.5 1.5 0 0 1 9 5.5v3A1.5 1.5 0 0 1 7.5 10h-6A1.5 1.5 0 0 1 0 8.5v-3A1.5 1.5 0 0 1 1.5 4H2zm1.2 0h2.6V3a1.3 1.3 0 0 0-2.6 0v1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rig {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8);
}
.rig-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.rig-mark {
  width: 56px;
  height: 56px;
  padding: 10px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}
.rig-mark rect { fill: none; stroke: var(--text); stroke-width: 2; }
.rig-mark circle { fill: var(--green); }
.rig-head b { display: block; font-size: 18px; font-weight: 680; }
.rig-head div > span { color: var(--muted); font-size: 14px; }
.online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.hw-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.hw-stats > div {
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}
.hw-stats b { display: block; font-size: 26px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hw-stats > div > span { color: var(--muted); font-size: 13px; }

.hw { margin-top: 18px; }
.hw summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hw summary::-webkit-details-marker { display: none; }
.hw summary:hover, .hw[open] summary { color: var(--text); border-color: var(--line-strong); background: var(--card-hover); }
.hw summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.hw summary svg { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hw .chev { margin-left: auto; margin-top: -6px; color: var(--faint); transition: transform 0.25s ease; }
.hw[open] .chev { transform: rotate(180deg) translateY(-6px); }
.hw-list { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.hw-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.2s;
}
.hw-list li:last-child a { border-bottom: 0; }
.hw-list a:hover { background: var(--card-hover); }
.hw-list .k { flex: 0 0 58px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.hw-list .part { flex: 1; min-width: 0; }
.hw-list .part b { display: block; font-size: 14.5px; font-weight: 600; }
.hw-list .part small { display: block; color: var(--muted); font-size: 13px; }
.hw-list .shop { color: var(--faint); font-size: 12.5px; white-space: nowrap; transition: color 0.2s; }
.hw-list a:hover .shop { color: var(--brand); }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 26px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13.5px;
}
.foot a { transition: color 0.2s; }
.foot a:hover { color: var(--text); }

/* ---------- motion (only when the reader is fine with it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark rect { animation: draw 1.2s 0.1s cubic-bezier(0.6, 0, 0.3, 1) both; }
  .hero-mark rect:nth-of-type(2) { animation-delay: 0.28s; }
  .hero-mark .led { animation: led-on 0.5s 1.25s cubic-bezier(0.3, 1.6, 0.6, 1) both, blink 4s 2.2s infinite; }
  .hero-mark .led:nth-of-type(2) { animation-delay: 1.4s, 3.1s; }
  .lede mark { animation: sweep 0.9s 0.6s ease-out both; }

  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .chapter .ch-visual.reveal { transition-delay: 0.12s; }
  .js .reveal.in .stamp { animation: thump 0.5s 0.6s cubic-bezier(0.3, 1.6, 0.6, 1) both; }
  .js .reveal.in .sticky { animation: drop 0.55s 0.5s ease-out both; }

  .radar .ping { animation: sonar 2.6s linear infinite; }
  .radar .ping.p2 { animation-delay: 1.3s; }
  .dev-phone { animation: float-a 7s ease-in-out infinite; }
  .dev-watch { animation: float-b 6s 0.8s ease-in-out infinite; }
  .tap { animation: tap 3.6s 1s ease-out infinite; }
  .p-front { animation: float-a 7.5s ease-in-out infinite; }
  .hand { animation: bob 6s ease-in-out infinite; }
  .hand.blackjack { animation-delay: 1.5s; }
  .rig-mark circle { animation: blink 1.9s infinite; }
  .rig-mark circle + circle { animation-duration: 2.7s; animation-delay: 0.6s; }
  .online i { animation: pulse 2.4s ease-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes led-on { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes blink { 0%, 82%, 100% { opacity: 1; } 86% { opacity: 0.25; } 90% { opacity: 1; } 94% { opacity: 0.35; } }
@keyframes sweep { from { background-size: 0 42%; } to { background-size: 100% 42%; } }
@keyframes thump { from { opacity: 0; transform: rotate(-6deg) scale(1.9); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@keyframes drop { from { opacity: 0; transform: rotate(-8deg) translateY(-14px); } to { opacity: 1; transform: rotate(-8deg) translateY(0); } }
@keyframes sonar { from { transform: scale(0); opacity: 0.9; } to { transform: scale(1); opacity: 0; } }
@keyframes float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes float-b { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes tap {
  0% { opacity: 0.95; transform: scale(0.6); }
  28%, 100% { opacity: 0; transform: scale(1.5); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 920px) {
  .tour-grid { grid-template-columns: 1fr; }
  .chapter { grid-template-columns: 1fr; gap: 44px; padding-top: 72px; padding-bottom: 72px; }
  .chapter.flip .ch-visual { order: 0; }
  .ch-visual { width: 100%; max-width: 540px; justify-self: center; }
  .window.tilt { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); }
  #family .ch-visual { margin-top: 36px; }  /* room for the crest above the window */
}

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav > a:not(.gh-link) { display: none; }
  .gh-link span { display: none; }
  .gh-link { padding: 8px; }
  .hero { padding-top: 32px; }
  .hero-mark { width: 64px; height: 64px; margin-bottom: 20px; }
  .tour { padding-top: 56px; }
  .ch-lead { font-size: 20px; }
  .ch-title.with-icon { gap: 14px; }
  .ch-title.with-icon img { width: 52px; height: 52px; border-radius: 12px; }
  .crest { left: -6px; top: -34px; height: 78px; }
  .tile { grid-template-columns: 44px 1fr; }
  .tile .tag { grid-column: 2; justify-self: start; }
  .rig { padding: 18px; }
  .online { margin-left: 0; }
  .hw-list .k { flex-basis: 48px; font-size: 10px; }
  .statusbar { font-size: 8px; }
  .phone { padding: 6px; }
  .statusbar svg { width: 30px; height: 7px; }
}
