/* ==========================================================================
   Truth by the Hour
   Documentary storytelling framework for the October 7 Stories page.
   ========================================================================== */

main,
.story-footer {
    --story-bg: var(--color-warm-light);
    --story-bg-soft: var(--color-warm-light);
    --story-text: #2C2C2C;
    --story-muted: rgba(44, 44, 44, 0.7);
    --story-dim: rgba(44, 44, 44, 0.5);
    --story-accent: var(--color-accent-on-light);
    --story-border: rgba(44, 44, 44, 0.12);
    --story-radius: 1.15rem;
    --story-shadow: 0 20px 60px rgba(44, 44, 44, 0.12);
    --story-max: min(90vw, 1220px);
    --story-prose: min(42rem, 100%);
}

body {
    background: var(--story-bg);
    color: var(--story-text);
}

.story-container {
    width: var(--story-max);
    margin-inline: auto;
}

.story-eyebrow,
.story-timestamp,
.story-quote__label {
    margin: 0 0 clamp(0.75rem, 1.5vw, 1rem);
    color: rgba(44, 44, 44, 0.62);
    font-size: clamp(0.72rem, 0.2vw + 0.68rem, 0.82rem);
    font-weight: 650;
    letter-spacing: 0.18em;
    line-height: 1.55;
    text-transform: uppercase;
}

.story-chapter {
    margin: 0 0 clamp(0.65rem, 1.2vw, 0.85rem);
    font-size: clamp(0.68rem, 0.18vw + 0.64rem, 0.78rem);
    font-weight: 650;
    letter-spacing: 0.16em;
    line-height: 1.45;
    text-transform: uppercase;
}

.story-chapter--dark {
    color: rgba(244, 240, 227, 0.52);
}

/* --------------------------------------------------------------------------
   Chapter sections — alternating light / dark + editorial grid rhythm
   -------------------------------------------------------------------------- */

.story-chapter-section {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 11vw, 8.5rem) 0;
}

.story-chapter-section--light {
    background:
        radial-gradient(circle at 18% 62%, rgba(189, 173, 123, 0.07), transparent 20rem),
        radial-gradient(circle at 88% 28%, rgba(44, 44, 44, 0.04), transparent 16rem),
        linear-gradient(180deg, var(--color-warm-light) 0%, var(--color-warm-light) 45%, var(--story-bg-soft) 100%);
    color: #2C2C2C;
}

.story-chapter-section--dark {
    background:
        radial-gradient(ellipse 120% 80% at 80% 20%, rgba(189, 173, 123, 0.045), transparent 50%),
        linear-gradient(168deg, #343434 0%, #2C2C2C 52%, #2a2a2a 100%);
    color: #F4F0E3;
}

.story-chapter-section--dark-alt {
    background:
        radial-gradient(ellipse 100% 70% at 15% 75%, rgba(189, 173, 123, 0.04), transparent 45%),
        linear-gradient(192deg, #2C2C2C 0%, #343434 40%, #2C2C2C 100%);
}

.story-chapter-section--first {
    padding-top: calc(var(--header-height) + clamp(3.75rem, 8vw, 6rem));
}

.story-chapter-section__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(245px, auto);
    gap: clamp(3rem, 8.5vw, 7.5rem);
    align-items: center;
}

.story-chapter-section--reverse .story-chapter-section__copy {
    order: 2;
}

.story-chapter-section--reverse .story-chapter-section__video {
    order: 1;
}

@media (min-width: 901px) {
    .story-chapter-section:not(.story-chapter-section--reverse) .story-chapter-section__video {
        justify-self: end;
    }

    .story-chapter-section--reverse .story-chapter-section__video {
        justify-self: start;
    }
}

.story-chapter-section__copy {
    position: relative;
    z-index: 2;
    max-width: 34rem;
}

.story-chapter-section__copy h1,
.story-chapter-section__copy h2 {
    max-width: 14ch;
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 4.1rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.story-chapter-section--light .story-chapter-section__copy h1,
.story-chapter-section--light .story-chapter-section__copy h2 {
    color: #2C2C2C;
}

.story-chapter-section--dark .story-chapter-section__copy h1,
.story-chapter-section--dark .story-chapter-section__copy h2 {
    color: #F4F0E3;
}

.story-chapter-section__copy p:not(.story-chapter):not(.story-eyebrow):not(.story-timestamp) {
    max-width: 29rem;
    margin: clamp(1.1rem, 2.2vw, 1.5rem) 0 0;
    font-size: clamp(0.98rem, 0.42vw + 0.92rem, 1.1rem);
    line-height: 1.78;
}

.story-chapter-section--light .story-chapter-section__copy p:not(.story-chapter):not(.story-eyebrow):not(.story-timestamp) {
    color: rgba(44, 44, 44, 0.74);
}

.story-chapter-section--dark .story-chapter-section__copy p:not(.story-chapter):not(.story-eyebrow):not(.story-timestamp) {
    color: rgba(244, 240, 227, 0.82);
}

.story-chapter-section--light .story-chapter {
    color: rgba(44, 44, 44, 0.46);
}

.story-chapter-section--dark .story-chapter {
    color: rgba(244, 240, 227, 0.48);
}

.story-chapter-section--light .story-eyebrow,
.story-chapter-section--light .story-timestamp {
    color: rgba(44, 44, 44, 0.58);
}

.story-chapter-section--dark .story-eyebrow,
.story-chapter-section--dark .story-timestamp {
    color: rgba(244, 240, 227, 0.56);
}

.story-chapter-section__copy blockquote {
    margin: clamp(1.35rem, 3.2vw, 2.15rem) 0 0;
    padding-left: 1.2rem;
    border-left: 3px solid rgba(189, 173, 123, 0.85);
    font-size: clamp(1.12rem, 0.75vw + 0.98rem, 1.52rem);
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.story-chapter-section--light .story-chapter-section__copy blockquote {
    color: #2C2C2C;
    border-left-color: rgba(189, 173, 123, 0.55);
}

.story-chapter-section--dark .story-chapter-section__copy blockquote {
    color: rgba(244, 240, 227, 0.94);
    border-left-color: rgba(189, 173, 123, 0.38);
}

.story-section {
    padding: clamp(4.5rem, 9vw, 8rem) 0;
    background: var(--story-bg);
}

.story-section:nth-of-type(even) {
    background:
        linear-gradient(180deg, rgba(244, 240, 227, 0.55), rgba(244, 240, 227, 0));
}

.story-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, auto);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.story-section--reverse .story-copy {
    order: 2;
}

.story-section--reverse .story-video {
    order: 1;
}

.story-copy {
    max-width: 34rem;
}

.story-copy h2,
.story-section__header h2,
.story-prose h2,
.story-closing h2 {
    margin: 0 0 clamp(1rem, 2vw, 1.35rem);
    color: var(--story-text);
    font-size: clamp(2rem, 3.8vw + 0.85rem, 4.8rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.story-copy p,
.story-caption,
.story-prose p,
.story-closing p {
    margin: 0;
    color: var(--story-muted);
    font-size: clamp(1rem, 0.42vw + 0.95rem, 1.16rem);
    line-height: 1.75;
    text-wrap: pretty;
}

.story-copy p + p,
.story-prose p + p {
    margin-top: 1rem;
}

.story-copy blockquote {
    margin: clamp(1.25rem, 3vw, 2rem) 0 0;
    padding-left: 1.2rem;
    border-left: 3px solid var(--story-accent);
    color: var(--story-text);
    font-size: clamp(1.15rem, 0.8vw + 1rem, 1.55rem);
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.story-reflection {
    padding-top: clamp(1rem, 2vw, 1.35rem);
    color: rgba(44, 44, 44, 0.62);
}

.story-video {
    position: relative;
    width: clamp(260px, 32vw, 380px);
    max-width: 100%;
    justify-self: center;
}

.story-video::before {
    content: "";
    position: absolute;
    inset: -12% -18%;
    z-index: 0;
    background:
        radial-gradient(ellipse 78% 68% at 42% 28%, rgba(244, 240, 227, 0.52), transparent 64%),
        radial-gradient(circle at 64% 58%, rgba(100, 130, 195, 0.16), transparent 58%),
        radial-gradient(circle at 22% 78%, rgba(44, 44, 44, 0.06), transparent 48%);
    filter: blur(14px);
    opacity: 0.88;
    pointer-events: none;
    animation: story-video-glow-live 7s ease-in-out infinite alternate;
}

@keyframes story-video-glow-live {
    from {
        opacity: 0.72;
    }

    to {
        opacity: 0.96;
    }
}

.story-video__frame {
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border: 1px solid rgba(44, 44, 44, 0.12);
    border-radius: clamp(1.05rem, 2.2vw, 1.45rem);
    background:
        radial-gradient(circle at 28% 20%, rgba(189, 173, 123, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(44, 44, 44, 0.97), rgba(44, 44, 44, 0.78));
    transform: translate3d(0, -0.45rem, 0);
    box-shadow:
        0 1px 0 rgba(244, 240, 227, 0.14) inset,
        0 14px 28px -18px rgba(44, 44, 44, 0.42),
        0 34px 72px -34px rgba(44, 44, 44, 0.38);
    transition:
        transform 0.55s var(--ease),
        box-shadow 0.55s var(--ease);
}

.story-video__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(244, 240, 227, 0.08), transparent 45%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.32), transparent 44%);
}

.story-video__frame iframe,
.story-video__frame video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    background-color: #2C2C2C;
}

@media (hover: hover) and (pointer: fine) {
    .story-video:hover .story-video__frame,
    .story-video:focus-within .story-video__frame {
        transform: translate3d(0, -0.9rem, 0);
        box-shadow:
            0 1px 0 rgba(244, 240, 227, 0.16) inset,
            0 18px 34px -18px rgba(44, 44, 44, 0.46),
            0 46px 90px -38px rgba(44, 44, 44, 0.42);
    }

    .story-chapter-section--dark .story-video:hover .story-video__frame,
    .story-chapter-section--dark .story-video:focus-within .story-video__frame {
        transform: translate3d(0, -0.9rem, 0);
        box-shadow:
            0 1px 0 rgba(244, 240, 227, 0.14) inset,
            0 24px 48px -16px rgba(0, 0, 0, 0.55),
            0 52px 100px -32px rgba(0, 0, 0, 0.65);
    }
}

/* Dark chapter sections: lift reel cards off warm charcoal with stronger depth */
.story-chapter-section--dark .story-video::before {
    background:
        radial-gradient(ellipse 78% 68% at 42% 28%, rgba(244, 240, 227, 0.38), transparent 62%),
        radial-gradient(circle at 64% 58%, rgba(100, 130, 195, 0.12), transparent 56%),
        radial-gradient(circle at 22% 78%, rgba(0, 0, 0, 0.22), transparent 48%);
    filter: blur(18px);
    opacity: 0.92;
}

.story-chapter-section--dark .story-video__frame {
    border-color: rgba(244, 240, 227, 0.16);
    box-shadow:
        0 1px 0 rgba(244, 240, 227, 0.12) inset,
        0 20px 44px -16px rgba(0, 0, 0, 0.5),
        0 48px 96px -34px rgba(0, 0, 0, 0.62);
}

.story-video__placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1rem;
    color: #F4F0E3;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 20%, rgba(189, 173, 123, 0.22), transparent 18rem),
        linear-gradient(135deg, rgba(44, 44, 44, 0.96), rgba(44, 44, 44, 0.76));
}

.story-video__placeholder p {
    margin: 0;
    color: rgba(244, 240, 227, 0.72);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.story-video__play {
    position: relative;
    width: clamp(3.25rem, 6vw, 5rem);
    aspect-ratio: 1;
    border: 1px solid rgba(244, 240, 227, 0.38);
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(244, 240, 227, 0.14), rgba(244, 240, 227, 0.04)),
        rgba(44, 44, 44, 0.24);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

.story-video__play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 53%;
    width: 0;
    height: 0;
    border-top: 0.48rem solid transparent;
    border-bottom: 0.48rem solid transparent;
    border-left: 0.72rem solid #F4F0E3;
    transform: translate(-50%, -50%);
}

.story-section__header {
    max-width: 48rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.story-video--wide {
    width: clamp(280px, 34vw, 400px);
    margin-inline: auto;
}

.story-caption {
    max-width: 44rem;
    margin-top: clamp(1rem, 2vw, 1.4rem);
}

.story-section--quote {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background:
        radial-gradient(circle at 76% 50%, rgba(189, 173, 123, 0.14), transparent 20rem),
        var(--color-warm-light);
}

.story-quote {
    max-width: min(76rem, 90vw);
}

.story-quote blockquote {
    max-width: 58rem;
    margin: 0;
    color: var(--story-text);
    font-size: clamp(2rem, 4.6vw, 5.6rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.story-prose {
    width: min(90vw, 44rem);
    margin-inline: auto;
}

.story-section--editorial {
    padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.story-closing {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background:
        linear-gradient(180deg, rgba(244, 240, 227, 0), var(--color-warm-light) 100%);
}

.story-closing .story-container {
    max-width: 52rem;
}

.story-footer {
    border-top: 1px solid var(--story-border);
    padding: 2.25rem 0;
    background: var(--color-warm-light);
    color: var(--story-muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.story-footer a:hover,
.story-footer a:focus-visible {
    color: var(--color-accent-on-light);
}

@media (max-width: 900px) {
    .story-chapter-section__grid,
    .story-split {
        grid-template-columns: 1fr;
    }

    .story-chapter-section--reverse .story-chapter-section__copy,
    .story-chapter-section--reverse .story-chapter-section__video {
        order: initial;
    }

    .story-section--reverse .story-copy,
    .story-section--reverse .story-video {
        order: initial;
    }

    .story-copy {
        max-width: var(--story-prose);
    }

    .story-chapter-section__copy {
        max-width: var(--story-prose);
    }

    .story-video {
        width: min(78vw, 320px);
        margin: clamp(2.75rem, 8vw, 4rem) auto 0;
    }
}

@media (max-width: 640px) {
    .story-container {
        width: min(90vw, 34rem);
    }

    .story-section {
        padding: clamp(3.5rem, 14vw, 5.25rem) 0;
    }

    .story-chapter-section {
        padding: clamp(3.75rem, 14vw, 5.5rem) 0;
    }

    .story-chapter-section--first {
        padding-top: calc(var(--header-height) + clamp(2.5rem, 10vw, 4rem));
    }

    .story-chapter-section__copy h1,
    .story-chapter-section__copy h2 {
        font-size: clamp(2.35rem, 10vw, 3.75rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-video__frame,
    .story-video__play {
        transition: none;
    }

    .story-video::before {
        animation: none;
        opacity: 0.85;
    }
}

@media (pointer: coarse) {
    .story-video__frame {
        transform: none;
        margin-top: -0.45rem;
        transition: margin 0.55s var(--ease), box-shadow 0.55s var(--ease);
    }
}

@media (pointer: coarse) and (prefers-reduced-motion: reduce) {
    .story-video__frame {
        margin-top: -0.35rem;
        transition: none;
    }
}
