@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* The app's design tokens: dark first, light when the device asks for it. */
:root {
  --bg: #0e1210; --surface: #171c19; --sunken: #0a0d0b; --line: #2a312c;
  --ink: #f0f3f1; --muted: #a9b2ac; --subtle: #8b958e;
  --accent: #4ade80; --accent-fill: #22c55e; --on-accent: #04210f; --accent-soft: #123020;
  --singles: #7aa7ff; --doubles: #b79cf7; --triples: #f47cb4; --power: #f7c35a; --checkout: #4fd1c5;
  --focus: #93b4ff;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f4; --surface: #ffffff; --sunken: #eaeeeb; --line: #dce2dd;
    --ink: #101512; --muted: #48524b; --subtle: #5f6a62;
    --accent: #15803d; --accent-fill: #15803d; --on-accent: #ffffff; --accent-soft: #edf7f0;
    --singles: #1d4ed8; --doubles: #6d28d9; --triples: #be185d; --power: #a15c07; --checkout: #0f766e;
    --focus: #1d4ed8;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: var(--accent); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--accent-fill); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

.display { font: 400 clamp(52px, 9vw, 104px)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.5px; }
.display-md { font: 400 clamp(34px, 5vw, 52px)/1 var(--display); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 18px; }
.accent { color: var(--accent); }
.eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: 20px; color: var(--muted); margin-top: 22px; max-width: 560px; }
.lead.narrow { margin: 0 0 32px; }
.fine { font-size: 14px; color: var(--subtle); margin-top: 16px; }
.muted { color: var(--subtle); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; font: 600 16px/1 var(--sans); text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, opacity .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 18px; }
.btn-block { width: 100%; margin-top: auto; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost { color: var(--ink); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 22px/1 var(--display); text-transform: uppercase; letter-spacing: 0.5px; }
.brand img { border-radius: 9px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 860px) { nav { display: none; } }
@media (max-width: 420px) { .nav-actions .btn-ghost { display: none; } }

/* Hero */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 48px; } }

.hero-visual { position: relative; justify-self: center; padding: 24px 40px; }
.phone { width: 300px; border-radius: 34px; background: var(--surface); border: 1px solid var(--line); padding: 20px 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 12px; }
.phone-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunken); padding: 4px 10px; border-radius: 999px; }
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.player { background: var(--sunken); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; border: 1px solid var(--line); }
.player.is-up { border: 2px solid var(--accent-fill); background: var(--accent-soft); }
.pname { font-weight: 600; font-size: 14px; }
.left { font: 400 44px/1.05 var(--display); }
.pavg { font-size: 12px; color: var(--muted); }
.checkout { display: flex; justify-content: space-between; align-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.checkout .route { font: 400 22px/1 var(--display); letter-spacing: 1px; }
.quick { display: flex; gap: 6px; overflow: hidden; }
.quick span { flex: 1; text-align: center; font-weight: 700; font-size: 13px; padding: 6px 0; border-radius: 999px; border: 1px solid var(--line); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keys span { text-align: center; padding: 10px 0; border-radius: 10px; background: var(--sunken); font: 400 20px/1 var(--display); }
.keys .k-muted { font: 700 14px/20px var(--sans); color: var(--muted); }
.keys .k-accent { background: var(--accent-fill); color: var(--on-accent); font: 700 14px/20px var(--sans); }

.float-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 4px; }
.fc-1 { top: 70px; left: -20px; width: 170px; }
.fc-2 { bottom: 40px; right: -10px; width: 220px; }
.fc-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--subtle); }
.fc-value { font-weight: 700; color: var(--doubles); }
.fc-text { font-size: 14px; line-height: 1.4; }
.bar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.bar span { display: block; height: 100%; width: 72%; background: var(--doubles); border-radius: 99px; }
@media (max-width: 520px) { .hero-visual { padding: 24px 0; } .fc-1 { left: -6px; } .fc-2 { right: -6px; } }

/* Sections */
.band { padding: 88px 0; background: var(--surface); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps h3 { font-size: 20px; margin: 14px 0 8px; }
.steps p { color: var(--muted); }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font: 400 24px/1 var(--display); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature { padding: 88px 0; }
.feature.alt { background: var(--sunken); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-grid > div > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; gap: 32px; } .feature, .band { padding: 64px 0; } }

.ticks { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 18px; }
.cat .dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.cat-singles { color: var(--singles); } .cat-doubles { color: var(--doubles); } .cat-triples { color: var(--triples); }
.cat-power { color: var(--power); } .cat-checkout { color: var(--checkout); }
.cat-checkout { grid-column: span 2; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stats dt { color: var(--subtle); font-weight: 600; font-size: 14px; }
.stats dd { font: 400 48px/1.1 var(--display); }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }
.board li:last-child { border-bottom: 0; }
.board .rank { font: 400 22px/1 var(--display); color: var(--subtle); width: 48px; }
.board .who { flex: 1; }
.board .val { font: 400 24px/1 var(--display); }
.board .me { background: var(--accent-soft); color: var(--accent); }
.board .me .rank { color: var(--accent); }

.bracket { display: flex; flex-direction: column; gap: 12px; }
.match { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.match.me { border: 2px solid var(--accent-fill); }
.match span { display: flex; justify-content: space-between; padding: 12px 16px; font-weight: 600; color: var(--muted); }
.match span + span { border-top: 1px solid var(--line); }
.match .win { color: var(--ink); }
.match b { font: 400 22px/1 var(--display); }
.match .win b { color: var(--accent); }
.final { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: var(--radius); font-weight: 600; }
.final .label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--subtle); }

.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.bubble.user { align-self: flex-end; background: var(--accent-fill); color: var(--on-accent); border: 0; font-weight: 600; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-height: 380px; }
.plan.featured { border: 2px solid var(--accent-fill); }
.plan h3 { font-size: 22px; }
.price { font: 400 40px/1.1 var(--display); min-height: 44px; }
.price-sub { color: var(--muted); font-weight: 600; min-height: 22px; }
.plan .ticks { margin: 12px 0 24px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan { min-height: 0; } }

/* FAQ */
.faq { padding: 88px 0; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 26px/1 var(--display); color: var(--accent); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin-top: 10px; }

.final-cta { padding: 96px 0; background: var(--accent-soft); }
.final-cta .display { margin-bottom: 32px; font-size: clamp(44px, 7vw, 80px); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--subtle); font-size: 15px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
