/* ============================================================================
   Strikr — "live betting terminal × stadium scoreboard"
   Anton (scoreboard display) · Archivo (UI) · JetBrains Mono (odds/addresses)
   ============================================================================ */

:root {
  --bg:        #050705;
  --bg-2:      #080b07;
  --surface:   #0c100a;
  --surface-2: #11160d;
  --raised:    #161c10;
  --line:      #1e261a;
  --line-2:    #2d3a23;
  --txt:       #eef4e7;
  --dim:       #97a589;
  --faint:     #5f6c54;
  --green:     #c5f53f;   /* electric lime — the Strikr bolt */
  --green-2:   #e2ff7a;
  --green-ink: #0c1400;
  --amber:     #ffb020;
  --red:       #ff5e3a;   /* ember — matches the lime, not pastel salmon */
  --pitch:     rgba(197, 245, 63, .055);

  --slip-cut: 9px;

  /* ── design tokens: one source of truth for spacing / radius / controls ── */
  /* spacing scale (4px base) — gaps, margins, card padding */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  /* radius scale */
  --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --radius:   var(--r-lg);          /* cards */
  /* form controls — ONE consistent height / radius / border for every input + button */
  --ctrl-h:      46px;
  --ctrl-px:     14px;
  --ctrl-radius: var(--r-md);
  --ctrl-border: var(--line-2);
  --ctrl-bg:     var(--bg);
  /* card padding */
  --card-pad:    20px;   /* default card content padding */
  --card-pad-sm: 16px;   /* dense cards / rows */

  /* type scale — snap UI text to these (display/Anton sizes use clamp() inline) */
  --fs-micro: 10px;  /* mono uppercase micro-labels */
  --fs-2xs:   11px;
  --fs-xs:    12px;
  --fs-sm:    13px;
  --fs-base:  14px;  /* default body */
  --fs-md:    15px;
  --fs-lg:    18px;  /* card titles / h3 */
  --fs-xl:    22px;

  --shadow:   0 24px 60px -28px rgba(0,0,0,.9);
  --glow:     0 0 0 1px rgba(197,245,63,.24), 0 14px 40px -14px rgba(197,245,63,.4);

  --display: 'Anton', 'Archivo', sans-serif;
  --ui:      'Archivo', ui-sans-serif, system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }

/* Kill the rubber-band overscroll bounce so scrolling past the top no longer
   reveals the fixed glow/grid background layer above the sticky topbar. The
   #050705 fallback matches the topbar in case a browser still shows a sliver. */
html { scroll-behavior: smooth; background: #050705; overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Horizontal clip without creating a scroll container: `hidden` on both html
   and body KILLS wheel scrolling in Chromium (viewport propagation breaks);
   `clip` just clips. iOS needs it on html too. */
html { overflow-x: clip; }

/* Atmosphere: floodlight glows + pitch grid + grain. Fixed so it stays put. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(197,245,63,.16), transparent 60%),
    radial-gradient(820px 480px at 92% -4%, rgba(226,255,122,.10), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 38%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--pitch) 1px, transparent 1px),
    linear-gradient(90deg, var(--pitch) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
}

/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(197,245,63,.3); color: #fff; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ── type ───────────────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--mono);
  font-size: var(--fs-xs); letter-spacing: .26em; text-transform: uppercase;
  color: var(--green); font-weight: 600;
}
.display {
  font-family: var(--display);
  font-weight: 400; line-height: .92; letter-spacing: .005em;
  text-transform: uppercase;
}
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

h2.section {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(30px, 5vw, 56px); line-height: .96; margin: 0;
}

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ui); font-weight: 700; font-size: var(--fs-md);
  min-height: var(--ctrl-h); padding: 0 22px; border-radius: var(--ctrl-radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap; letter-spacing: .01em;
}

/* Number inputs: no spinner arrows, and (with the wheel guard in app.js) no
   scroll-to-change-value — a wheel over a focused stake input was silently
   zeroing what the user typed. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ── canonical form control: ONE look for every input (wrapper + bare) ──────── */
.input {
  display: flex; align-items: center; gap: var(--sp-2);
  height: var(--ctrl-h); padding: 0 var(--ctrl-px);
  background: var(--ctrl-bg); border: 1px solid var(--ctrl-border); border-radius: var(--ctrl-radius);
  transition: border-color .15s;
}
.input:focus-within { border-color: var(--green); }
.input > input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--txt); font-family: var(--ui); font-size: var(--fs-md); }
.input .pfx { color: var(--faint); font-weight: 700; flex: none; }
.input.mono > input, .input.mono .pfx { font-family: var(--mono); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-x {
  background: #fff; color: #000;
  box-shadow: 0 10px 30px -12px rgba(255,255,255,.45);
}
.btn-x:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(255,255,255,.55); }
.btn-primary {
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: var(--green-ink); box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: saturate(.6); }
.btn-ghost { background: var(--surface-2); color: var(--txt); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-sm { min-height: 0; padding: 9px 14px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
/* One async-loading state for every button: the label STAYS visible and a
   spinner joins it (never a bare swap to a spinner or vanished text). */
.btn.loading { pointer-events: none; opacity: .8; transform: none; }
.btn.loading::before {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: rot .7s linear infinite;
}
.xglyph { width: 18px; height: 18px; }

/* ── "Built on Base" badge (official Basemark, Base blue) ───────────────────── */
.base-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 7px 14px 7px 12px; border-radius: var(--r-pill);
  background: rgba(0,82,255,.08); border: 1px solid rgba(0,82,255,.30);
  color: #7aa2ff; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: border-color .18s, background .18s, box-shadow .18s, color .18s, transform .18s;
}
.base-badge svg { flex: none; }
/* footer: brand + Base badge grouped on the left, aligned with the link row */
.foot-brand { display: inline-flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.base-badge:hover {
  border-color: #0052ff; background: rgba(0,82,255,.16); color: #fff;
  box-shadow: 0 0 26px -6px rgba(0,82,255,.6); transform: translateY(-1px);
}

/* ── pills / chips ──────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; font-family: var(--mono);
  border: 1px solid var(--line-2); color: var(--dim);
}
.pill.Won, .pill.confirmed { background: rgba(197,245,63,.13); color: var(--green); border-color: rgba(197,245,63,.3); }
.pill.Lost, .pill.failed   { background: rgba(255,94,58,.12); color: var(--red); border-color: rgba(255,94,58,.3); }
.pill.pending, .pill\.dry-run, .pill.quoted, .pill.Refunded { background: rgba(255,176,32,.12); color: var(--amber); border-color: rgba(255,176,32,.3); }
.pill.live { background: rgba(255,176,32,.14); color: var(--amber); border-color: rgba(255,176,32,.34); }
.pill.live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: pulse 1.3s infinite; }
.pill.combo { background: rgba(197,245,63,.1); color: var(--green); border-color: rgba(197,245,63,.26); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.odds {
  font-family: var(--mono); font-weight: 700; font-size: var(--fs-base);
  color: var(--green); background: rgba(197,245,63,.08);
  border: 1px solid rgba(197,245,63,.2); border-radius: var(--r-sm); padding: 4px 9px;
}

/* ── cards / betting slip ───────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Torn-ticket slip: notched left/right edges via radial masks */
.slip { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.slip::before, .slip::after {
  content: ""; position: absolute; top: 50%; width: var(--slip-cut); height: calc(var(--slip-cut) * 2);
  background: var(--bg); border: 1px solid var(--line-2);
  transform: translateY(-50%);
}
.slip::before { left: calc(var(--slip-cut) * -1 - 1px); border-radius: 0 99px 99px 0; border-left: 0; }
.slip::after  { right: calc(var(--slip-cut) * -1 - 1px); border-radius: 99px 0 0 99px; border-right: 0; }

/* ── topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); background: rgba(5,7,5,.88);
  border-bottom: 1px solid var(--line);
}
.topbar .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-size: 24px; letter-spacing: .02em; text-transform: uppercase; }
.brand .mark {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: #050705; border: 1px solid var(--line-2); box-shadow: var(--glow);
}
.brand .mark img { width: 21px; height: 21px; filter: drop-shadow(0 0 7px rgba(197,245,63,.5)); }
.brand .soon { font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .14em; color: var(--green); border: 1px solid rgba(197,245,63,.3); border-radius: 6px; padding: 2px 6px; align-self: center; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--dim); font-weight: 600; font-size: var(--fs-base); transition: color .15s; }
.nav-links a:hover { color: var(--txt); }

/* ── ticker marquee ─────────────────────────────────────────────────────── */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(10,14,12,.6); overflow: hidden; }
.ticker .track { display: inline-flex; gap: 40px; padding: 11px 0; white-space: nowrap; animation: marquee 160s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.ticker .item { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--dim); }
.ticker .item b { color: var(--txt); font-weight: 700; }
.ticker .sep { color: var(--faint); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── footer ─────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); margin-top: 90px; padding: 40px 0 56px; color: var(--dim); font-size: var(--fs-base); }
footer .row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer .flinks { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer .flinks a { color: var(--dim); font-size: var(--fs-sm); transition: color .15s; }
footer .flinks a:hover { color: var(--green); }
footer .legalnote { width: 100%; color: var(--faint); font-size: var(--fs-xs); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 26px; }
.age { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 6px; font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700; color: var(--green); }

/* ── legal / content pages ──────────────────────────────────────────────── */
.legal { max-width: 800px; margin: 0 auto; padding: 48px 0 90px; }
.legal h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(34px, 6vw, 54px); line-height: .95; margin: 14px 0 6px; }
.legal .updated { color: var(--faint); font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .04em; margin-bottom: 30px; }
.legal h2 { font-size: var(--fs-lg); font-weight: 800; color: var(--txt); margin: 34px 0 10px; }
.legal p, .legal li { color: var(--dim); font-size: var(--fs-md); line-height: 1.72; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--green); }
.legal strong { color: var(--txt); }
.legal .callout { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin: 0 0 22px; }
.legal .callout.warn { border-color: rgba(255,176,32,.34); background: rgba(255,176,32,.06); }
.legal .callout p:last-child { margin-bottom: 0; }
.backlink { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: var(--fs-sm); font-weight: 600; }
.backlink:hover { color: var(--green); }

/* ── utility ────────────────────────────────────────────────────────────── */
.muted { color: var(--dim); }
.hide { display: none !important; }
.center { text-align: center; }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--green); border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ── toast ──────────────────────────────────────────────────────────────── */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 12px 18px; box-shadow: var(--shadow); font-size: var(--fs-base); font-weight: 600;
  max-width: 90vw; animation: toastin .25s ease;
}
.toast.ok { border-color: rgba(197,245,63,.4); }
.toast.err { border-color: rgba(255,94,58,.4); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* reveal on load */
[data-reveal] { opacity: 0; transform: translateY(16px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* skeleton shimmer (shared) */
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); display: inline-block; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(197,245,63,.06) 45%, rgba(255,255,255,.05) 55%, transparent);
  animation: shimmer 1.5s infinite; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  body { font-size: var(--fs-md); }
  .wrap { padding: 0 16px; }
  .topbar .inner { height: 58px; }
  .brand { font-size: var(--fs-xl); gap: 9px; }
  .brand .soon { display: none; }
  .btn { padding: 12px 18px; font-size: var(--fs-base); }
  h2.section { font-size: clamp(28px, 8vw, 44px); }
  .ticker .track { gap: 26px; }
  footer { margin-top: 60px; padding: 32px 0 44px; }
  footer .row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .toast { font-size: var(--fs-sm); padding: 11px 15px; }
}
