/* ============================================================
   historic.quest -- Cinematic Museum Walkthrough
   Palette:
     #0c0c10 Void          (background darkest)
     #18181e Chamber       (background dark)
     #1a1815 Archive       (background warm sepia)
     #c8c0b8 Parchment     (body text)
     #e8e0d8 Spotlight     (headlines, emphasis)
     #7a7268 Whisper       (secondary text)
     #d8d0c8 Quote Light   (pull-quote text)
     #3a3a44 Thread        (vertical timeline line)
     #c89848 Amber Glow    (terminal accent)
     #4a4840 Archive Line  (dividers, pull-quote rules)
     #ffffff (used only inside text-shadow rgba)
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0c0c10;
    color: #c8c0b8;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 400;
    line-height: 1.9;
    font-size: clamp(1.05rem, 1.25vw, 1.15rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ------------------------------------------------------------
   The vertical timeline spine -- runs from section 2 to section 8
   ------------------------------------------------------------ */
.timeline-spine {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 600ms ease;
}

.timeline-spine.visible {
    opacity: 1;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: #3a3a44;
    transform-origin: top center;
    transform: scaleY(var(--timeline-progress, 0));
    transition: transform 120ms linear;
}

.timeline-dot {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%) scale(0);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c89848;
    box-shadow: 0 0 12px rgba(200, 152, 72, 0.4);
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-dot.visible {
    transform: translate(-50%, 50%) scale(1);
}

/* ------------------------------------------------------------
   Cinema container
   ------------------------------------------------------------ */
.cinema {
    position: relative;
    z-index: 2;
}

.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 8rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* radial vignette pseudo for context + aftermath */
.vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(12, 12, 16, 0.6) 100%);
    z-index: 0;
}

/* ------------------------------------------------------------
   Section 1 -- The Darkness
   ------------------------------------------------------------ */
.section-darkness {
    background: #0c0c10;
    min-height: 100vh;
    justify-content: center;
}

.darkness-stack {
    position: relative;
    width: 100%;
    max-width: 40rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.darkness-line {
    opacity: 0;
    color: #e8e0d8;
    text-shadow:
        0 0 40px rgba(200, 192, 184, 0.08),
        0 0 80px rgba(200, 192, 184, 0.04),
        0 0 30px rgba(255, 255, 255, 0.05);
}

.darkness-line.listen {
    font-family: "Bebas Neue", "Oswald", sans-serif;
    font-size: clamp(1.4rem, 2.2vw, 1.7rem);
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    animation: fadeInOut 3s ease forwards;
    animation-delay: 0.5s;
}

.darkness-line.site-name {
    font-family: "Bebas Neue", "Oswald", sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    letter-spacing: 0.15em;
    color: #e8e0d8;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 3s;
}

.darkness-line.site-date {
    font-family: "IBM Plex Mono", "Menlo", monospace;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: #c8c0b8;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 4.5s;
}

.darkness-line.site-place {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.1rem;
    color: #7a7268;
    letter-spacing: 0.05em;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 6s;
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 7.5s;
    color: #7a7268;
}

.scroll-hint-label {
    font-family: "IBM Plex Mono", "Menlo", monospace;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.3em;
}

.scroll-hint-arrow {
    font-size: 1rem;
    animation: scrollNudge 2.6s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInOut {
    0%   { opacity: 0; }
    27%  { opacity: 1; }
    66%  { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes scrollNudge {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ------------------------------------------------------------
   Section 2-3 -- The Context
   ------------------------------------------------------------ */
.section-context {
    background: #18181e;
    padding: 16rem 2rem;
}

.context-column {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
}

.context-column p {
    margin-bottom: 2.6rem;
    color: #c8c0b8;
    font-weight: 400;
}

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

/* ------------------------------------------------------------
   Section markers
   ------------------------------------------------------------ */
.section-marker {
    font-family: "Bebas Neue", "Oswald", sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    letter-spacing: 0.3em;
    color: #7a7268;
    text-align: center;
    margin-bottom: 4rem;
    text-shadow:
        0 0 40px rgba(200, 192, 184, 0.08),
        0 0 80px rgba(200, 192, 184, 0.04);
}

/* ------------------------------------------------------------
   Section 4-5 -- The Moment
   ------------------------------------------------------------ */
.section-moment {
    background: #0c0c10;
    padding: 12rem 2rem;
    align-items: stretch;
    justify-content: flex-start;
}

.moment-headline {
    font-family: "Bebas Neue", "Oswald", sans-serif;
    font-weight: 400;
    color: #e8e0d8;
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.15em;
    line-height: 1.2;
    max-width: 56rem;
    margin: 0 auto 8rem auto;
    padding: 0 1rem;
    opacity: 0;
    text-shadow:
        0 0 40px rgba(200, 192, 184, 0.12),
        0 0 80px rgba(200, 192, 184, 0.06),
        0 0 30px rgba(255, 255, 255, 0.05);
}

.moment-headline.snap-in {
    opacity: 1;
    transition: none;
}

.moment-grid {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 5%;
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
}

.moment-text {
    grid-column: 1;
}

.moment-text p {
    margin-bottom: 2rem;
    color: #c8c0b8;
}

.moment-timeline {
    grid-column: 2;
    will-change: transform;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
    padding-top: 0.4rem;
}

.timeline-event {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-left: 1.2rem;
    border-left: 1px solid #3a3a44;
}

.timeline-time {
    font-family: "IBM Plex Mono", "Menlo", monospace;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #c89848;
}

.timeline-place {
    font-family: "IBM Plex Mono", "Menlo", monospace;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #8a8278;
    text-transform: uppercase;
}

.timeline-detail {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #c8c0b8;
    margin-top: 0.4rem;
}

/* ------------------------------------------------------------
   Section 6-7 -- The Aftermath
   ------------------------------------------------------------ */
.section-aftermath {
    background: #1a1815;
    padding: 14rem 2rem;
}

.aftermath-column {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
}

.aftermath-column > p {
    margin-bottom: 2.5rem;
    color: #c8c0b8;
}

.quote-block {
    margin: 5rem 0;
    text-align: center;
    position: relative;
}

.quote-line {
    width: 100%;
    height: 2px;
    margin-bottom: 2.5rem;
    overflow: visible;
}

.quote-line-path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 800ms ease-out;
}

.quote-line.drawn .quote-line-path {
    stroke-dashoffset: 0;
}

.quote-block blockquote {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 300;
    color: #d8d0c8;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    line-height: 1.7;
    max-width: 36rem;
    margin: 0 auto;
}

.quote-block blockquote p {
    margin-bottom: 1.4rem;
}

.quote-block cite {
    display: block;
    font-style: italic;
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #7a7268;
    letter-spacing: 0.04em;
    font-family: "Cormorant Garamond", Georgia, serif;
}

/* ------------------------------------------------------------
   Section 8 -- The Echo
   ------------------------------------------------------------ */
.section-echo {
    background: #0c0c10;
    padding: 10rem 2rem 12rem;
    text-align: center;
}

.echo-column {
    position: relative;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.echo-text {
    color: #c8c0b8;
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.85;
}

.echo-date {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: #d8d0c8;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    margin-top: 1rem;
    text-shadow:
        0 0 40px rgba(200, 192, 184, 0.1),
        0 0 80px rgba(200, 192, 184, 0.05);
}

.echo-line-svg {
    width: 100vw;
    height: 2px;
    margin-top: 3rem;
    overflow: visible;
}

.echo-line-left,
.echo-line-right {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1000ms ease-out;
}

.echo-line-svg.drawn .echo-line-left,
.echo-line-svg.drawn .echo-line-right {
    stroke-dashoffset: 0;
}

/* ------------------------------------------------------------
   Reveal pattern (IntersectionObserver-driven)
   ------------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 800px) {
    .moment-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .moment-text,
    .moment-timeline {
        grid-column: 1;
    }
    .moment-timeline {
        transform: none !important;
    }
    .section {
        padding: 6rem 1.4rem;
    }
    .section-context,
    .section-aftermath {
        padding: 9rem 1.4rem;
    }
    .section-moment {
        padding: 8rem 1.4rem;
    }
}

/* ------------------------------------------------------------
   prefers-reduced-motion: drop parallax + sequential reveals
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .moment-headline {
        opacity: 1;
    }
    .timeline-line {
        transform: scaleY(1);
        transition: none;
    }
    .timeline-dot {
        transform: translate(-50%, 50%) scale(1);
        transition: none;
    }
    .moment-timeline {
        transform: none !important;
    }
    .quote-line-path,
    .echo-line-left,
    .echo-line-right {
        stroke-dashoffset: 0;
        transition: none;
    }
    .darkness-line {
        opacity: 1 !important;
        animation: none !important;
    }
    .scroll-hint {
        opacity: 1;
        animation: none;
    }
    .scroll-hint-arrow {
        animation: none;
    }
}
