@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url(/fonts/fredoka-500.woff2) format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-700.woff2) format("woff2"); }

:root {
  --purple: #6b3fd4;
  --purple-dark: #40208f;
  --yellow: #fdc92c;
  --bg: #f7f3ff;
  --card: #ffffff;
  --text: #241b3a;
  --muted: #5d5475;
  --line: #e3dbf7;
  --button: #6b3fd4;
  --button-hover: #40208f;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, .brand, .kicker, button, .button, .top-play, .code { font-family: Fredoka, system-ui, sans-serif; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
a { color: var(--purple); }
img { max-width: 100%; height: auto; }
main { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { border-radius: 10px; }
.top-play { font-weight: 700; color: var(--purple); text-decoration: none; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 0 32px; }
.hero-art { text-align: center; }
.hero-art img { width: 190px; filter: drop-shadow(0 18px 24px rgba(64, 32, 143, .22)); }
.kicker { margin: 0 0 6px; color: var(--purple); font-weight: 700; letter-spacing: .02em; }
.hero h1 { font-size: clamp(32px, 8.4vw, 54px); }
.hero h1 em { font-style: normal; color: var(--purple); background: linear-gradient(transparent 62%, rgba(253, 201, 44, .55) 0); }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 18px; }
.play { display: inline-block; margin: 0 -10px 10px; }
.play img { display: block; width: 216px; }

.join { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 16px; max-width: 420px; }
.join label { display: block; font-weight: 700; margin-bottom: 8px; }
.join-row { display: flex; gap: 10px; }
.join input {
  flex: 1; min-width: 0; width: 100%; font: 700 26px/1 Fredoka, system-ui, sans-serif; letter-spacing: .25em; text-transform: uppercase;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text);
}
.join input:focus { outline: 3px solid var(--yellow); border-color: var(--purple); }
button, .button {
  font-size: 18px; font-weight: 700; color: #fff; background: var(--button); border: 0; border-radius: 14px;
  padding: 12px 18px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--button-hover); }
.join-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.join-hint.error { color: #c62828; font-weight: 600; }

.how, .why { padding: 28px 0; border-top: 2px solid var(--line); }
.how h2, .why h2 { font-size: 30px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 20px; padding: 14px 16px; counter-increment: step; }
.steps img { flex: none; width: 56px; height: 108px; object-fit: contain; object-position: bottom; }
.steps h3 { font-size: 21px; margin-bottom: 2px; }
.steps h3::before { content: counter(step) ". "; color: var(--purple); }
.steps p { margin: 0; color: var(--muted); }
.perks { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.perks li { background: var(--card); border-radius: 16px; padding: 12px 16px; color: var(--muted); }
.perks b { color: var(--text); }

.code { color: var(--purple); letter-spacing: .06em; white-space: nowrap; }
.small { font-size: 15px; color: var(--muted); }

.legal { background: var(--card); border-radius: 20px; padding: 8px 22px 22px; margin: 4px 0 32px; max-width: 760px; }
.legal h1 { font-size: 34px; margin-top: 18px; }
.legal h2 { font-size: 23px; margin-top: 1.4em; }
.legal li { margin: .25em 0; }

.foot { text-align: center; padding: 26px 20px 36px; color: var(--muted); font-size: 14px; border-top: 2px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 8px; font-size: 16px; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; padding: 28px 0 48px; }
  .hero-art img { width: 260px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; align-items: flex-start; }
  .perks { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: bob 3.2s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15102a; --card: #221a3d; --text: #f2eefc; --muted: #b8afd2; --line: #352b57; --purple: #a68bff; }
  .hero-art img { filter: none; }
  .hero h1 em { background: linear-gradient(transparent 70%, rgba(253, 201, 44, .35) 0); }
}
