/* ==========================================================================
   Megunit (October 7 Stories)
   Builds on Truth by the Hour: same rhythm, tokens, and video frame.
   ========================================================================== */

@import url('../truth-by-the-hour/style.css');

body.megunit-story-page .story-chapter-section__copy {
    max-width: min(42rem, 100%);
}

body.megunit-story-page .story-chapter-section__copy h1,
body.megunit-story-page .story-chapter-section__copy h2:not(.megunit-shelter-heading) {
    max-width: min(100%, 17rem);
    line-height: 1.06;
}

body.megunit-story-page .megunit-hero-title {
    max-width: min(100%, 22rem);
}

/* Per-shelter titles (longer lines than punchy chapter h2s) */
body.megunit-story-page h2.megunit-shelter-heading {
    max-width: min(100%, 38rem);
    margin: 0 0 clamp(0.75rem, 1.5vw, 1rem);
    font-size: clamp(1.28rem, 2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

body.megunit-story-page .story-chapter-section--light h2.megunit-shelter-heading {
    color: #2C2C2C;
}

body.megunit-story-page .story-chapter-section--dark h2.megunit-shelter-heading {
    color: #F4F0E3;
}

@media (max-width: 640px) {
    body.megunit-story-page .story-chapter-section__copy h2.megunit-shelter-heading {
        font-size: clamp(1.15rem, 5.2vw, 1.52rem);
    }
}

.megunit-names {
    list-style: none;
    margin: clamp(1rem, 2vw, 1.35rem) 0 0;
    padding: 0;
    font-size: clamp(0.92rem, 0.35vw + 0.88rem, 1.02rem);
    line-height: 1.55;
}

.megunit-story-page .story-chapter-section--light .megunit-names {
    color: rgba(44, 44, 44, 0.82);
}

.megunit-story-page .story-chapter-section--dark .megunit-names {
    color: rgba(244, 240, 227, 0.84);
}

@media (min-width: 640px) {
    .megunit-names {
        columns: 2;
        column-gap: clamp(1.5rem, 4vw, 2.5rem);
    }

    .megunit-names li {
        break-inside: avoid;
    }
}

.megunit-names li + li {
    margin-top: 0.35rem;
}

.megunit-note {
    margin-top: clamp(1rem, 2vw, 1.35rem);
    font-size: clamp(0.95rem, 0.35vw + 0.9rem, 1.05rem);
    line-height: 1.72;
}

body.megunit-story-page .story-chapter-section--light .megunit-note {
    color: rgba(44, 44, 44, 0.72);
}

body.megunit-story-page .story-chapter-section--dark .megunit-note {
    color: rgba(244, 240, 227, 0.78);
}

/* Opening text block (no side video) */
.megunit-lede {
    max-width: min(42rem, 100%);
    margin-inline: auto;
}

.megunit-lede h1 {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 4.1rem);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.055em;
    text-wrap: balance;
    color: #2C2C2C;
}

.megunit-lede__prose {
    margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

.megunit-lede__prose p {
    margin: 0;
    font-size: clamp(0.98rem, 0.42vw + 0.92rem, 1.1rem);
    line-height: 1.78;
    color: rgba(44, 44, 44, 0.74);
}

.megunit-lede__prose p + p {
    margin-top: 1rem;
}

/* Centered single video between chapters */
.story-chapter-section--video-focus {
    padding-top: clamp(2.5rem, 6vw, 4rem);
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.story-chapter-section--video-focus .story-container {
    display: flex;
    justify-content: center;
}

.story-chapter-section--video-focus .story-video {
    width: clamp(260px, 42vw, 420px);
}

@media (max-width: 900px) {
    .story-chapter-section--video-focus .story-video {
        width: min(78vw, 320px);
    }
}

body.megunit-story-page .story-chapter-section__copy blockquote p {
    margin: 0;
    max-width: none;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.megunit-pull {
    margin: 0 0 clamp(0.35rem, 1vw, 0.5rem);
    font-size: clamp(1.05rem, 0.5vw + 0.98rem, 1.25rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

body.megunit-story-page .story-chapter-section--light .megunit-pull {
    color: rgba(44, 44, 44, 0.78);
}

body.megunit-story-page .story-chapter-section--dark .megunit-pull {
    color: rgba(244, 240, 227, 0.78);
}
