/* ==========================================================================
   The Bright Stream — Article Styles
   Long-form editorial layout for cycling travelogues
   Requires /styles.css as base
   ========================================================================== */

/* Article-specific layout tokens */
:root {
    --col-text: 660px;
    --col-image: 920px;
}

/* Article typography baseline */
html {
    font-size: 18px;
}

body {
    line-height: 1.78;
    min-height: 100vh;
}

/* Subtle paper texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ── Hero ── */
.hero {
    position: relative;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 6rem 2rem 0;
}

.hero-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 2px;
}

.hero-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.02) brightness(1.01);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 3rem 2.5rem;
    background: linear-gradient(
        to top,
        rgba(42, 35, 24, 0.75) 0%,
        rgba(42, 35, 24, 0.4) 50%,
        transparent 100%
    );
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    color: var(--color-cream);
    letter-spacing: 0.01em;
    line-height: 1.15;
    margin-bottom: 0.3em;
}

.hero-subtitle {
    font-family: 'Cormorant', 'Georgia', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    color: rgba(245, 240, 230, 0.8);
    letter-spacing: 0.04em;
}

/* ── Route stats bar ── */
.route-stats {
    max-width: var(--col-text);
    margin: 3rem auto 0;
    padding: 1.4rem 0;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--color-ink);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.stat-label {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--color-stone);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.15rem;
}

.route-meta {
    max-width: var(--col-text);
    margin: 1.6rem auto 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--color-stone);
    letter-spacing: 0.05em;
}

/* ── Article body ── */
.article {
    max-width: var(--col-text);
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow: visible;
}

/* ── Section dividers ── */
.section-divider {
    max-width: var(--col-text);
    margin: 4rem auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    clear: both;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: var(--color-rule);
}

.section-divider span {
    position: relative;
    display: inline-block;
    background: var(--color-cream);
    padding: 0 1.2rem;
    color: var(--color-rule);
    font-size: 0.9rem;
    line-height: 1;
}

/* ── Section headings ── */
.section-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--color-ink);
    letter-spacing: 0.005em;
    line-height: 1.25;
    margin-bottom: 2rem;
    margin-top: 3.5rem;
}

.section-heading .section-num {
    font-weight: 300;
    color: var(--color-stone);
    font-size: 0.85em;
    margin-right: 0.15em;
}

/* ── Prose paragraphs ── */
.article p {
    margin-bottom: 1.4em;
    font-size: 1rem;
    hanging-punctuation: first;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.article p:last-child {
    margin-bottom: 0;
}

/* ── Drop cap ── */
.drop-cap::first-letter {
    font-family: var(--font-display);
    font-weight: 500;
    float: left;
    font-size: 3.8em;
    line-height: 0.78;
    padding-right: 0.08em;
    margin-top: 0.05em;
    color: var(--color-ink);
}

/* ── Emphasis ── */
.article em {
    font-style: italic;
    font-weight: 400;
}

/* ── Illustration breaks ── */
.illustration {
    max-width: var(--col-text);
    margin: 2.5rem auto 3rem;
    padding: 0 1.5rem;
    clear: both;
}

.illustration figure {
    position: relative;
    margin: 0;
}

.illustration img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    filter: contrast(1.02) brightness(1.01);
}

.illustration figcaption {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--color-stone);
    text-align: center;
    margin-top: 0.8rem;
    letter-spacing: 0.01em;
}

/* ── Offset illustrations (desktop) ── */
@media (min-width: 1000px) {
    .illustration-offset {
        max-width: 420px;
        margin: 0.5rem 0 1.5rem;
        padding: 0;
        clear: none;
    }

    .illustration-right {
        float: right;
        margin-left: 2.5rem;
        margin-right: -8vw;
    }

    .illustration-left {
        float: left;
        margin-right: 2.5rem;
        margin-left: -8vw;
    }

    .illustration-offset figcaption {
        text-align: left;
    }

    .illustration-left figcaption {
        text-align: right;
    }
}

/* ── Full-width illustration ── */
.illustration-full {
    max-width: var(--col-image);
    clear: both;
}

/* ── Clear floats ── */
.clear { clear: both; }

/* ── Weather ── */
.weather {
    max-width: var(--col-text);
    margin: 2.5rem auto 0;
    padding: 1.5rem;
}

.weather-note {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.92rem;
    color: var(--color-stone);
    text-align: center;
    line-height: 1.6;
}

.weather-note .weather-em {
    color: var(--color-ink-muted);
    font-weight: 400;
}

/* ── Pull quote ── */
.pull-quote {
    max-width: var(--col-text);
    margin: 3rem auto;
    padding: 2rem 0;
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    text-align: center;
}

.pull-quote p {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    color: var(--color-ink-muted);
    line-height: 1.55;
    max-width: 540px;
    margin: 0 auto;
    hanging-punctuation: first last;
}

/* ── Standalone line ── */
.standalone {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-ink);
    text-align: center;
    margin: 2.5rem 0;
    letter-spacing: 0.01em;
}

/* ── Final stats ── */
.final-stats {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.78;
    color: var(--color-ink);
}

/* ── Colophon ── */
.colophon {
    max-width: var(--col-text);
    margin: 5rem auto 0;
    padding: 2rem 1.5rem 4rem;
    border-top: 1px solid var(--color-rule);
    text-align: center;
}

.colophon p {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--color-stone);
    letter-spacing: 0.03em;
    line-height: 1.8;
}

.colophon .route-line {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--color-ink-muted);
    margin-bottom: 0.6rem;
}

/* ── Back link ── */
.back-link {
    display: block;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--color-stone);
    text-decoration: none;
    max-width: var(--col-text);
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
    text-align: center;
}

.back-link:hover { color: var(--color-ink); }

/* ── Fade-in on scroll ── */
.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    html { font-size: 17px; }

    .hero { padding: 1rem 1rem 0; }
    .hero-overlay { padding: 3rem 1.5rem 1.5rem; }

    .route-stats { gap: 1.5rem; padding: 1.2rem 0; }
    .stat-value { font-size: 1.3rem; }

    .article { padding: 0 1.25rem; }
    .illustration { padding: 0 1rem; }
    .section-heading { margin-top: 2.5rem; }
    .drop-cap::first-letter { font-size: 3.2em; }
    .section-divider { margin: 3rem auto; }
}

@media (max-width: 480px) {
    html { font-size: 16px; }

    .hero { padding: 0.5rem 0.5rem 0; }
    .hero-overlay { padding: 2.5rem 1.2rem 1.2rem; }

    .route-stats { gap: 1rem; }
    .stat-value { font-size: 1.15rem; }
    .stat-label { font-size: 0.65rem; }

    .article { padding: 0 1rem; }
    .illustration { padding: 0 0.5rem; }
    .weather-note { font-size: 0.85rem; }
}
