/* neurazzo.app: the candy look of the app (lib/ui/tokens.dart). */
:root {
  --bg: #f6f3ff;
  --ink: #2a1570;
  --muted: #6a6391;
  --line: #ddd5f7;
  --tint: #efe9ff;
  --lilac: #cbbbff;
  --violet: #6c3bff;
  --violet-deep: #4a1fd1;
  --violet-text: #5a2be8;
  --white: #fff;
  --yellow: #ffc93c;
  --radius: 20px;
  /* Roles that change with the theme. */
  --surface: #fff;        /* cards */
  --mix: #fff;            /* what category colours are tinted toward */
  --deep: #2a1570;        /* dark bands and footer */
  --bezel: #2a1570;       /* phone frames */
  --accent: #6c3bff;      /* big coloured text */
  --ink-soft: #3d2f7a;    /* long legal text */
  --logo-ink: #2a1570;
  --edge-text: .8;        /* brightness of category-coloured text */
  --net: 108, 59, 255;    /* hero neurons (rgb) */
  --net-a: 1;             /* and how strong they show */
  color-scheme: light;
}
/* Dark: the system's choice, unless the visitor picked one (site.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140f2e; --ink: #f1edff; --muted: #aaa1d3; --line: #2f2763;
    --tint: #1b1541; --lilac: #3b3080; --violet: #7c4dff; --violet-text: #b9a3ff;
    --surface: #221b4c; --mix: #1d1645; --deep: #0b0820; --bezel: #05030f;
    --accent: #a98bff; --ink-soft: #d8d1f6; --logo-ink: #f1edff; --edge-text: 1.55;
    --net: 170, 145, 255; --net-a: 1.5; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140f2e; --ink: #f1edff; --muted: #aaa1d3; --line: #2f2763;
  --tint: #1b1541; --lilac: #3b3080; --violet: #7c4dff; --violet-text: #b9a3ff;
  --surface: #221b4c; --mix: #1d1645; --deep: #0b0820; --bezel: #05030f;
  --accent: #a98bff; --ink-soft: #d8d1f6; --logo-ink: #f1edff; --edge-text: 1.55;
  --net: 170, 145, 255; --net-a: 1.5; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 700 17px/1.55 Nunito, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--violet-text); }
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: 19px; }
p { margin: 0 0 .8em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { flex: none; }
.brand svg { height: 26px; width: auto; display: block; }
.show-s { display: none; }
.brand svg [fill="#2A1570" i] { fill: var(--logo-ink); }
/* Theme switch: a sun or a moon, whichever you would switch to. */
.theme {
  width: 38px; height: 38px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; padding: 0;
  display: grid; place-items: center; flex: none;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.theme:hover { transform: rotate(-20deg) scale(1.08); }
.theme svg { width: 20px; height: 20px; }
.theme .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
/* The new theme spreads as a circle from the switch (site.js). */
.theming::view-transition-old(root), .theming::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theming .top { view-transition-name: none; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: var(--tint); }
.nav .lang { border: 2px solid var(--line); background: var(--surface); }
.nav .nav-play {
  background: var(--yellow); color: #3b2300; font-weight: 900;
  box-shadow: 0 3px 0 #d99a00;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .25s, scale .35s cubic-bezier(.34, 1.56, .64, 1);
}
/* While a "play in the browser" button is on screen, the header one steps aside. */
.nav .nav-play.away { opacity: 0; scale: .6; pointer-events: none; visibility: hidden; transition-property: transform, opacity, scale, visibility; }
.nav .nav-play:hover { background: var(--yellow); transform: translateY(-2px) rotate(-2deg); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; color: var(--white);
  background: var(--violet); font-weight: 900; font-size: 17px;
  text-transform: uppercase; letter-spacing: .03em;
  padding: 15px 26px; border-radius: 14px;
  box-shadow: 0 5px 0 var(--violet-deep);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--violet-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--violet-deep); }

/* Cards */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line);
  padding: 22px;
}
.card p { color: var(--muted); font-weight: 700; margin: 0; }

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.kicker {
  display: inline-block; background: var(--tint); color: var(--violet-text);
  font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 span { color: var(--violet); }
.lead { font-size: 19px; color: var(--muted); max-width: 40em; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin: 24px 0; }
.soon { color: var(--muted); font-size: 15px; }
.stats { list-style: none; display: flex; gap: 28px; padding: 0; margin: 8px 0 0; flex-wrap: wrap; }
.stats b { display: block; font-size: 30px; font-weight: 900; color: var(--accent); line-height: 1; }
.stats span { color: var(--muted); font-size: 14px; }
.crowd { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.crowd > button {
  position: absolute; width: 40%; aspect-ratio: 1; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; font: inherit;
  background: color-mix(in srgb, var(--face) 26%, var(--mix));
  box-shadow: 0 6px 0 color-mix(in srgb, var(--edge) 45%, var(--mix));
  display: grid; place-items: center;
  translate: var(--px, 0) var(--py, 0);
  transition: translate .6s cubic-bezier(.22, 1.4, .36, 1), scale .4s cubic-bezier(.34, 1.56, .64, 1);
  animation: float var(--d, 4s) ease-in-out infinite;
}
.crowd > button.curious { scale: 1.07; }
.crowd img {
  width: 92%; height: auto; pointer-events: none;
  rotate: var(--tilt, 0deg); transition: rotate .5s cubic-bezier(.22, 1.4, .36, 1);
  transform-origin: 50% 90%;
  animation: breathe var(--d, 4s) ease-in-out infinite;
}
.crowd > button.hop img { animation: hop .75s cubic-bezier(.3, 1.5, .5, 1); }
.crowd-0 { left: 30%; top: 2%; --d: 3.6s; }
.crowd-1 { left: 0; top: 30%; --d: 4.3s; animation-delay: -1s !important; }
.crowd-2 { right: 0; top: 30%; --d: 3.9s; animation-delay: -2s !important; }
.crowd-3 { left: 10%; bottom: 0; --d: 4.7s; animation-delay: -3s !important; }
.crowd-4 { right: 10%; bottom: 0; --d: 4.1s; animation-delay: -1.5s !important; }
.crowd-1 img { animation-delay: -1.3s; }
.crowd-2 img { animation-delay: -2.2s; }
.crowd-3 img { animation-delay: -.7s; }
.crowd-4 img { animation-delay: -2.9s; }
@keyframes float { 50% { transform: translateY(-9px); } }
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  35% { transform: scale(1.045, .955); }
  65% { transform: scale(.97, 1.035); }
}
@keyframes hop {
  0% { transform: scale(1, 1); }
  18% { transform: scale(1.16, .82); }
  45% { transform: translateY(-26%) scale(.9, 1.12) rotate(-6deg); }
  70% { transform: translateY(0) scale(1.1, .9); }
  85% { transform: scale(.97, 1.04); }
  100% { transform: scale(1, 1); }
}
.bubble {
  position: absolute; z-index: 3; margin: 0; translate: 0 -100%;
  background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.35;
  padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line);
}
.bubble::after {
  content: ''; position: absolute; bottom: -9px; left: calc(var(--tail, 50%) - 8px);
  width: 14px; height: 14px; background: var(--surface);
  border: 2px solid var(--line); border-top: 0; border-left: 0; rotate: 45deg;
}
.bubble.pop { animation: pop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { from { opacity: 0; scale: .6; } }

/* Living background of the hero */
.hero { position: relative; }
.hero-in { position: relative; z-index: 1; }
.synapses {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,.25) 20%, #000 65%);
  mask-image: linear-gradient(100deg, rgba(0,0,0,.25) 20%, #000 65%);
}
.hero h1 span {
  background: linear-gradient(90deg, var(--accent) 0%, #c27cff 30%, var(--accent) 60%, var(--accent) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Buttons catch the light now and then */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; inset: 0; translate: -120% 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  animation: shine 5s ease-in-out infinite 1.5s;
}
@keyframes shine { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }

/* Bands */
.band { padding: 56px 0; }
.band.alt { background: var(--tint); --wave: var(--tint); }
.band.dark { background: var(--deep); --wave: var(--deep); color: var(--white); overflow-x: clip; }
/* Alternate bands meet their neighbours with a slow, moving wave. */
.band.alt, .band.dark { position: relative; z-index: 1; }
.band.alt::before, .band.alt::after, .band.dark::before, .band.dark::after {
  content: ''; position: absolute; left: 0; right: 0; height: 34px;
  background: var(--wave); pointer-events: none;
  -webkit-mask: var(--wave-svg) repeat-x 0 0 / 1200px 34px;
  mask: var(--wave-svg) repeat-x 0 0 / 1200px 34px;
  animation: wave 22s linear infinite;
}
.band.alt::before, .band.dark::before { top: -33px; }
.band.alt::after, .band.dark::after { bottom: -33px; scale: 1 -1; animation-duration: 30s; animation-direction: reverse; }
:root { --wave-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 34' preserveAspectRatio='none'%3E%3Cpath d='M0 34V17Q150 0 300 17T600 17T900 17T1200 17V34Z'/%3E%3C/svg%3E"); }
@keyframes wave { to { -webkit-mask-position: 1200px 0; mask-position: 1200px 0; } }
.sub { margin-top: 48px; }
.intro { color: var(--muted); max-width: 46em; font-size: 18px; }
.grid3, .grid4 { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding-top: 30px; }
.num {
  position: absolute; top: -16px; left: 22px; width: 36px; height: 36px; border-radius: 12px;
  background: var(--yellow); box-shadow: 0 3px 0 #d99a00; color: #3b2300;
  display: grid; place-items: center; font-weight: 900;
}
.fair { margin-top: 24px; background: var(--deep); border-color: var(--deep); box-shadow: 0 4px 0 #1a1333; }
.fair h2 { color: var(--white); font-size: 24px; }
.fair p { color: #d9d2f5; }

/* Categories */
.cats { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cat a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--surface); border-radius: var(--radius); padding: 18px;
  border: 2px solid color-mix(in srgb, var(--face) 55%, var(--mix));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--edge) 60%, var(--mix));
  transition: transform .12s ease;
}
.cat a { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s; }
.cat a:hover { transform: translateY(-5px) rotate(-.6deg); }
.cat a:hover .host { animation: wiggle .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes wiggle {
  20% { transform: rotate(-12deg) scale(1.08); }
  45% { transform: rotate(9deg) scale(1.1); }
  70% { transform: rotate(-4deg); }
}
.num { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.step:hover .num { transform: rotate(-10deg) scale(1.15); }
.cat-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.cat-top .host { width: 72px; height: 72px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--face) 25%, var(--mix)); }
.cat h3 { margin: 0; font-size: 20px; }
.who { color: var(--edge); font-weight: 900; font-size: 14px; margin: 2px 0 0; filter: brightness(var(--edge-text)); }
.cat p { color: var(--muted); font-size: 15px; flex: 1; }
.more { color: var(--violet-text); font-weight: 900; font-size: 14px; }

/* FAQ */
.faq { margin-bottom: 12px; padding: 0; }
.faq summary { cursor: pointer; font-weight: 900; padding: 18px 22px; list-style: none; position: relative; padding-right: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 12px; font-size: 26px; color: var(--violet); }
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 22px 20px; }
.cta-end { text-align: center; padding: 40px 22px; }
.cta-end p { margin-bottom: 22px; }

/* Catalog */
.page-h { padding: 44px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 14px;
  padding: 7px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--face) 30%, var(--mix));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--edge) 55%, var(--mix));
}
.gcat { margin: 40px 0; }
/* Tabs: chips choose the category shown (site.js). */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 2px solid transparent;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .2s;
}
.chip small { font-size: 12px; font-weight: 900; opacity: .6; }
.chip-host { width: 24px; height: 24px; margin: -4px 0 -4px -6px; }
.chip:hover { transform: translateY(-2px); }
.chip.on {
  background: var(--face); border-color: var(--edge); color: #1a1236;
  box-shadow: 0 4px 0 var(--edge); transform: translateY(-2px);
}
.chip.on .chip-host { animation: wiggle .7s cubic-bezier(.3, 1.5, .5, 1); }
.tabs .gcat { margin-top: 20px; }
.gcat.enter .gcat-h { animation: rise .6s cubic-bezier(.34, 1.56, .64, 1); }
.gcat.enter .games > li {
  animation: rise .6s cubic-bezier(.34, 1.56, .64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 40ms + 80ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.97); } }
.gnext { display: none; }
.tabs .gnext { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.gnext a {
  text-decoration: none; color: var(--ink); font-weight: 900; padding: 12px 18px;
  border-radius: 14px; background: var(--surface); border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.gnext a:hover { transform: translateY(-2px); }
.gcat-h {
  display: flex; gap: 18px; align-items: flex-start;
  background: color-mix(in srgb, var(--face) 22%, var(--mix));
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--edge) 50%, var(--mix));
}
.gcat-h .host { width: 104px; height: 104px; flex: none; }
.gcat-h h2 { margin-bottom: 2px; }
.gcat-h h2 small { font-size: 15px; color: var(--muted); font-weight: 800; }
.gcat-h p { margin: 4px 0 0; color: var(--muted); }
.gcat-h .who { color: var(--ink); }
.quote { font-style: italic; }
.games { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.game { background: var(--surface); border-radius: 16px; padding: 16px 18px; border: 2px solid var(--line); }
.game-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.game h3 { font-size: 17px; margin: 0 0 4px; }
.game p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.game .tip { color: var(--ink); font-weight: 700; }
.game .tip b { color: var(--edge); filter: brightness(var(--edge-text)); }
.badge {
  flex: none; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--face) 30%, var(--mix)); color: var(--ink);
}

/* Legal */
.legal { padding: 44px 16px 24px; }
.legal h2 { font-size: 24px; margin-top: 1.6em; }
.legal h3 { margin-top: 1.2em; }
.legal p, .legal li { color: var(--ink-soft); font-weight: 600; }
.legal .updated { color: var(--muted); }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 8px 0 16px; }
.legal th, .legal td { border: 2px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--tint); }
.legal .table { overflow-x: auto; }
.nf { padding: 80px 16px; text-align: center; }

/* App screenshots */
.shots {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.shot { text-align: center; }
.shot .phone {
  background: var(--bezel); padding: 7px; border-radius: 34px;
  box-shadow: 0 6px 0 var(--lilac), 0 18px 36px rgba(42, 21, 112, .16);
  margin: 0 auto 18px; max-width: 250px;
}
.shot img { display: block; width: 100%; height: auto; border-radius: 27px; background: var(--bg); }
.shot p { color: var(--muted); font-weight: 700; margin: 0; font-size: 16px; }
.shot .phone {
  rotate: var(--r, 0deg); animation: float 5s ease-in-out infinite;
  transition: rotate .5s cubic-bezier(.34, 1.56, .64, 1), scale .5s cubic-bezier(.34, 1.56, .64, 1);
}
.shot:nth-child(1) .phone { --r: -2.5deg; }
.shot:nth-child(2) .phone { --r: 1.5deg; animation-delay: -1.2s; }
.shot:nth-child(3) .phone { --r: -1deg; animation-delay: -2.6s; }
.shot:nth-child(4) .phone { --r: 2.5deg; animation-delay: -3.7s; }
.shot:hover .phone { rotate: 0deg; scale: 1.04; }

/* Scroll reveals (only when site.js runs) */
.js .reveal { opacity: 0; transform: translateY(28px) scale(.96); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .8s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* Reflex test */
.dark h2 { color: var(--white); }
.dark .intro { color: #cfc6f5; }
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.try-host { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.try-host .host {
  width: 96px; height: 96px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--face) 30%, var(--mix)); transform-origin: 50% 90%;
}
.try-host.hop .host { animation: hop .75s cubic-bezier(.3, 1.5, .5, 1); }
.try-says {
  position: relative; margin: 0; background: var(--surface); color: var(--ink);
  padding: 12px 16px; border-radius: 16px; font-size: 16px; min-height: 3.2em;
  display: flex; align-items: center;
}
.try-says::before {
  content: ''; position: absolute; left: -7px; top: 50%; width: 14px; height: 14px;
  background: var(--surface); translate: 0 -50%; rotate: 45deg;
}
.reflex { position: relative; display: grid; justify-items: center; gap: 22px; }
.pad {
  --c: var(--face); --s: var(--edge);
  width: min(300px, 74vw); aspect-ratio: 1; border-radius: 50%; border: 0;
  background: var(--c); color: var(--white); font: inherit; cursor: pointer;
  box-shadow: 0 10px 0 var(--s), 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent);
  display: grid; place-content: center; gap: 6px; padding: 24px; text-align: center;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, box-shadow .18s, transform .12s;
}
.pad:active { transform: translateY(6px); box-shadow: 0 4px 0 var(--s); }
.pad-label { font-weight: 900; font-size: clamp(22px, 3vw, 30px); line-height: 1.1; }
.pad-ms { font-weight: 800; font-size: 16px; opacity: .9; }
.pad[data-state="idle"] { animation: breathe 3.2s ease-in-out infinite; }
.pad[data-state="wait"] { --c: #7a4dff; --s: #4a1fd1; animation: wait 1.1s ease-in-out infinite; }
.pad[data-state="go"] { --c: #3ddc84; --s: #1f9e57; animation: go .5s ease-out infinite; }
.pad[data-state="early"] { --c: #ff5d73; --s: #c4304a; }
.pad[data-state="result"], .pad[data-state="done"] { --c: var(--surface); --s: var(--lilac); color: var(--ink); }
.pad[data-state="result"] .pad-label, .pad[data-state="done"] .pad-label { animation: pop .45s cubic-bezier(.34, 1.56, .64, 1); }
.pad.shake { animation: shake .45s; }
@keyframes wait { 50% { box-shadow: 0 10px 0 var(--s), 0 0 0 18px color-mix(in srgb, var(--c) 25%, transparent); } }
@keyframes go { from { box-shadow: 0 10px 0 var(--s), 0 0 0 0 rgba(61,220,132,.7); } to { box-shadow: 0 10px 0 var(--s), 0 0 0 34px rgba(61,220,132,0); } }
@keyframes shake { 20%, 60% { translate: -10px 0; } 40%, 80% { translate: 10px 0; } }
.tries { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; }
.tries li {
  min-width: 82px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 2px dashed rgba(255,255,255,.3); font-weight: 900; font-size: 15px; color: var(--white);
}
.tries li.hit { border: 0; background: rgba(61,220,132,.2); color: #8ff0b8; animation: pop .4s cubic-bezier(.34, 1.56, .64, 1); }
.tries li.miss { border: 0; background: rgba(255,93,115,.2); color: #ff9aa8; animation: pop .4s cubic-bezier(.34, 1.56, .64, 1); }
.spark {
  position: absolute; left: 50%; top: calc(min(300px, 74vw) / 2); width: 12px; height: 12px;
  margin: -6px; border-radius: 50%; background: var(--c); pointer-events: none;
  animation: spark .85s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes spark { to { translate: var(--x) var(--y); scale: .2; opacity: 0; } }

/* Catalog demos */
.demo-btn { display: none; }
.js .game[data-game] { cursor: pointer; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), border-color .2s, box-shadow .3s; }
.js .game[data-game]:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--face) 70%, var(--mix));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--edge) 45%, var(--mix));
}
.js .demo-btn {
  display: inline-flex; margin-top: 10px; border: 0; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 900; color: var(--ink); padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--face) 35%, var(--mix));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--edge) 55%, var(--mix));
}
.game:hover .demo-btn { background: var(--face); color: #1a1236; }
.demo-modal {
  width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; background: transparent; overflow: visible; color: var(--ink);
}
.demo-modal::backdrop { background: rgba(42, 21, 112, .5); backdrop-filter: blur(4px); }
.demo-modal[open] { animation: sheet-in .5s cubic-bezier(.34, 1.4, .64, 1); }
.demo-modal[open]::backdrop { animation: fade .3s ease; }
.demo-modal.closing { animation: sheet-out .26s cubic-bezier(.4, 0, 1, 1) forwards; }
.demo-modal.closing::backdrop { animation: fade-out .26s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(40px) scale(.92); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(30px) scale(.95); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.demo-card {
  position: relative; background: var(--surface); border-radius: 28px; padding: 18px;
  border: 3px solid color-mix(in srgb, var(--face) 60%, var(--mix));
  box-shadow: 0 7px 0 color-mix(in srgb, var(--edge) 60%, var(--mix));
  display: grid; gap: 12px;
}
.demo-close {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: 900 16px Nunito, sans-serif; cursor: pointer; box-shadow: 0 3px 0 var(--line);
}
.demo-head { display: flex; gap: 12px; align-items: center; padding-right: 44px; }
.demo-head .host {
  width: 64px; height: 64px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--face) 28%, var(--mix)); transform-origin: 50% 90%;
}
.demo-modal[open] .demo-head .host { animation: hop .8s cubic-bezier(.3, 1.5, .5, 1) .15s; }
.demo-cat { margin: 0; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--edge); filter: brightness(var(--edge-text)); }
.demo-head h2 { margin: 0; font-size: 24px; }
.demo-screen {
  position: relative; height: min(48vh, 430px); border-radius: 18px; overflow: hidden;
  background: var(--bg); border: 2px solid var(--line);
}
.demo-screen iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  opacity: 0; transition: opacity .4s ease;
}
.demo-screen.ready iframe { opacity: 1; }
.demo-loading {
  position: absolute; inset: 0; margin: 0; display: grid; place-content: center; gap: 14px;
  text-align: center; color: var(--muted); font-size: 15px;
}
.demo-loading::before {
  content: ''; width: 46px; height: 46px; margin: 0 auto; border-radius: 50%;
  border: 5px solid color-mix(in srgb, var(--face) 35%, var(--mix)); border-top-color: var(--edge);
  animation: spin .8s linear infinite;
}
.demo-screen.ready .demo-loading { display: none; }
@keyframes spin { to { rotate: 1turn; } }
.demo-tip { margin: 0; color: var(--muted); font-size: 15px; }
.demo-tip:empty { display: none; }
.demo-tip b { color: var(--edge); filter: brightness(var(--edge-text)); }
.demo-card .btn { text-align: center; }

/* Page transitions between pages of the site (Chrome, Edge, Safari 18). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.top { view-transition-name: top; }
::view-transition-old(root) { animation: page-out .3s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in .65s cubic-bezier(.22, 1.25, .36, 1) both; }
::view-transition-group(host) { animation-duration: .7s; animation-timing-function: cubic-bezier(.3, 1.25, .5, 1); }
@keyframes page-out { to { opacity: 0; transform: translateY(-18px) scale(.985); filter: blur(3px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(44px) scale(.985); } }
.gcat.enter.first .gcat-h { animation: none; }

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

/* Footer */
.foot { background: var(--deep); color: #d9d2f5; padding: 40px 0 28px; margin-top: 20px; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.foot-brand svg { height: 24px; width: auto; filter: brightness(0) invert(1); }
.foot-brand p { margin: 8px 0 0; }
.foot-nav { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.foot-nav a { color: var(--white); text-decoration: none; font-weight: 800; }
.foot-nav a:hover { text-decoration: underline; }
.by { grid-column: 1 / -1; margin: 0; font-weight: 800; color: #d9d2f5; }
.by a {
  color: var(--white); font-weight: 900; text-decoration: none;
  background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 100% 2px no-repeat;
  transition: background-size .3s ease;
}
.by a:hover { background-size: 100% 100%; color: #3b2300; }
.copy { grid-column: 1 / -1; font-size: 14px; color: #a89fd0; margin: 0; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .crowd { max-width: 340px; order: -1; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; gap: 28px; }
  .try { grid-template-columns: 1fr; gap: 28px; }
  /* The captures slide sideways inside their own row. */
  .shots {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 24px -16px 0; padding: 4px 16px 24px; gap: 18px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 min(62vw, 240px); scroll-snap-align: center; }
}
@media (max-width: 560px) {
  .hide-s { display: none; }
  .show-s { display: inline; }
  .brand svg { height: 21px; }
  .top-in { gap: 6px; }
  .theme { width: 34px; height: 34px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; }
  /* The category tabs scroll sideways and stay under the header. */
  .tabs .chips {
    position: sticky; top: 64px; z-index: 4; flex-wrap: nowrap; overflow-x: auto;
    margin: 18px -16px 0; padding: 10px 16px 12px; scrollbar-width: none;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  }
  .tabs .chips::-webkit-scrollbar { display: none; }
  .tabs .chip { flex: none; }
  /* The demo rises as a sheet from the bottom. */
  .demo-modal { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 100dvh; }
  .demo-card { border-radius: 28px 28px 0 0; border-bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .demo-screen { height: min(50vh, 430px); }
  .demo-modal[open] { animation-name: sheet-up; }
  .demo-modal.closing { animation-name: sheet-down; }
  .gnext a { padding: 10px 14px; font-size: 15px; }
  .grid4 { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .crowd { max-width: 260px; }
  .gcat-h { flex-direction: column; }
  .gcat-h .host { width: 80px; height: 80px; }
  .games { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-nav { text-align: left; }
  .stats { gap: 20px; }
}
