/* Rallii website — shared styles. Tokens match src/theme.ts. */
:root {
  /* DARK is the default look. Light is opt-in from the switch in the header,
     remembered in localStorage and applied before first paint (see the inline
     script in each page's <head>). */
  --accent: #a77cf0;
  --accent-ink: #c4a6ff;
  --accent-tint: #2a2140;
  --ink: #f2f2f4;
  --ink-2: #c9c9d0;
  --ink-3: #9a9aa5;
  --line: #2b2b33;
  --bg: #0e0e12;
  --bg-2: #15151b;
  --card: #1b1b22;
  --football: #479c4d;
  --good: #7fd08a;
  --radius: 22px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --accent: #8e57d8;
  --accent-ink: #6f3fb8;
  --accent-tint: #efe6ff;
  --ink: #0f0f0f;
  --ink-2: #484848;
  --ink-3: #717171;
  --line: #e8e8e8;
  --bg: #ffffff;
  --bg-2: #f8f7fb;
  --card: #ffffff;
  --good: #2f7a34;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent-ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
/* The wordmark is ONE flex item. Splitting "Rall" and "ii" into two put the
   header's 10px flex gap between the l and the first i. */
.brand .word { white-space: nowrap; }
.brand .ii { color: var(--accent); }
.mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
}
.top nav a:hover { background: var(--bg-2); color: var(--ink); }
@media (max-width: 640px) { .top nav a.hide-sm { display: none; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 0; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }

/* ---------- hero */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.eyebrow {
  display: inline-block; background: var(--accent-tint); color: var(--accent-ink);
  font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.035em; margin: 18px 0 16px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34ch; margin: 0 0 28px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.small { font-size: 13px; color: var(--ink-3); margin-top: 14px; }

/* phone-style game card, same look as the app's game header */
.phone {
  justify-self: center; width: min(340px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 34px;
  padding: 12px; box-shadow: 0 30px 60px -30px rgba(40, 20, 80, 0.35);
}
.game-hero { position: relative; overflow: hidden; border-radius: 24px; background: var(--football); color: #fff; padding: 18px 18px 20px; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.game-hero svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-hero > * { position: relative; }
.pills { display: flex; gap: 6px; align-items: center; }
.pill { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.28); }
.pill.solid { background: rgba(255,255,255,.95); color: var(--football); border: 0; letter-spacing: .05em; font-weight: 800; }
.pill.right { margin-left: auto; }
.game-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.meta { font-size: 13.5px; font-weight: 600; opacity: .92; margin: 2px 0; }
.phone-body { padding: 16px 6px 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #e3f1e4; color: #2f6f34; flex: none; }
.host { font-weight: 700; font-size: 14px; }
.host small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; }
.tag { font-size: 10px; font-weight: 800; color: var(--accent-ink); background: var(--accent-tint); padding: 3px 7px; border-radius: 6px; margin-left: 6px; }
.bar { height: 7px; border-radius: 99px; background: var(--line); margin: 16px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 80%; background: #4ca84f; border-radius: 99px; }
.fill { font-size: 13px; font-weight: 700; }
.join { margin-top: 14px; width: 100%; }

/* ---------- sections */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
section.alt { background: var(--bg-2); }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 12px; }
.sub { color: var(--ink-2); font-size: 17px; margin: 0 0 32px; max-width: 60ch; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 800px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 12px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.num { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.sports { display: flex; flex-wrap: wrap; gap: 8px; }
.sport { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.sport b { width: 26px; height: 26px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-size: 10px; }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.ticks li { padding-left: 28px; position: relative; color: var(--ink-2); }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-tint); box-shadow: inset 0 0 0 5px var(--accent); }
.money { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.money small { font-size: 15px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }

/* ---------- footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .copy { margin-left: auto; }

/* ---------- legal */
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.doc-nav a { text-decoration: none; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.doc { padding-top: 28px; margin-top: 36px; border-top: 1px solid var(--line); }
.doc h2 { font-size: 28px; margin-bottom: 4px; }
.doc .updated { color: var(--ink-3); font-size: 13px; margin: 0 0 18px; }
.doc .intro { font-size: 17px; color: var(--ink-2); }
.doc h3 { font-size: 17px; margin: 26px 0 6px; }
.doc p { margin: 0 0 12px; color: var(--ink-2); }


/* ---------- theme switch */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); display: grid; place-items: center;
  cursor: pointer; margin-left: 6px; padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: block; }
html[data-theme="light"] .theme-toggle .moon { display: none; }

/* ---------- pricing */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 800px) { .rules { grid-template-columns: 1fr; } }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.rule .big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.rule .big small { font-size: 15px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.rule .when { margin-top: 10px; font-weight: 700; }
.rule p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.rule.hl { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--card)); }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.calc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calc-top label { font-weight: 700; }
.calc-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.calc input[type=range] { width: 100%; margin: 14px 0 18px; accent-color: var(--accent); height: 28px; }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) {
  .calc-out { gap: 8px; }
  .calc-out div { padding: 10px 10px; border-radius: 12px; }
  .calc-out span { font-size: 10px; letter-spacing: .03em; }
  .calc-out b { font-size: 19px; }
}
.calc-out div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.calc-out span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.calc-out b { display: block; font-size: 24px; letter-spacing: -0.02em; margin-top: 4px; }
.calc-out .you b { color: var(--good); }
