/* ═══════════════════════════════════════════════════════════
   FloorRadar — "The Local" (Design Spec v3)
   Anchored to docs/DESIGN-SPEC-v3-THE-LOCAL.md

   The hero is the room. The rest of the page is the paper.
   Tungsten exists ONLY inside a --board band. Green and red
   are data only. Every ratio in the spec is measured.

   Marketing homepage only. Does not touch the app.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@400;700;800&family=Source+Sans+3:wght@400;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* ─── Paper: every light surface ─────────────────── */
    --paper:#F3F1EC;          /* warm stock, chroma 7 — clear of the cream family */
    --shade:#E7E3DA;
    --ink:#1C1815;            /* 15.62:1 on paper */
    --ink-2:#55504A;          /* 7.07:1 on paper */
    --up:#177245;             /* 5.27:1 — DATA ONLY */
    --down:#A62C1C;           /* 6.20:1 — DATA ONLY */
    --rule:rgba(28,24,21,.16);
    --rule-2:rgba(28,24,21,.34);

    /* ─── The room: the one dark band ────────────────── */
    --board:#16100E;          /* sampled from the reference photograph */
    --board-text:#F2EAE0;     /* 15.81:1 */
    --board-muted:#C9BCB0;    /* 10.14:1 */
    --tungsten:#C1762E;       /* 5.29:1 — HERO BAND ONLY */
    --tungsten-hi:#E08A33;
    --up-d:#5FBF8E;           /* 8.37:1 */
    --down-d:#EE7A63;         /* 6.82:1 */

    --font-display:Bitter, Georgia, serif;
    --font-body:'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.frame { max-width: 1140px; margin: 0 auto; padding: 0 28px; position: relative; }
@media (max-width: 640px) { .frame { padding: 0 20px; } }

/* Reveal is a no-op by design — v3 drops scroll-reveal-on-everything.
   home.js still adds .js-motion and .is-visible; without a hiding rule
   here, content is simply always visible. */

/* ─── Type ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.015em; margin: 0; }
h1 { font-size: 48px; line-height: 1.08; }
h2 { font-size: 31px; line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.28; font-weight: 700; }
p { margin: 0 0 14px; max-width: 65ch; }
a { color: inherit; }
@media (max-width: 640px) {
    h1 { font-size: 32px; } h2 { font-size: 25px; } h3 { font-size: 19px; }
    body { font-size: 17px; }
}

.eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .13em;
    text-transform: uppercase; color: var(--ink-2); margin: 0 0 16px;
    display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--rule-2); flex: 0 0 auto; }

/* ─── Section rhythm: rules, not boxes ───────────────── */
.sec { padding: 62px 0; border-top: 2px solid var(--ink); }
.sec:first-of-type { border-top: 0; }
@media (max-width: 640px) { .sec { padding: 42px 0; } }

/* ─── CTAs — hierarchy is structural, no accent on light ─ */
.cta-1, .cta-2 {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 14px 26px; border-radius: 2px;
    font-family: var(--font-body); font-weight: 600; font-size: 16px;
    text-decoration: none; border: 2px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cta-1 { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cta-1:hover { background: #000; border-color: #000; }
.cta-1:active { transform: translateY(1px); }
.cta-2 { background: transparent; color: var(--ink); border-color: var(--ink); }
.cta-2:hover { background: var(--shade); }
.cta-3 {
    color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none;
    border-bottom: 1px solid var(--ink); padding-bottom: 1px;
}
.cta-3:hover { border-bottom-width: 2px; }
.ctarow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ═══ TOPBAR ═════════════════════════════════════════════ */
.topbar { padding: 22px 0 20px; background: var(--board); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--board-text); }
.brand-mark { width: 26px; height: 26px; flex: 0 0 auto; display: inline-block; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
/* topbar.css:75-82 sets .brand-name italic + --ink. Same specificity, so v3
   wins by load order — but only for properties it actually declares. Reset
   font-style and colour explicitly or the old italic serif survives. */
.brand-name {
    font-family: var(--font-display); font-weight: 800; font-size: 20px;
    letter-spacing: -.01em; font-style: normal; color: var(--board-text);
}
.topbar-nav { display: flex; align-items: center; gap: 22px; }
.topbar-nav a { color: var(--board-muted); text-decoration: none; font-size: 15.5px; font-weight: 600; }
.topbar-nav a:hover { color: var(--board-text); }
/* topbar.css is the single source of truth for the topbar and is token-driven,
   but several of its rules are !important (e.g. :123 color: var(--ink-soft)).
   Rather than fight them, remap the tokens it reads — scoped to .topbar only,
   so the rest of the page keeps its paper values. Dropping base.css left
   --ink-soft and --accent undefined, which is what made "Sign in" collapse to
   inherited dark-on-dark. */
.topbar {
    --ink: var(--board-text);
    --ink-soft: var(--board-muted);
    --paper: #160E08;
    --accent: var(--tungsten);
    --rule: rgba(242,234,224,.16);
}
.topbar-nav a.topbar-cta { border-radius: 2px !important; }
@media (max-width: 820px) { .topbar-nav { gap: 14px; } .topbar-nav a { font-size: 14.5px; } }

/* ═══ HERO — the room ════════════════════════════════════ */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--board); color: var(--board-text);
}
.hero-photo {
    position: absolute; inset: 0; z-index: 0;
    background-image: var(--hero-img); background-size: cover; background-position: 64% 56%;
}
.hero-scrim {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(100deg, #16100E 0%, rgba(22,16,14,.95) 32%,
                rgba(22,16,14,.72) 52%, rgba(22,16,14,.42) 100%);
}
.hero-inner {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 6.6fr 5.4fr; gap: 40px; align-items: center;
    padding: 66px 0 70px;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 44px; } }
.hero .eyebrow { color: var(--tungsten-hi); }
.hero .eyebrow::before { background: var(--tungsten); }
.hero h1 { color: var(--board-text); max-width: 14ch; margin-bottom: 16px; }
.hero-sub { font-size: 18.5px; color: var(--board-muted); max-width: 44ch; margin: 0 0 26px; }
.hero .cta-1 { background: var(--tungsten); color: #160E08; border-color: var(--tungsten); }
.hero .cta-1:hover { background: var(--tungsten-hi); border-color: var(--tungsten-hi); }
.hero .cta-2 { color: var(--board-text); border-color: rgba(242,234,224,.4); }
.hero .cta-2:hover { background: transparent; border-color: var(--board-text); }
.hero-note { font-size: 14.5px; color: var(--board-muted); margin: 22px 0 0; max-width: 46ch; }

/* ─── The standings object ───────────────────────────── */
.standings { border-top: 2px solid currentColor; }
.standings-cap {
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em;
    text-transform: uppercase; padding: 9px 0 10px; margin: 0; opacity: .78;
}
table.standings-t { border-collapse: collapse; width: 100%; font-size: 15px; }
table.standings-t thead th {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
    text-align: left; padding: 0 8px 7px; border-bottom: 2px solid currentColor; opacity: .74; font-weight: 500;
}
table.standings-t thead th.n { text-align: right; }
table.standings-t tbody td {
    padding: 9px 8px; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
table.standings-t tbody td.nm { font-family: var(--font-body); font-size: 15.5px; }
table.standings-t tbody td.n { text-align: right; white-space: nowrap; }
table.standings-t tbody td.rk { font-family: var(--font-display); font-weight: 800; font-size: 18px; width: 2.4em; }
table.standings-t tbody tr:last-child td { border-bottom: 0; }
tbody tr.is-you td.nm::after { content: " — you"; opacity: .62; font-weight: 400; font-size: 13px; }

/* on the board */
.hero .standings {
    background: rgba(20,14,12,.88); border: 1px solid rgba(242,234,224,.18);
    border-top-width: 2px; border-top-color: var(--board-text);
    padding: 0 18px 6px; backdrop-filter: blur(3px);
}
.hero .standings-cap { padding-top: 12px; }
.hero table.standings-t tbody td { border-bottom: 1px solid rgba(242,234,224,.16); }
.hero table.standings-t tbody tr.is-you td { background: rgba(242,234,224,.09); font-weight: 600; }
.hero .up { color: var(--up-d); font-weight: 600; }
.hero .down { color: var(--down-d); font-weight: 600; }

/* on paper */
.standings--paper table.standings-t thead th { background: var(--shade); }
.standings--paper table.standings-t tbody td { border-bottom: 1px solid var(--rule); }
.standings--paper table.standings-t tbody tr.is-you td { background: var(--shade); font-weight: 600; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }

/* ═══ STATS ══════════════════════════════════════════════ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 26px; }
.stat-v {
    font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1;
    font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.stat-v small { font-size: .45em; font-weight: 700; margin-left: 3px; }
.stat-l { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-2); margin: 8px 0 0; line-height: 1.45; }
@media (max-width: 640px) { .stat-v { font-size: 32px; } }

/* ═══ RANK NUMERAL — the asymmetry device ════════════════ */
.figrow { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: start; margin: 26px 0 0; }
@media (max-width: 760px) { .figrow { grid-template-columns: 1fr; gap: 10px; } }
.fig {
    font-family: var(--font-display); font-weight: 800; font-size: 92px; line-height: .86;
    letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fig .of { font-size: .42em; color: var(--ink-2); }
.fig small {
    display: block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 400;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-top: 12px; line-height: 1.45;
}
@media (max-width: 760px) { .fig { font-size: 48px; } }

/* ═══ TWO-COLUMN COMPARISON (TO portal gap) ══════════════ */
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 26px; }
@media (max-width: 820px) { .split2 { grid-template-columns: 1fr; gap: 24px; } }
.col-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-2); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.col-list { list-style: none; margin: 0; padding: 0; }
.col-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.col-list li:last-child { border-bottom: 0; }
.lead-line { font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1.2;
    margin: 0 0 6px; max-width: 22ch; }
.kicker { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 30px 0 0;
    padding-left: 18px; border-left: 3px solid var(--ink); max-width: 40ch; }

/* ═══ PRODUCT SHOTS — framed flat ════════════════════════ */
.shot { margin: 34px 0 0; border: 1px solid var(--rule-2); background: var(--shade); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ink-2); padding: 9px 12px; border-top: 1px solid var(--rule); }

/* ═══ PLAYBOOKS ══════════════════════════════════════════ */
.pb-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; margin-bottom: 10px; }
@media (max-width: 820px) { .pb-head { grid-template-columns: 1fr; gap: 12px; } }
.pb-list { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: pb; }
.pb-item { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: start;
    padding: 24px 0; border-top: 1px solid var(--rule); counter-increment: pb; }
.pb-item::before {
    content: counter(pb, decimal-leading-zero);
    font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: .9;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .pb-item { grid-template-columns: 1fr; gap: 6px; }
    .pb-item::before { font-size: 34px; } }

/* ═══ PROOF ══════════════════════════════════════════════ */
.proof-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: start; margin-top: 22px; }
@media (max-width: 820px) { .proof-grid { grid-template-columns: 1fr; gap: 22px; } }
blockquote.proof { margin: 0; padding-left: 20px; border-left: 3px solid var(--ink); }
.proof-q { font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.4; margin: 0 0 12px; }
.proof-c { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--ink-2); font-style: normal; }
.proof-disc { font-size: 16.5px; color: var(--ink-2); }

/* ═══ CLOSER ═════════════════════════════════════════════ */
.closer { background: var(--shade); border-top: 2px solid var(--ink); padding: 56px 0; }
.closer-grid { display: grid; grid-template-columns: 1.4fr auto; gap: 36px; align-items: center; }
@media (max-width: 820px) { .closer-grid { grid-template-columns: 1fr; gap: 22px; } }
.closer h2 { max-width: 20ch; }
.closer-sub { color: var(--ink-2); margin: 10px 0 0; }

/* ═══ FOOTER ═════════════════════════════════════════════ */
.footer { background: var(--board); color: var(--board-muted); padding: 46px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--board-text); }
.footer-brand .brand-mark { width: 22px; height: 22px; }
.footer-wm { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.footer-pitch { font-size: 15.5px; margin: 12px 0 0; max-width: 40ch; }
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a { color: var(--board-muted); text-decoration: none; font-size: 15.5px; }
.footer-nav a:hover { color: var(--board-text); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 16px;
    border-top: 1px solid rgba(242,234,224,.16); font-family: var(--font-mono); font-size: 11.5px;
    letter-spacing: .06em; color: var(--board-muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Fixes a pre-existing bug: css/topbar.css:187 zeroes .topbar .frame padding
   below 640px (specificity 0,2,0) which clipped the brand mark at x=0 on every
   phone. local.css loads after topbar.css, so a matching selector wins. */
@media (max-width: 640px) {
    .topbar .frame { padding-left: 20px; padding-right: 20px; }
}
