/* Front page (index.html).
   Separate from css/style.css on purpose: style.css pins body to 100vh with
   overflow hidden, because the map is a fixed full-viewport app. This page is an
   ordinary document that scrolls, so the two cannot share a body rule. What they
   do share is the palette, in css/tokens.css — link that first. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.hidden {
    display: none !important;
}

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--panel-border);
}

.nav-brand {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.btn-accent {
    background: var(--accent);
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(233, 69, 96, 0.32);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.42);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary) !important;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 7px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 50px;
}

/* ---------- Hero ---------- */
.hero {
    background: var(--panel-bg);
    color: var(--text-primary);
    padding: 84px 0 72px;
    /* A faint accent wash behind the headline, so the hero is not a flat slab of
       navy. radial-gradient rather than an image: no extra request. */
    background-image: radial-gradient(circle at 18% 0%, rgba(233, 69, 96, 0.22), transparent 55%);
    border-bottom: 1px solid var(--panel-border);
}

.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 58px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.6px;
    color: #fff;
    margin-bottom: 22px;
}

.hero h1 .hl {
    color: var(--accent);
}

.lede {
    max-width: 62ch;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

/* ---------- Stats ---------- */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.stat-num {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -1px;
    /* Tabular figures so the number does not visibly reflow when the live count
       replaces the em-dash placeholder. */
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stats-fallback {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 15px;
    color: var(--text-secondary);
}

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.section-lede {
    max-width: 60ch;
    font-size: 16px;
    color: #55556b;
    margin-bottom: 44px;
}

.section-dark {
    background: var(--panel-bg);
    color: var(--text-primary);
}

.section-dark h2 {
    color: #fff;
}

.section-dark .section-lede {
    color: var(--text-secondary);
}

/* ---------- Steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    list-style: none;
}

.step {
    background: #fff;
    border: 1px solid #e2e2ec;
    border-radius: 14px;
    padding: 26px 24px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.step h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 14.5px;
    color: #55556b;
}

/* ---------- Category grid ---------- */
.filter-note {
    margin-top: 56px;
    padding: 28px;
    background: #fff;
    border: 1px solid #e2e2ec;
    border-radius: 14px;
}

.filter-note h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
}

.filter-note > p {
    font-size: 14.5px;
    color: #55556b;
    margin-bottom: 20px;
}

.cat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 12px;
    border: 1px solid #e2e2ec;
    border-radius: 50px;
    background: #fafafd;
    font-size: 13.5px;
    font-weight: 500;
    color: #1a1a2e;
}

.cat-chip .cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- Sources ---------- */
.sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.source {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 26px 24px;
}

.source h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.source p {
    font-size: 14.5px;
    color: var(--text-secondary);
}

/* The caveat is the part people skip, so it gets the accent rule that the rest
   of the card does not have. */
.source-caveat {
    margin-top: 14px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    font-size: 13.5px;
}

.honesty {
    margin-top: 40px;
    padding: 28px;
    background: rgba(233, 69, 96, 0.07);
    border: 1px solid rgba(233, 69, 96, 0.22);
    border-radius: 14px;
}

.honesty h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.honesty p {
    font-size: 14.5px;
    color: var(--text-secondary);
    max-width: 78ch;
}

.honesty p + p {
    margin-top: 14px;
}

.honesty strong {
    color: var(--text-primary);
}

/* ---------- Facts ---------- */
/* Two columns, not auto-fit. There are four facts, and auto-fit gave three
   across at this width — leaving the fourth stranded alone on a second row. */
.facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 48px;
}

@media (max-width: 700px) {
    .facts {
        grid-template-columns: 1fr;
    }
}

.fact h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.fact p {
    font-size: 14.5px;
    color: #55556b;
}

.ad-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    background: #e2e2ec;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #55556b;
}

/* ---------- Closing ---------- */
.closing {
    padding: 76px 0;
    background: var(--panel-bg);
    background-image: radial-gradient(circle at 80% 100%, rgba(233, 69, 96, 0.24), transparent 58%);
    text-align: center;
    border-top: 1px solid var(--panel-border);
}

.closing h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #fff;
    margin-bottom: 12px;
}

.closing p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ---------- Footer ---------- */
.footer {
    background: #12121f;
    padding: 30px 0 34px;
    border-top: 1px solid var(--panel-border);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-note {
    max-width: 1080px;
    margin: 18px auto 0;
    padding: 0 24px;
    font-size: 12px;
    line-height: 1.6;
    color: #6d6d80;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .hero {
        padding: 56px 0 52px;
    }

    .hero h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .lede {
        font-size: 16px;
    }

    .section h2,
    .closing h2 {
        font-size: 27px;
    }

    .stats {
        gap: 28px;
        margin-top: 40px;
    }

    .stat-num {
        font-size: 32px;
    }

    /* The in-page anchors are reachable by scrolling; on a narrow screen they
       would wrap the nav onto two lines and push "Open the map" off the edge. */
    .nav-links a:not(.btn) {
        display: none;
    }

    .cta-row .btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }

    .btn-accent:hover {
        transform: none;
    }
}
