/* The public site: Home, How it works, Pricing, Trust, FAQ.
 *
 * Loaded by those five templates only, after components.css. Everything is
 * prefixed site- so nothing here can reach an app page, and every colour is a
 * semantic token -- dark mode is the token remap, not a second copy of this file.
 *
 * Two exceptions, both deliberate:
 * - .site-deep panels are dark in both themes, like the old landing page's trust
 *   band, so the privacy promise and the Pro plan read as their own chapter.
 *   Their colours are fixed values chosen for AA on #0c2b2f, and live as local
 *   custom properties on the panel so the fixed set is visible in one place.
 * - Display type is the body stack at weight 800 with tight tracking, not a
 *   webfont. tokens.css explains why: the product does not phone home.
 */

/* The masthead, tab bar and footer sit outside <main>, so the shared measures
   are declared on all four roots rather than on .site-page alone. */
.site-page, .site-bar, .site-foot, .site-tabs {
  --site-max: 1120px;
  --site-gutter: clamp(16px, 4vw, 40px);
  --site-display: var(--font-body);
}

/* ---------- masthead ---------- */
.site-bar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-bar-inner {
  max-width: calc(var(--site-max) + 2 * var(--site-gutter));
  margin: 0 auto; padding: 0 var(--site-gutter);
  height: 72px; display: flex; align-items: center; gap: var(--sp-5);
}
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 800 1.0625rem/1 var(--site-display); letter-spacing: -0.02em; }
.site-mark {
  position: relative; width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; background: var(--ink); color: var(--ink-inverse);
  font: 800 1rem/1 var(--site-display);
}
.site-mark i { position: absolute; right: 6px; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--emphasis); }
.site-where { display: none; }

.site-nav { display: flex; align-self: stretch; margin: 0 auto; }
.site-nav a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 0 14px;
  color: var(--ink-muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav-n { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-subtle); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.site-nav a[aria-current="page"] .site-nav-n { color: var(--emphasis); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--ink);
}
.site-actions { display: flex; align-items: center; gap: var(--sp-4); }
.site-link { color: var(--ink-muted); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.site-link:hover { color: var(--ink); }
.site-btn-short { display: none; }

.site-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.site-btn-accent { background: var(--accent-gradient); color: var(--accent-ink); box-shadow: var(--surface-sheen), var(--accent-glow); }
.site-btn-accent:hover { color: var(--accent-ink); transform: translateY(-1px); }
.site-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.site-btn-ghost:hover { color: var(--ink); background: var(--surface-sunken); }
.site-btn .line-icon { flex: none; }

/* ---------- page frame ---------- */
/* One family for every heading on these pages. The cards Pricing and Trust
   reuse from components.css set theirs in the serif display stack, which sat
   oddly under the sans plates. */
.site-page :is(h1, h2, h3) { font-family: var(--site-display); font-weight: 800; letter-spacing: -0.02em; }
.site-plate .toolbar { margin-top: var(--sp-5); }
.site-page.shell {
  max-width: calc(var(--site-max) + 2 * var(--site-gutter));
  padding: 0 max(var(--site-gutter), env(safe-area-inset-right)) 0 max(var(--site-gutter), env(safe-area-inset-left));
}
.site-section { padding: var(--sp-8) 0; }
.site-kicker { margin: 0 0 var(--sp-4); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-subtle); }
.site-display { font-family: var(--site-display); font-weight: 800; letter-spacing: -0.035em; color: var(--ink); }
.site-display em { font-style: normal; color: var(--accent); }

/* The "you are here" plate */
.site-plate { padding: var(--sp-8) 0 var(--sp-7); border-bottom: 1px solid var(--line); }
.site-locator { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; }
.site-locator b { color: var(--ink); }
.site-locator-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emphasis); flex: none; }
.site-locator-bar { position: relative; width: 120px; height: 2px; background: var(--line-strong); }
.site-locator-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.site-locator-count { color: var(--ink-subtle); font-weight: 600; }
.site-plate h1 { margin: 0; max-width: 16ch; font: 800 clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem)/1 var(--site-display); letter-spacing: -0.04em; }
.site-plate h1 em { font-style: normal; color: var(--accent); }
.site-plate .site-lede { margin: 20px 0 0; max-width: 40rem; font-size: 1.25rem; line-height: 1.5; color: var(--ink-muted); }

/* Previous / next */
.site-pager { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-5); padding: var(--sp-6) 0; border-top: 1px solid var(--line); }
.site-pager a { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.site-pager small { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.site-pager strong { display: flex; align-items: center; gap: 12px; font: 800 1.75rem/1.1 var(--site-display); letter-spacing: -0.02em; }
.site-pager a:hover strong { color: var(--accent); }
.site-pager-next { align-items: flex-end; text-align: right; }
.site-pager-prev .line-icon { transform: rotate(180deg); }

.site-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3) var(--sp-5);
  max-width: calc(var(--site-max) + 2 * var(--site-gutter)); margin: 0 auto;
  padding: var(--sp-5) var(--site-gutter) var(--sp-6); border-top: 1px solid var(--line);
  font-size: 0.8125rem; color: var(--ink-subtle);
}
.site-foot-links { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-foot a { color: var(--ink-muted); }

/* ---------- cards and the fixed dark panel ---------- */
.site-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.site-deep {
  --deep-bg: #0c2b2f; --deep-ink: #f2f7f7; --deep-muted: #b7c7c9; --deep-subtle: #8fa6a9;
  --deep-accent: #7ee0d8; --deep-line: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #0f3338 0%, var(--deep-bg) 100%); color: var(--deep-muted);
  border-radius: var(--radius-lg);
}
.site-deep strong, .site-deep h2, .site-deep h3 { color: var(--deep-ink); }

/* ---------- Home ---------- */
.site-hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: center; padding: var(--sp-8) 0 var(--sp-8); }
.site-hero .site-kicker { color: var(--accent); }
.site-hero h1 { margin: 0; font: 800 clamp(2.5rem, 1.3rem + 3.4vw, 3.875rem)/1.02 var(--site-display); letter-spacing: -0.04em; }
.site-hero h1 em { font-style: normal; color: var(--accent); }
.site-hero h1 .site-line { display: block; }
.site-hero .site-lede { margin: 24px 0 0; max-width: 31rem; font-size: 1.25rem; line-height: 1.5; color: var(--ink-muted); }

.site-signup { margin-top: 36px; max-width: 500px; }
.site-signup-form {
  display: flex; gap: 8px; padding: 6px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.site-signup-form input {
  flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: 0 18px;
  font: inherit; font-size: 1rem; color: var(--ink);
}
.site-signup-form input:focus { outline: none; }
.site-signup-form:focus-within { box-shadow: var(--shadow-md), var(--focus-ring); }
.site-signup .message { margin: 10px 0 0 22px; min-height: 0; }
.site-signup-alt { margin: 14px 0 0 22px; font-size: 0.875rem; color: var(--ink-subtle); }
.site-signup-alt a { color: var(--ink); font-weight: 600; }
.site-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 36px 0 0; padding: 0; list-style: none; }
.site-facts li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-muted); }
.site-facts .line-icon { color: var(--accent); }

/* The answer ticket: the demo Weekly Answer, filled live from the public endpoint. */
.site-ticket-stage { position: relative; }
.site-court { position: absolute; inset: -60px -140px -60px -60px; width: auto; height: auto; color: var(--line-strong); pointer-events: none; }
.site-ticket { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); }
.site-ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; background: var(--ink); color: var(--ink-inverse); }
.site-ticket-head b { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-ticket-head span { font-size: 0.75rem; opacity: 0.75; }
.site-ticket-body { padding: 26px 24px 22px; }
.site-ticket-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.site-player { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.site-verb { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--ink); color: var(--ink-inverse); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.site-move { margin: 6px 0 0; font: 800 2.125rem/1 var(--site-display); letter-spacing: -0.03em; color: var(--ink); }
.site-why { margin: 14px 0 0; font-size: 0.9375rem; color: var(--ink-muted); }
.site-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; min-height: 28px; }
.site-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: 0.8125rem; font-weight: 700; }
.site-perf { position: relative; margin: 0 24px; border-top: 2px dashed var(--line-strong); }
.site-perf::before, .site-perf::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--canvas); border: 1px solid var(--line); }
.site-perf::before { left: -37px; } .site-perf::after { right: -37px; }
.site-ticket-grid { display: grid; grid-template-columns: 1fr 1fr; }
.site-ticket-cell { padding: 18px 24px 22px; min-width: 0; }
.site-ticket-cell + .site-ticket-cell { border-left: 1px solid var(--line); }
.site-ticket-cell small { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-subtle); }
.site-ticket-cell strong { display: block; margin-top: 8px; font-size: 1rem; color: var(--ink); }
.site-meter { display: flex; gap: 4px; margin-top: 10px; }
.site-meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-strong); }
.site-meter i[data-on] { background: var(--emphasis); }
.site-backup { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.site-backup strong { margin: 0; white-space: nowrap; }
.site-backup em { display: block; margin-top: 2px; font-style: normal; font-size: 0.75rem; color: var(--ink-subtle); }
.site-ticket-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-sunken); font-size: 0.8125rem; color: var(--ink-muted); }
.site-ticket-foot i { width: 6px; height: 6px; border-radius: 50%; background: var(--emphasis); flex: none; }
.site-ticket .button { margin: 0 24px 20px; }
.site-ticket[data-state="loading"] .site-move,
.site-ticket[data-state="loading"] .site-why { color: transparent; border-radius: 6px; background: var(--surface-sunken); }

/* Player portraits. Official NBA headshots, shipped as this site's own files
 * so the browser never asks a CDN for a player (test_player_headshots pins
 * that). Unknown players fall back to initials on the same tile. */
.site-face {
  position: relative; flex: none; display: grid; place-items: center; overflow: hidden;
  width: 76px; height: 76px; border-radius: 18px;
  background: linear-gradient(180deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, transparent));
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--accent); font: 800 1.375rem/1 var(--site-display);
}
.site-face img { position: absolute; left: 50%; top: 4%; height: 118%; width: auto; max-width: none; transform: translateX(-50%); }
.site-face-sm { width: 36px; height: 36px; border-radius: 10px; font-size: 0.8125rem; }
.site-face-xs { width: 30px; height: 30px; border-radius: 8px; font-size: 0.75rem; }

/* Doors to the other pages */
.site-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: var(--sp-8); }
.site-door { display: flex; flex-direction: column; gap: 14px; min-height: 196px; padding: 28px; text-decoration: none; color: var(--ink-muted);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }
.site-door:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink-muted); }
.site-door-n { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-subtle); }
.site-door h2 { margin: 0; font: 800 1.625rem/1.1 var(--site-display); letter-spacing: -0.02em; color: var(--ink); }
.site-door p { margin: 0; font-size: 0.9375rem; }
.site-door-go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; font-weight: 700; color: var(--accent); }
.site-door.site-deep h2 { color: var(--deep-ink); }
.site-door.site-deep p { color: var(--deep-muted); }
.site-door.site-deep .site-door-n { color: var(--deep-subtle); }
.site-door.site-deep .site-door-go { color: var(--deep-accent); }
.site-door.site-deep:hover { color: var(--deep-muted); }

/* ---------- How it works ---------- */
.site-steps { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.site-step { display: flex; flex-direction: column; gap: 14px; padding: 36px 32px 32px; }
.site-step + .site-step { border-left: 1px solid var(--line); }
.site-step-n { font: 800 4rem/0.9 var(--site-display); letter-spacing: -0.04em; color: var(--accent); }
.site-step h2 { margin: 0; font: 800 1.5rem/1.15 var(--site-display); letter-spacing: -0.02em; color: var(--ink); }
.site-step p { margin: 0; font-size: 0.9375rem; color: var(--ink-muted); }
.site-after { display: flex; align-items: center; gap: 24px; margin-top: 24px; padding: 24px 32px; }
.site-after-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--deep-line); color: var(--deep-accent); }
.site-after strong { display: block; font: 800 1.25rem/1.2 var(--site-display); }
.site-after p { margin: 4px 0 0; }
.site-after .site-btn { margin-left: auto; background: #ffffff; color: #0c2b2f; }
.site-tour-section { padding-top: 0; }
.site-tour-section .app-tour { margin: 0; }

/* ---------- Pricing ---------- */
.site-page .plan-panel-featured { --deep-ink: #f2f7f7; }
.site-detail-head { margin-bottom: var(--sp-5); }
.site-detail-head h2 { margin: 0; font: 800 clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem)/1.05 var(--site-display); letter-spacing: -0.03em; }
.site-detail-head p { margin: 10px 0 0; max-width: 40rem; color: var(--ink-muted); }

/* ---------- Trust ---------- */
.site-promises { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; padding: 0; list-style: none; }
.site-promise { display: flex; gap: 24px; padding: 32px; }
.site-promise-n { flex: none; font: 800 2.75rem/0.9 var(--site-display); letter-spacing: -0.04em; color: var(--ink-subtle); opacity: 0.55; }
.site-promise h2 { margin: 0; font: 800 1.375rem/1.2 var(--site-display); letter-spacing: -0.02em; color: var(--ink); }
.site-promise p { margin: 8px 0 0; font-size: 0.9375rem; color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.site-page .faq-layout { margin: 0; }

/* ---------- phone tab bar ---------- */
.site-tabs { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1079px) {
  .site-nav-n, .site-link-app { display: none; }
  .site-nav a { padding: 0 10px; }
  .site-nav a[aria-current="page"]::after { left: 10px; right: 10px; }
  .site-hero { grid-template-columns: 1fr; gap: var(--sp-7); }
  .site-ticket-stage { max-width: 460px; }
  .site-doors, .site-steps,   .site-step + .site-step { border-left: 0; border-top: 1px solid var(--line); }
  .site-promises { grid-template-columns: 1fr; }
}

@media (max-width: 719px) {
  .site-bar-inner { height: 60px; gap: 12px; }
  .site-brand-name, .site-nav, .site-link, .site-btn-long { display: none; }
  .site-btn-short { display: inline; }
  .site-actions { margin-left: auto; }
  .site-actions .site-btn { min-height: 38px; padding: 0 16px; }
  .site-where { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .site-where small { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em; color: var(--emphasis); }
  .site-where b { font: 800 1.0625rem/1 var(--site-display); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .site-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--canvas) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .site-tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 52px; border-radius: 12px; text-decoration: none;
    color: var(--ink-subtle); font-size: 0.6875rem; font-weight: 600;
  }
  .site-tabs svg { width: 22px; height: 22px; }
  .site-tabs a[aria-current="page"] { color: var(--ink); font-weight: 800; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
  .site-tabs a[aria-current="page"] svg { color: var(--emphasis); }
  /* Keep the last of the page -- footer, theme toggle, install button -- clear of the bar. */
  body:has(.site-tabs) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* The masthead already names the page on a phone, so the plate drops its locator. */
  .site-locator { display: none; }
  .site-plate { padding: var(--sp-6) 0 var(--sp-5); }
  .site-plate .site-lede { font-size: 1.0625rem; margin-top: 12px; }
  .site-section { padding: var(--sp-6) 0; }

  .site-hero { padding: var(--sp-6) 0; }
  .site-hero .site-kicker { margin-bottom: var(--sp-3); }
  .site-hero h1 .site-line { display: inline; }
  .site-hero .site-lede { font-size: 1.0625rem; margin-top: 14px; }
  .site-signup { margin-top: 22px; }
  .site-signup-form { flex-direction: column; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
  .site-signup-form:focus-within { box-shadow: none; }
  .site-signup-form input { min-height: 52px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
  .site-signup-form input:focus { box-shadow: var(--focus-ring); }
  .site-signup-form .site-btn { min-height: 52px; border-radius: 14px; }
  .site-signup-alt, .site-signup .message { margin-left: 0; text-align: center; }
  .site-facts { margin-top: 20px; gap: 8px 16px; }
  .site-court { display: none; }
  .site-move { font-size: 1.75rem; }
  .site-player .site-face { width: 64px; height: 64px; border-radius: 16px; }
  .site-ticket-foot [data-long] { display: none; }

  .site-doors { gap: 0; padding-bottom: var(--sp-5); border-top: 1px solid var(--line); }
  .site-door, .site-door.site-deep { min-height: 0; padding: 18px 0; gap: 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; color: var(--ink-muted); }
  .site-door:hover { transform: none; box-shadow: none; }
  .site-door h2, .site-door.site-deep h2 { font-size: 1.1875rem; color: var(--ink); }
  .site-door p { display: none; }
  .site-door.site-deep .site-door-n { color: var(--ink-subtle); }
  .site-door.site-deep p { color: var(--ink-muted); }
  .site-door.site-deep .site-door-go { color: var(--accent); }
  .site-door-go { margin-top: 4px; }

  .site-step { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; padding: 20px; }
  .site-step-n { font-size: 2.5rem; width: 52px; }
  .site-step > div { flex: 1; min-width: 0; }
  .site-after { flex-direction: column; align-items: flex-start; padding: 22px; }
  .site-after .site-btn { margin-left: 0; width: 100%; }
  .site-promise { padding: 20px; gap: 16px; }
  .site-promise-n { font-size: 2rem; }
  .site-pager strong { font-size: 1.25rem; }
  .site-pager .site-pager-prev { display: none; }
  .site-pager { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .site-btn, .site-door { transition: none; }
}

/* The tour heading is an h2 on its own page; it was an h3 inside the old landing scroll. */
.site-tour-section .tour-head h2 { margin: 0; font: 800 clamp(1.5rem, 1.1rem + 1.2vw, 2rem)/1.1 var(--site-display); letter-spacing: -0.02em; }
