/* =========================================================
   GENTRIFICATION REPORT · LA COUNTY
   Editorial / research-publication aesthetic
   ========================================================= */

:root {
    --ink:        #111111;
    --ink-soft:   #2a2a2a;
    --muted:      #6b6b6b;
    --paper:      #fafaf7;
    --paper-alt:  #f1efe8;
    --rule:       #1a1a1a;
    --accent:     #c8102e;
    --accent-dim: #9a0c24;
    --hairline:   rgba(17, 17, 17, 0.12);

    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body:    'IBM Plex Sans', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    --max-width: 1240px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv01";
}

/* =========================================================
   TYPOGRAPHY DEFAULTS
   ========================================================= */

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1.1em;
    color: var(--ink-soft);
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    padding: 48px 40px 100px;
    border-bottom: 1px solid var(--rule);
    background:
        radial-gradient(circle at 85% 15%, rgba(200, 16, 46, 0.04) 0%, transparent 45%),
        var(--paper);
    overflow: hidden;
}

.hero::before {
    /* thin vertical rule on right edge — echoes the presentation template */
    content: "";
    position: absolute;
    top: 0;
    right: 40px;
    width: 3px;
    height: 80px;
    background: var(--accent);
}

.hero::after {
    /* short horizontal accent top-left */
    content: "";
    position: absolute;
    top: 60px;
    left: 40px;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.hero-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 80px;
}

.hero-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 40px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.tag-divider {
    color: var(--accent);
}

.hero-title {
    font-size: clamp(56px, 9vw, 120px);
    font-weight: 800;
    font-style: italic;
    line-height: 0.92;
    margin-bottom: 36px;
    max-width: 14ch;
}

.accent-dot {
    color: var(--accent);
    font-style: normal;
}

.hero-subtitle {
    display: inline-block;
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 400;
    font-style: normal;
    color: var(--ink-soft);
    margin-top: 16px;
    letter-spacing: 0;
    max-width: 22ch;
}

.hero-lede {
    font-family: var(--font-display);
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.5;
    max-width: 62ch;
    color: var(--ink-soft);
    margin-bottom: 60px;
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin-top: 40px;
}

.stat {
    padding: 28px 24px 28px 0;
    border-right: 1px solid var(--hairline);
    position: relative;
}

.stat:last-child {
    border-right: none;
}

.stat::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--accent);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

/* =========================================================
   SECTION GRID (shared)
   ========================================================= */

.section-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 80px;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    position: sticky;
    top: 40px;
    align-self: start;
    padding-top: 6px;
}

.label-dash {
    color: var(--accent);
    margin-right: 8px;
    font-weight: 500;
}

.section-content {
    max-width: 820px;
}

.section-content h2 {
    font-size: clamp(36px, 4.5vw, 56px);
    margin-bottom: 24px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.lead {
    font-family: var(--font-display);
    font-size: clamp(19px, 1.5vw, 22px);
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 1.3em;
    font-weight: 400;
}

/* =========================================================
   INTRO
   ========================================================= */

.intro {
    padding: 100px 0 80px;
    background: var(--paper);
}

/* =========================================================
   VIZ SECTIONS
   ========================================================= */

.viz-section {
    padding: 80px 0 100px;
    border-top: 1px solid var(--rule);
    background: var(--paper);
}

.viz-section.alt {
    background: var(--paper-alt);
}

.viz-title {
    font-size: clamp(36px, 4.5vw, 56px);
    margin-bottom: 12px;
    font-style: italic;
    font-weight: 600;
}

.viz-subtitle {
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 44px;
    font-weight: 400;
}

.viz-figure {
    margin: 0 0 36px 0;
    background: #ffffff;
    border: 1px solid var(--hairline);
    padding: 32px;
    position: relative;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 12px 40px -12px rgba(0, 0, 0, 0.08);
}

.viz-figure::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

.viz-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.viz-figure figcaption {
    font-size: 14px;
    color: var(--muted);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    line-height: 1.5;
    font-style: italic;
}

.viz-figure figcaption strong {
    color: var(--ink);
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =========================================================
   INSIGHT BOX
   ========================================================= */

.insight-box {
    background: var(--ink);
    color: #eee;
    padding: 32px 36px;
    margin: 40px 0 48px;
    position: relative;
    border-left: 4px solid var(--accent);
}

.insight-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 14px;
    font-weight: 500;
}

.insight-box p {
    color: #e4e4e4;
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

.insight-box p strong {
    color: #ffffff;
    font-weight: 600;
}

/* =========================================================
   AXIS GUIDE (for radar chart)
   ========================================================= */

.axis-guide {
    background: #ffffff;
    border: 1px solid var(--hairline);
    padding: 24px 28px;
    margin-bottom: 40px;
}

.axis-guide-title {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 16px;
}

.axis-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding: 0;
}

.axis-list li {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.axis-num {
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--accent);
    color: #ffffff;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
}

/* =========================================================
   DATA TABLE
   ========================================================= */

.table-wrapper {
    margin-top: 20px;
}

.table-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
    background: #ffffff;
    border: 1px solid var(--hairline);
}

.data-table thead th {
    text-align: left;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    background: var(--paper-alt);
    border-bottom: 2px solid var(--rule);
    font-family: var(--font-mono);
}

.data-table tbody td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--hairline);
    color: var(--ink-soft);
}

.data-table tbody tr:hover {
    background: rgba(200, 16, 46, 0.04);
}

.data-table tbody tr.highlight {
    background: rgba(200, 16, 46, 0.06);
}

.data-table tbody tr.highlight td {
    color: var(--ink);
    font-weight: 500;
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-family: var(--font-mono);
    font-size: 13px;
}

.data-table .highlight-cell {
    background: var(--accent);
    color: #ffffff;
    font-weight: 500;
}

.data-table tfoot td {
    padding: 14px 18px;
    border-top: 2px solid var(--rule);
    background: var(--paper-alt);
    font-family: var(--font-mono);
    font-size: 13px;
}

.table-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
    font-style: italic;
    line-height: 1.5;
}

/* =========================================================
   CONCLUSION
   ========================================================= */

.conclusion {
    padding: 100px 0 120px;
    border-top: 1px solid var(--rule);
    background: var(--paper);
}

.conclusion h2 {
    font-size: clamp(40px, 5vw, 64px);
    font-style: italic;
    margin-bottom: 32px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    background: var(--ink);
    color: #cfcfcf;
    padding: 60px 40px 36px;
    border-top: 4px solid var(--accent);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    font-size: 14px;
    line-height: 1.7;
}

.footer-title {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-muted {
    color: #8a8a8a;
    font-size: 13px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 24px auto 0;
    display: flex;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b6b6b;
}

.footer-bottom-dot {
    color: var(--accent);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .hero {
        padding: 32px 24px 80px;
    }

    .hero::after {
        left: 24px;
    }

    .hero::before {
        right: 24px;
    }

    .hero-grid {
        padding-top: 60px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat {
        padding: 22px 18px 22px 0;
    }

    .stat:nth-child(2) {
        border-right: none;
    }

    .stat:nth-child(1),
    .stat:nth-child(2) {
        border-bottom: 1px solid var(--hairline);
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 24px;
    }

    .section-label {
        position: static;
    }

    .intro,
    .viz-section,
    .conclusion {
        padding: 60px 0;
    }

    .viz-figure {
        padding: 16px;
    }

    .insight-box {
        padding: 24px;
    }

    .insight-box p {
        font-size: 17px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table thead th,
    .data-table tbody td,
    .data-table tfoot td {
        padding: 9px 10px;
    }

    .footer {
        padding: 44px 24px 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .footer-bottom {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .stat {
        border-right: none !important;
        border-bottom: 1px solid var(--hairline);
    }

    .hero-stats .stat:last-child {
        border-bottom: none;
    }

    .data-table {
        font-size: 11px;
    }

    .axis-list {
        flex-direction: column;
        gap: 12px;
    }
}

/* =========================================================
   SUBTLE ENTRANCE
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
    .hero-title,
    .hero-lede,
    .hero-stats {
        animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .hero-lede  { animation-delay: 0.12s; }
    .hero-stats { animation-delay: 0.24s; }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
