/* ==========================================================================
   Truth by the Hour — page-specific overrides
   Shared chapter + documentary hero: ../story-chapters.css
   ========================================================================== */

@import url('../story-chapters.css');
@import url('../stories-nav.css');

/* Stronger header contrast while overlapping the hero */
body.tbh-doc-page.has-immersive-hero .site-header .site-nav__link,
body.tbh-doc-page.has-immersive-hero .site-header .site-action {
    color: rgba(244, 240, 227, 0.98);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.62);
}

body.tbh-doc-page.has-immersive-hero .site-header .site-action--donate {
    border-color: rgba(244, 240, 227, 0.52);
}

/* First editorial section after hero — contained chapter, no upward bleed */
body.tbh-doc-page .story-chapter-section--after-hero .story-chapter-section__grid {
    align-items: start;
}

body.tbh-doc-page .story-chapter-section--after-hero .story-video {
    position: relative;
    top: auto;
    inset: auto;
    transform: none;
    margin-top: 0;
    margin-bottom: 0;
}

body.tbh-doc-page .story-chapter-section--after-hero .story-video::before {
    content: none;
    display: none;
    inset: auto;
    background: none;
    filter: none;
    animation: none;
    opacity: 0;
}

body.tbh-doc-page .story-chapter-section--after-hero .story-video__frame {
    position: relative;
    top: auto;
    transform: none;
    margin-top: 0;
    box-shadow:
        0 1px 0 rgba(244, 240, 227, 0.14) inset,
        0 10px 24px -14px rgba(44, 44, 44, 0.28);
}

@media (hover: hover) and (pointer: fine) {
    body.tbh-doc-page .story-chapter-section--after-hero .story-video:hover .story-video__frame,
    body.tbh-doc-page .story-chapter-section--after-hero .story-video:focus-within .story-video__frame {
        transform: none;
        box-shadow:
            0 1px 0 rgba(244, 240, 227, 0.16) inset,
            0 14px 28px -14px rgba(44, 44, 44, 0.32);
    }
}

@media (pointer: coarse) {
    body.tbh-doc-page .story-chapter-section--after-hero .story-video__frame {
        transform: none;
        margin-top: 0;
    }
}

@media (max-width: 900px) {
    body.tbh-doc-page .story-chapter-section--after-hero .story-video {
        margin-top: clamp(2.75rem, 8vw, 4rem);
    }
}

/* Memorial closing */
.tbh-doc__coda {
    padding-top: clamp(4rem, 10vw, 6.5rem);
    padding-bottom: clamp(4rem, 10vw, 6.5rem);
    text-align: center;
}

.tbh-doc__coda-inner {
    width: min(100%, 46rem);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.tbh-doc__coda-eyebrow {
    margin: 0 0 clamp(0.85rem, 2vw, 1.15rem);
    font-size: clamp(0.72rem, 0.18vw + 0.68rem, 0.82rem);
    font-weight: 650;
    letter-spacing: 0.2em;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--color-illuminate-on-dark, #E2C45C);
}

.tbh-doc__coda-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.8vw + 0.65rem, 2.35rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-wrap: balance;
    color: var(--color-warm-light);
}

.tbh-doc__passage {
    margin: clamp(1.15rem, 2.4vw, 1.65rem) 0 0;
    font-size: clamp(1.02rem, 0.32vw + 0.94rem, 1.14rem);
    font-weight: 500;
    line-height: 1.72;
    letter-spacing: 0.01em;
}

body.tbh-doc-page .tbh-doc__hero-lede-break {
    display: none;
}

@media (min-width: 1024px) {
    .tbh-doc__hero-title {
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .tbh-doc__hero-title {
        letter-spacing: 0.03em;
        text-wrap: balance;
    }
}

/* Mobile chapter layout — TBH-specific hero/coda spacing only (shared rules in story-chapters.css) */
@media (max-width: 768px) {
    body.tbh-doc-page .tbh-doc__hero-lede-break {
        display: block;
    }

    body.tbh-doc-page .tbh-doc__hero-bg {
        object-fit: cover;
        /* Keep both collage columns; slight upward bias so the 2x4 grid is not cropped from the top */
        object-position: 50% 42%;
    }

    body.tbh-doc-page .tbh-doc__hero-scrim {
        background:
            rgba(0, 0, 0, 0.18),
            radial-gradient(
                ellipse 78% 32% at 50% 52%,
                rgba(0, 0, 0, 0.5) 0%,
                rgba(0, 0, 0, 0.22) 48%,
                rgba(0, 0, 0, 0) 76%
            );
    }

    body.tbh-doc-page .tbh-doc__hero-inner {
        isolation: isolate;
    }

    body.tbh-doc-page .tbh-doc__hero-inner::before {
        content: "";
        position: absolute;
        z-index: -1;
        pointer-events: none;
        left: 50%;
        top: 50%;
        width: min(38rem, 145%);
        height: 13.5rem;
        transform: translate(-50%, -50%);
        background: radial-gradient(
            ellipse 68% 58% at 50% 50%,
            rgba(0, 0, 0, 0.52) 0%,
            rgba(0, 0, 0, 0.26) 40%,
            rgba(0, 0, 0, 0.08) 66%,
            rgba(0, 0, 0, 0) 80%
        );
        filter: blur(24px);
    }

    body.tbh-doc-page .tbh-doc__hero-title,
    body.tbh-doc-page .tbh-doc__hero-lede {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }

    body.tbh-doc-page .tbh-doc__hero-eyebrow {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
    }

    body.tbh-doc-page {
        --tbh-chapter-pad-inline: 2rem;
    }

    body.tbh-doc-page .story-chapter-section--after-hero {
        padding-top: max(clamp(5.5rem, 14vw, 6.5rem), calc(var(--header-height) + 1.25rem));
    }

    body.tbh-doc-page .tbh-doc__coda {
        padding-top: max(clamp(4rem, 10vw, 6.5rem), calc(var(--header-height) + 1rem));
    }

    body.tbh-doc-page .tbh-doc__coda-inner {
        box-sizing: border-box;
        padding-inline: var(--tbh-chapter-pad-inline);
    }
}

@media (max-width: 767px) {
    body.tbh-doc-page {
        --tbh-chapter-pad-inline: clamp(1.25rem, 5vw, 1.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tbh-doc__hero-bg {
        object-position: center center;
    }
}
