/* ============================================================
   INFANTJS — STORY PAGE
   Matches site aesthetic: black bg, #ffda00 yellow, Helvetica Neue
   ============================================================ */

/* --- 1. GLOBAL RESET --- */
*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; height: auto; display: block; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s, color 0.4s;
}

main { padding: 0; }
.page-buffer { height: 120px; width: 100%; }

/* --- 2. FIXED HEADER / NAV --- */
.overlay-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 30px;
    z-index: 200;
    box-sizing: border-box;
    background: linear-gradient(to bottom, var(--bg-color) 55%, transparent);
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--nav-text, #fff);
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.site-title:hover { opacity: 0.55; cursor: pointer; }

.site-subtitle {
    margin: 5px 0 0;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.5;
}

.top-nav { display: flex; gap: 16px; align-items: center; }

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 3px;
    transition: opacity 0.25s ease;
}

.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--text-color);
    transition: width 0.3s ease;
}
.top-nav a:hover::after { width: 100%; }
.top-nav a:hover { opacity: 0.65; }

/* --- 3. PAGE CONTAINER --- */
.story-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 48px 120px;
}

/* --- 4. PAGE HEADER --- */
.story-header {
    padding-bottom: 56px;
    margin-bottom: 72px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.story-eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffda00;
    margin-bottom: 20px;
    opacity: 0.9;
}

.story-title {
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.0;
    text-transform: uppercase;
    margin: 0 0 24px;
}

.story-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.5;
    margin: 0;
    max-width: 480px;
}

.story-lead em {
    font-style: italic;
    opacity: 0.9;
}

/* --- 5. STORY BODY --- */
.story-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 72px;
}

/* --- 6. INDIVIDUAL PARAGRAPH BLOCK --- */
.story-paragraph {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 32px;
    align-items: start;
    padding: 48px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.story-paragraph:first-child { padding-top: 0; }
.story-paragraph:last-child { border-bottom: none; }

/* Aside: number + vertical line */
.paragraph-aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.paragraph-number {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #ffda00;
    opacity: 0.7;
    flex-shrink: 0;
}

.paragraph-line {
    width: 1px;
    flex: 1;
    min-height: 40px;
    background: linear-gradient(to bottom, rgba(255,218,0,0.25), transparent);
}

/* Paragraph content */
.paragraph-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.paragraph-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.35;
    margin: 0;
}

.paragraph-content p {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-color);
    opacity: 0.82;
    margin: 0;
}

.paragraph-content p em {
    font-style: italic;
}

.paragraph-content p strong {
    color: #ffda00;
    font-weight: 700;
    opacity: 1;
}

.paragraph-content p code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255, 218, 0, 0.12);
    color: #ffda00;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 14px;
    white-space: nowrap;
}

/* --- 7. KEYWORD STRIP --- */
.keyword-strip {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    padding: 24px 28px;
    margin-bottom: 72px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(255,255,255,0.015);
}

.strip-label {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
    line-height: 1;
}

.kw {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #ffda00;
    background: rgba(255,218,0,0.1);
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.kw:hover {
    background: rgba(255,218,0,0.22);
}

.kw-sep {
    font-size: 12px;
    color: rgba(255,255,255,0.15);
    user-select: none;
    padding: 0 2px;
}

/* --- 8. CLOSING QUOTE --- */
.story-quote {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.quote-mark {
    font-size: 80px;
    line-height: 0.6;
    color: #ffda00;
    opacity: 0.25;
    font-family: Georgia, serif;
    user-select: none;
    margin-bottom: 8px;
}

.story-quote blockquote {
    margin: 0;
    font-size: clamp(18px, 3vw, 30px);
    font-style: italic;
    letter-spacing: 0.5px;
    color: var(--text-color);
    opacity: 0.55;
    line-height: 1.4;
    max-width: 480px;
}

.quote-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

.quote-link {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.45;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    padding-bottom: 2px;
    transition: opacity 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.quote-link:hover {
    opacity: 1;
    color: #ffda00;
    border-color: #ffda00;
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 640px) {
    .story-container { padding: 0 20px 80px; }
    .story-title { font-size: 36px; letter-spacing: -0.5px; }

    .story-paragraph {
        grid-template-columns: 44px 1fr;
        gap: 18px;
        padding: 36px 0;
    }

    .paragraph-line { min-height: 24px; }
    .paragraph-content p { font-size: 15px; }

    .keyword-strip { padding: 18px 20px; }
    .kw { font-size: 12px; }

    .overlay-header {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        align-items: center;
    }
    .logo-wrapper { align-items: center; text-align: center; }
    .top-nav { gap: 10px; justify-content: center; flex-wrap: wrap; }
    .page-buffer { height: 110px; }

    .quote-links { flex-direction: column; gap: 14px; }
}
