:root {
  color-scheme: dark;
  --background: #0a0014;
  --purple: #6501ff;
  --pink: #ea00d9;
  --cyan: #0df3ff;
  --text: #fff;
  --muted: rgba(255, 255, 255, .75);
  --card: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .12);
  --gradient: linear-gradient(135deg, var(--purple), var(--pink));
  --body: "DM Sans", system-ui, sans-serif;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.04; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
section[id] { scroll-margin-top: 1.5rem; }

.shell { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 2;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  transform: translateY(-200%);
  padding: .5rem .8rem;
  background: var(--cyan);
  color: var(--background);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid rgba(101, 1, 255, .35); }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}
.header-inner { min-height: 4.75rem; }
.brand, .site-header nav, .actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.brand { text-decoration: none; }
.brand img { display: block; width: clamp(7rem, 17vw, 10rem); height: auto; }
.site-header nav { gap: 1.2rem; }
.nav-link { color: var(--muted); font-size: .92rem; text-decoration: none; }
.nav-link:hover { color: var(--text); }

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.button-small { min-height: 2.75rem; padding-inline: 1rem; font-size: .9rem; }
.button-primary {
  color: var(--text);
  background: var(--gradient);
  box-shadow: 0 0 1.15rem rgba(234, 0, 217, .28);
  text-shadow: 0 1px 2px #29003e;
}
.button-primary:hover { box-shadow: 0 0 1.7rem rgba(234, 0, 217, .48); }
.button-outline { border-color: var(--purple); background: transparent; color: var(--cyan); }
.button-outline:hover { background: var(--purple); color: var(--text); }
.button-text { background: transparent; color: var(--text); padding-inline: .65rem; }
.button-text:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: .24em; }
.actions { flex-wrap: wrap; }

.hero-section {
  background:
    radial-gradient(ellipse 75% 65% at 15% 40%, rgba(101, 1, 255, .42), transparent 72%),
    radial-gradient(ellipse 60% 60% at 85% 62%, rgba(234, 0, 217, .28), transparent 72%);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 5.25rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--cyan);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.hero-copy > .eyebrow > span:first-child { width: .48rem; height: .48rem; border-radius: 50%; background: var(--cyan); }
.hero-age { color: var(--muted); margin-inline-start: .3rem; border-inline-start: 1px solid var(--line); padding-inline-start: .8rem; }
.hero h1, .section-intro h2, .download-inner h2 {
  font: 400 clamp(3.25rem, 6vw, 5.5rem)/.99 var(--display);
  letter-spacing: .025em;
}
.hero h1 { margin-top: .95rem; overflow-wrap: anywhere; }
.hero h1 span {
  display: block;
  width: fit-content;
  color: var(--cyan);
  background: linear-gradient(135deg, #fff 0%, var(--pink) 48%, var(--cyan) 92%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .actions { margin-top: 1.65rem; }
.hero-note { margin-top: .9rem; color: var(--muted); font-size: .88rem; }
.hero-note span { margin-inline: .2rem; }
.hero-video { width: min(100%, 17rem); justify-self: center; text-align: center; }
.hero-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(234, 0, 217, .5);
  border-radius: 1.25rem;
  background: var(--background);
  box-shadow: 0 0 2.8rem rgba(101, 1, 255, .43);
}
.hero-video figcaption { margin-top: .6rem; color: var(--muted); font-size: .87rem; }

.play-section {
  padding-block: 4rem;
  border-block: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(101, 1, 255, .18), transparent 70%), var(--background);
}
.section-intro { max-width: 40rem; }
.section-intro h2, .download-inner h2 { margin-top: .5rem; font-size: clamp(2.85rem, 5.1vw, 4.8rem); }
.section-intro > p:not(.eyebrow) { color: var(--muted); margin-top: .85rem; }

.play-actions { margin-top: 1.25rem; }

.demo-dialog {
  --demo-pink: #ff4fa3;
  --demo-cyan: #00e5ff;
  --demo-border: linear-gradient(135deg, var(--demo-pink), var(--demo-cyan));
  width: min(calc(100% - 1.25rem), 29rem);
  max-width: none;
  max-height: calc(100dvh - 1.25rem);
  padding: 0;
  border: 1px solid rgba(234, 0, 217, .65);
  border-radius: 1.4rem;
  color: var(--text);
  background: var(--background);
  box-shadow: 0 0 3rem rgba(101, 1, 255, .35);
  overscroll-behavior: contain;
}
.demo-dialog::backdrop { background: rgba(5, 0, 12, .85); }
body:has(.demo-dialog[open]) { overflow: hidden; }
.demo-shell {
  background:
    linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .8)),
    url("progressive-background.webp") center / cover;
}
.demo-header {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: .6rem;
  min-height: 4rem;
  padding: .55rem 1rem;
  background: rgba(0, 0, 0, .75);
  border-bottom: 1px solid rgba(234, 0, 217, .35);
}
.demo-header h2 { font: 400 1.75rem/1 var(--display); letter-spacing: .04em; }
.demo-header img { border-radius: .55rem; }
.demo-close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--card);
  font-size: 1.45rem;
  cursor: pointer;
}
.demo-close:hover { border-color: var(--demo-cyan); }
.demo-game, .demo-finish { padding: clamp(.9rem, 4vw, 1.5rem); }
.demo-finish h3 { font: 400 2rem/1 var(--display); }
.demo-finish > p { margin-top: .65rem; color: var(--muted); }

.demo-progress { margin-bottom: 1.15rem; }
.demo-hearts { display: flex; justify-content: center; gap: clamp(.5rem, 3vw, 1rem); margin-bottom: .7rem; }
.demo-hearts span { color: #75627f; font-size: 1.4rem; line-height: 1; }
.demo-hearts .is-reached { color: var(--demo-pink); text-shadow: 0 0 .8rem rgba(234, 0, 217, .65); }
.demo-hearts .is-current { color: var(--demo-cyan); }
.demo-progress-label { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .88rem; }
.demo-progress-label h3 { font: 400 1.5rem/1 var(--display); color: var(--demo-cyan); }
.demo-progress progress {
  display: block;
  width: 100%;
  height: .65rem;
  margin-top: .5rem;
  padding: 1px;
  appearance: none;
  border: 0;
  border-radius: 1rem;
  background: var(--demo-border);
  accent-color: var(--demo-pink);
}
.demo-progress progress::-webkit-progress-bar { background: #000; border-radius: inherit; }
.demo-progress progress::-webkit-progress-value { background: var(--demo-pink); border-radius: inherit; }
.demo-progress progress::-moz-progress-bar { background: var(--demo-pink); border-radius: inherit; }
.demo-card {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: linear-gradient(#08000e, #08000e) padding-box, var(--demo-border) border-box;
  text-align: center;
}
.demo-card-header {
  display: grid;
  gap: .15rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(13, 243, 255, .4);
  background: rgba(101, 1, 255, .14);
}
.demo-card-header strong { font-size: 1.12rem; overflow-wrap: anywhere; }
.demo-card-header span { color: var(--demo-cyan); font-size: .88rem; }
.demo-card > p { min-height: 7.5rem; display: grid; align-items: center; padding: .75rem; font-weight: 500; }
.demo-game-bottom { display: grid; justify-items: center; gap: .35rem; margin-top: 1.2rem; }
.demo-timer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .65rem; margin-bottom: .5rem; }
.demo-clock {
  display: grid;
  min-width: 3.75rem;
  min-height: 3.75rem;
  place-items: center;
  border: 2px solid var(--demo-cyan);
  border-radius: 50%;
  background: #08000e;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.demo-next { display: grid; justify-items: center; gap: .35rem; padding: .25rem .75rem; border: 0; color: var(--text); background: transparent; font-weight: 700; cursor: pointer; }
.demo-next-icon {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border: 2px solid transparent;
  border-radius: 50%;
  background: linear-gradient(#08000e, #08000e) padding-box, var(--demo-border) border-box;
  color: var(--demo-pink);
  font: 700 2.15rem/1 var(--body);
  box-shadow: 0 0 1.25rem rgba(234, 0, 217, .3);
}
.demo-next:hover .demo-next-icon { color: var(--demo-cyan); box-shadow: 0 0 1.4rem rgba(13, 243, 255, .3); }
.demo-finish { padding-block: 2rem; text-align: center; }
.demo-finish-heart { display: inline-block; margin-bottom: .65rem; color: var(--demo-pink); font-size: 2.2rem; text-shadow: 0 0 1rem var(--pink); }
.demo-finish .button-primary { display: flex; width: fit-content; margin: 1.2rem auto .45rem; }

.how-section { padding-block: 4.25rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.55rem;
  padding: 0;
  margin: 1.65rem 0 0;
  list-style: none;
  counter-reset: step;
}
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--cyan); font-weight: 700; font-size: .88rem; }
.steps h3 { margin-block: .55rem; font: 400 1.8rem/1.04 var(--display); letter-spacing: .025em; }
.steps p { color: var(--muted); }

.archive-section { border-block: 1px solid var(--line); background: var(--card); padding-block: 4rem; }
.archive-inner { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: start; gap: clamp(1.4rem, 4.5vw, 4.5rem); }
.decks { border-top: 1px solid var(--line); }
.deck { border-bottom: 1px solid var(--line); }
.deck summary {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 3.75rem;
  cursor: pointer;
  list-style: none;
}
.deck summary::-webkit-details-marker { display: none; }
.deck summary::after { content: "+"; color: var(--cyan); font-size: 1.45rem; line-height: 1; }
.deck[open] summary::after { content: "−"; }
.deck-number { color: var(--cyan); font-size: .86rem; font-weight: 700; }
.deck-title { flex: 1; font-weight: 600; line-height: 1.25; }
.deck-count { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.deck-content { padding: 0 0 1.25rem; }
.deck-content > p { color: var(--muted); }
.deck-content ol { padding-inline-start: 1.45rem; margin: 1rem 0 0; }
.deck-content li + li { margin-top: .65rem; }
.deck-content li::marker { color: var(--cyan); }
.deck-content li span { display: block; color: var(--cyan); font-size: .85rem; font-weight: 700; }

.download-section { padding-block: 4rem; background: radial-gradient(ellipse at 50% 10%, rgba(101, 1, 255, .32), transparent 68%); }
.download-inner { text-align: center; }
.download-inner > img { border-radius: .9rem; }
.download-inner > p { color: var(--muted); max-width: 35rem; margin: 1rem auto 0; }
.download-inner .actions { margin-top: 1.35rem; justify-content: center; }
.android-help { color: var(--muted); max-width: 31rem; margin: 1rem auto 0; }
.android-help summary { min-height: 2.75rem; padding-block: .65rem; cursor: pointer; }
.android-help > p { margin: .4rem 0 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.15rem; color: var(--muted); font-size: .9rem; }
.site-footer a { text-underline-offset: .2em; }
.language-picker { margin-block-start: .8rem; }
.language-picker summary { width: fit-content; cursor: pointer; }
.language-picker ul { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .5rem 0 0; list-style: none; }
.language-picker a[aria-current='page'] { color: var(--cyan); }

html:is(:lang(ar), :lang(ja), :lang(ko)) {
  --display: system-ui, sans-serif;
}
:is(:lang(ar), :lang(ja), :lang(ko)) .hero h1 {
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.15;
}
[dir='rtl'] .demo-next-icon { transform: scaleX(-1); }

@media (max-width: 48rem) {
  .shell { width: min(100% - 2rem, 70rem); }
  .hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; }
  .hero h1 { font-size: clamp(3rem, 7vw, 4.7rem); }
  .archive-inner { grid-template-columns: 1fr; }
}

@media (max-width: 36rem) {
  .header-inner { min-height: 4.15rem; }
  .nav-link { display: none; }
  .hero { grid-template-columns: 1fr; gap: 1.7rem; padding-block: 2.4rem; }
  .hero-section {
    background:
      radial-gradient(ellipse at 15% 20%, rgba(101, 1, 255, .34), transparent 62%),
      radial-gradient(ellipse at 86% 74%, rgba(234, 0, 217, .22), transparent 62%);
  }
  .hero h1 { font-size: clamp(3rem, 11vw, 4.55rem); }
  .hero-video { width: min(100%, 14rem); }
  .play-section, .how-section, .archive-section, .download-section { padding-block: 3rem; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 23rem) {
  .hero-note { font-size: .82rem; }
  .download-inner .actions .button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
