/* DM Sans */

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/dm-sans-v17-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}

/* Instrument Serif */
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-display: swap;
    src: url('../fonts/instrument-serif-v5-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-display: swap;
    src: url('../fonts/instrument-serif-v5-latin-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
}

:root {
    --ink: #0d1117;
    --paper: #f5f0e8;
    --accent: #c8410a;
    --accent2: #1a4a2e;
    --muted: #6b6560;
    --border: #d4cec4;
    --card: #fdfaf4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: black;
    color: white;
    padding: 8px 12px;
    z-index: 999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-cta {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border: 1px solid var(--ink);
    color: var(--ink);
    text-decoration: none;
    transition: all 0.15s;
}

.nav-cta:hover {
    background: var(--ink);
    color: var(--paper);
}

/* HERO */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 60px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 3rem 6rem 5rem;
    border-right: 1px solid var(--border);
}

.hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--accent);
}

h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.6rem, 4.5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 440px;
    line-height: 1.75;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn-primary {
    padding: 0.7rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-secondary {
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-num {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    color: var(--ink);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

/* HERO RIGHT */
.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 4rem 6rem 3rem;
    background: var(--ink);
    position: relative;
    overflow: hidden;
}

.hero-right::before {
    content: 'SC';
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    font-family: 'Instrument Serif', serif;
    font-size: 18rem;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    pointer-events: none;
}

.ticker-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ticker-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ticker-live::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1
    }
    50% {
        opacity: 0.4
    }
}

.ticker-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticker-item {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
    text-decoration: none;
    display: block;
}

.ticker-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.ticker-cat {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.ticker-headline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-weight: 300;
}

.ticker-source {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.4rem;
}

/* CATEGORY NAV */
.cat-nav {
    background: var(--ink);
    padding: 0 5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.cat-nav a {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    padding: 1rem 1.2rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}

.cat-nav a:hover {
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.cat-nav a.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* SECTIONS */
section {
    padding: 4rem 5rem;
}


section[id],
div[id="newsletter"] {
    scroll-margin-top: 120px; /* adjust if your nav height changes */
}


.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
}

h2 a {
    color: inherit;
    text-decoration: none;
}

.section-count {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* DIRECTORY GRID */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.dir-card {
    background: var(--card);
    padding: 1.4rem;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.dir-card:hover {
    background: #fff;
}

.dir-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.dir-tag {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent2);
    background: rgba(26, 74, 46, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.dir-arrow {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.15s;
}

.dir-card:hover .dir-arrow {
    opacity: 1;
}

.dir-name {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.dir-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 300;
}

.dir-url {
    font-size: 0.7rem;
    color: var(--border);
    margin-top: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* TOPICS */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.topic-card {
    padding: 1.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    color: inherit;
    transition: background 0.15s;
}

.topic-card:hover {
    background: #fff;
}

.topic-num {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    color: var(--border);
    position: absolute;
    bottom: -0.5rem;
    right: 0.5rem;
    line-height: 1;
    pointer-events: none;
}

.topic-name {
    font-family: 'Instrument Serif', serif;
    font-size: 1.15rem;
    margin-bottom: 0.45rem;
}

.topic-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 300;
}

/* NEWSLETTER */
.newsletter {
    background: var(--ink);
    padding: 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.newsletter h2 {
    color: #fff;
    font-size: 2rem;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-top: 0.75rem;
    font-weight: 300;
}

.nl-form {
    display: flex;
}

.nl-input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.nl-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.nl-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.nl-btn {
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s;
}

.nl-btn:hover {
    background: #a8350a;
}

/* FOOTER */
footer {
    padding: 2.5rem 5rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
}

.footer-logo span {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links a {
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

.footer-note {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: right;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    animation: fadeUp 0.5s ease both;
}

h1 {
    animation: fadeUp 0.5s 0.1s ease both;
}

.hero-desc {
    animation: fadeUp 0.5s 0.18s ease both;
}

.hero-actions {
    animation: fadeUp 0.5s 0.26s ease both;
}

.hero-stats {
    animation: fadeUp 0.5s 0.34s ease both;
}

.ticker-item:nth-child(1) {
    animation: fadeUp 0.4s 0.2s ease both;
}

.ticker-item:nth-child(2) {
    animation: fadeUp 0.4s 0.32s ease both;
}

.ticker-item:nth-child(3) {
    animation: fadeUp 0.4s 0.44s ease both;
}

.ticker-item:nth-child(4) {
    animation: fadeUp 0.4s 0.56s ease both;
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-left {
        padding: 4rem 2rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .hero-right {
        padding: 3rem 2rem;
    }

    section {
        padding: 3rem 2rem;
    }

    .cat-nav {
        padding: 0 2rem;
    }

    .topics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .newsletter {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        gap: 2rem;
    }

    footer {
        grid-template-columns: 1fr;
        padding: 2rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-note {
        text-align: center;
    }

    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}