/* The Pattern — Editorial Design System */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0A0A12;
    --bg-secondary: #111120;
    --bg-card: #16162A;
    --bg-card-hover: #1C1C36;
    --border: #2A2A4A;
    --text-primary: #F0F0F5;
    --text-secondary: #9898B0;
    --text-muted: #6A6A80;
    --accent: #6C63FF;

    --fashion: #FF6B9D;
    --brand: #E5A820;
    --culture: #D64050;
    --music: #3DD68C;
    --design: #6C63FF;
    --art: #AB47BC;
    --lifestyle: #E88530;
    --tech: #38BEC9;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ─────────────────────────────── */
.header {
    padding: 48px 0 24px;
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.wordmark {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: 1px;
    line-height: 1.1;
}

.edition-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding-top: 8px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Culture Pulse ──────────────────────── */
.pulse-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pulse-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pulse-track {
    flex: 1;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.pulse-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.5s ease-out;
}

.pulse-score {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    min-width: 36px;
    text-align: right;
}

/* ── Audio Player ───────────────────────── */
.audio-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

.play-btn:hover { background: #7B73FF; transform: scale(1.05); }
.play-btn:active { transform: scale(0.95); }

.player-info {
    flex: 1;
    min-width: 0;
}

.player-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-time {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

.no-audio {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Sections ───────────────────────────── */
.section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.section-headline {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.2;
    margin-bottom: 8px;
}

/* ── The Lead ───────────────────────────── */
.lead-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(22px, 3.5vw, 30px);
    line-height: 1.25;
    margin-bottom: 16px;
}

.lead-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.lead-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.badge-category {
    border-color: currentColor;
}

/* ── Signals + Pattern Grid ─────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.signal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
    align-items: flex-start;
}

.signal-number {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    padding-top: 1px;
}

.signal-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
}

.signal-source {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pattern-box {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 3px solid var(--culture);
}

.pattern-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
}

/* ── Watch + Starters Grid ──────────────── */
.watch-box {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.watch-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    margin-bottom: 12px;
}

.watch-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.starters-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.starter-item {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
}

.starter-icon {
    color: var(--accent);
    flex-shrink: 0;
    font-size: 16px;
}

/* ── Footer ─────────────────────────────── */
.footer {
    padding: 32px 0 48px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover { color: var(--text-primary); }

.footer-credit {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

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

.footer-credit a:hover { color: var(--text-primary); }

/* ── Archive Page ───────────────────────── */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.archive-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.archive-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.archive-date {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.archive-title {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.archive-pulse {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--accent);
}

/* ── Scanline overlay ───────────────────── */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.015) 2px,
        rgba(0, 0, 0, 0.015) 4px
    );
}
