/* Challengely website: one column, rounded game-like shapes, the app's plum + gold medal colours. */
:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --ink: #241640;
  --muted: #6b5f86;
  --line: #ebe4f7;
  --plum: #5b2bd6;
  --plum-deep: #2e1466;
  --pink: #ff4f8b;
  --gold: #f5b82e;
  --mint: #2fbf8f;
  --soft: #f1ebff;
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130b26; --surface: #1d1336; --ink: #f3eeff; --muted: #b3a6d4; --line: #2f2350;
    --plum: #9b7bff; --plum-deep: #0d0720; --pink: #ff6fa0; --gold: #f7c548; --mint: #4fd8a6; --soft: #26194a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--body); }
img { max-width: 100%; }
a { color: var(--plum); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; }

/* Header */
.site-head { padding-block: 18px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 24px var(--display); color: var(--ink); text-decoration: none; }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, var(--plum), var(--pink)); display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: 0 6px 16px -6px var(--plum); }
.nav { display: flex; gap: 18px; font-weight: 700; font-size: 15px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-block: 40px 72px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .phone { margin: 0 auto; } }
.pill { display: inline-flex; gap: 8px; align-items: center; background: var(--soft); color: var(--plum); font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); margin-block: 16px 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--pink); }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 34ch; margin: 0 0 28px; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 168px; padding: 10px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none; line-height: 1.2; transition: transform .15s; }
.store:hover { transform: translateY(-2px); }
.store-soon { opacity: .55; cursor: default; }
.store-soon:hover { transform: none; }
.store small { font-size: 11px; opacity: .8; }
.store strong { font: 700 18px var(--display); }
.hero .note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Phone mock: today's room leaderboard */
.phone { width: min(320px, 100%); background: linear-gradient(170deg, #4b1fb0, #2a0f63 70%); border-radius: 38px; padding: 18px 14px 22px; box-shadow: 0 30px 60px -24px rgba(46, 20, 102, .65), inset 0 0 0 6px rgba(255,255,255,.06); color: #fff; }
.phone-top { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 8px 12px; }
.phone-top b { font: 800 19px var(--display); }
.phone-top span { font-size: 12px; opacity: .75; }
.tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); padding: 5px; border-radius: 999px; margin-bottom: 12px; font-size: 13px; font-weight: 800; }
.tabs span { flex: 1; text-align: center; padding: 6px 0; border-radius: 999px; opacity: .7; }
.tabs span.on { background: var(--pink); opacity: 1; }
.row { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.08); margin-top: 8px; }
.row.me { background: rgba(245, 184, 46, .18); box-shadow: inset 0 0 0 2px rgba(245, 184, 46, .55); }
.medal { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--display); color: #4a2a00; }
.m1 { background: radial-gradient(circle at 35% 30%, #ffe9a3, #f5b82e); }
.m2 { background: radial-gradient(circle at 35% 30%, #fff, #b9c0cf); color: #3b4252; }
.m3 { background: radial-gradient(circle at 35% 30%, #ffd2ad, #d9824a); }
.rank { text-align: center; font-weight: 800; opacity: .7; }
.ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: rgba(255,255,255,.18); }
.name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name small { display: block; font-weight: 700; font-size: 11px; color: var(--gold); }
.score { text-align: right; font: 800 18px var(--display); line-height: 1; }
.score small { display: block; font: 700 11px var(--body); color: var(--gold); margin-top: 3px; }

/* Sections */
section { padding-block: 64px; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: step; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.alt .step { background: var(--bg); }
.step-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 20px var(--display); color: #fff; background: var(--plum); margin-bottom: 14px; }
.step:nth-child(2) .step-num { background: var(--pink); }
.step:nth-child(3) .step-num { background: var(--mint); }
.step h3 { font-size: 22px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }

.games { display: flex; flex-wrap: wrap; gap: 10px; }
.game { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 15px; }
.game i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: 24px; }
.card p { margin: 0; color: var(--muted); }
.card ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.card .tag { justify-self: start; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.tag-heart { background: rgba(255, 79, 139, .14); color: var(--pink); }
.tag-premium { background: rgba(245, 184, 46, .18); color: #a16a00; }
@media (prefers-color-scheme: dark) { .tag-premium { color: var(--gold); } }

.points { font-variant-numeric: tabular-nums; display: grid; gap: 6px; margin-top: 4px; }
.points div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.points b { color: var(--plum); }

details { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 800; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-foot { padding-block: 40px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

/* Text pages (privacy, delete account) */
.doc { max-width: 760px; margin: 0 auto; padding-block: 24px 64px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 26px; margin-block: 36px 10px; }
.doc h3 { font-size: 19px; margin-block: 22px 6px; font-family: var(--body); font-weight: 800; }
.doc p, .doc li { color: var(--ink); }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 4px; }
.doc .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.doc .box p { margin: 0; }
.doc .box p + p { margin-top: 6px; }
