:root {
    --color-sky-predawn: #0a0b0e;
    --color-sky-dawn: #2c2f38;
    --color-sky-golden: #8a6a4b;
    --color-text-primary: #fdfbf7;
    --color-text-secondary: rgba(253, 251, 247, 0.8);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --spacing-base: 1rem;
}

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

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Lock scroll during prologue */
    background-color: var(--color-sky-predawn);
    color: var(--color-text-primary);
    font-family: var(--font-body);
}

#app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

/* =========================================
   SCENE COMMON
   ========================================= */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   SCENE 1: HERO
   ========================================= */
#scene-1 {
    display: flex;
    align-items: flex-end;
    /* Content near bottom/middle */
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a1128;
    /* deep navy */
    opacity: var(--overlay-opacity, 0);
    z-index: 5;
    pointer-events: none;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 105%;
    /* Slightly larger for panning */
    height: 105%;
    background-image: url('hero.png');
    background-size: cover;
    background-position: center bottom;
    opacity: 0;
    transform: scale(1.05);
    /* Start slightly zoomed in for slow pull out */
    transition: opacity 6s cubic-bezier(0.25, 1, 0.5, 1),
        transform 25s linear;
    /* Very slow, almost imperceptible pan/zoom */
}

.hero-image.visible {
    opacity: 1;
    transform: scale(1) translate(-1%, -1%);
}

.hero-content {
    width: 100%;
    padding: 10vh 8vw;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    margin-bottom: -20px;
    transition: opacity 3s ease 2s, margin-bottom 3s ease 2s;
    /* Delays to let image show first */
}

.hero-content.visible {
    opacity: 1;
    margin-bottom: 0;
}

.container {
    max-width: 600px;
    /* Comfortable reading width */
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-support {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    max-width: 480px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn {
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, color 0.4s ease;
    /* Do not transition transform, JS handles it */
    text-transform: uppercase;
}

.btn-primary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    position: relative;
    z-index: 100;
    /* Ensure it stays above everything even during transition */
}

.btn-primary:hover {
    background-color: #fff;
    /* Removed transform: translateY(-2px) to prevent fighting with JS */
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 100;
}

.btn-secondary:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* =========================================
   SCENE 0: PROLOGUE
   ========================================= */
#scene-0 {
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Let clicks pass through after transition */
}

.prologue-sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center bottom, var(--color-sky-dawn) 0%, var(--color-sky-predawn) 70%);
    z-index: -1;
    transition: opacity 7s ease-in-out;
}

/* We create a pseudo-element for the brightened sky and fade it in */
.prologue-sky::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center bottom, var(--color-sky-golden) 0%, var(--color-sky-dawn) 100%);
    opacity: 0;
    transition: opacity 7s ease-in-out;
    z-index: -1;
}

/* During transition, light increases */
.prologue-sky.brighten::after {
    opacity: 1;
}

/* We will fade out the entire sky wrapper later via JS or rely on image fade in */

.prologue-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(-5vh);
}

.logo {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 3s ease;
    text-transform: uppercase;
}

.logo.visible {
    opacity: 1;
}

.tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity 3s ease;
}

.tagline.visible {
    opacity: 1;
}

.prologue-content.fade-out {
    opacity: 0;
    transition: opacity 4s ease;
}

.prologue-quotes-container {
    margin-top: 2rem;
    position: relative;
    height: 4rem; /* Fixed height to prevent layout shifts */
    width: 80vw;
    max-width: 600px;
}

.prologue-quote {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    text-align: center;
    line-height: 1.5;
}

.prologue-quote-text {
    display: block;
    margin-bottom: 0.5rem;
}

.prologue-quote-author {
    display: block;
    width: 70%;
    margin: 0 auto;
    text-align: right;
    font-size: 0.85em;
    opacity: 0.8;
}

.prologue-quote.visible {
    opacity: 0.8;
}

/* =========================================
   SCENE 2: THE NEXT CHAPTER
   ========================================= */
#scene-2 {
    z-index: 2;
    pointer-events: none;
    /* Text only, no interaction needed yet */
}

.chapter-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Start exactly below the fold, so we scroll to reveal */
    padding: 100vh 5vw 0 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cinematic-text {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--color-text-primary);
    opacity: 0;
    /* JS handles fade in */
    transform: translateY(30px);
    /* JS animates to 0 */
}

/* =========================================
   EXPERIENCE CARDS (SCENE 2 EXTENSION)
   ========================================= */
.experience-cards-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Cards are visual only for now */
    z-index: 3;
}

.exp-card {
    position: absolute;
    padding: 1.8rem;
    background: #fdfbf7;
    /* Warm ivory premium paper */
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    /* Slightly sharper corners for paper feel */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Subtle shadows */
    opacity: 0;
    will-change: transform, opacity;
    color: #2a2a2a;
    /* Base dark charcoal */
}

.card-large {
    width: 340px;
}

.card-medium {
    width: 280px;
}

.card-small {
    width: 240px;
}

/* Special class for Card 5 to decouple background from text scaling */
.exp-card.has-bg-layer {
    background: transparent;
    border: none;
    box-shadow: none;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fdfbf7;
    /* Warm ivory premium paper */
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: -1;
    transform-origin: center center;
    will-change: transform, box-shadow;
}

.card-ui {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.card-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.5;
    color: #1a1a1a;
    /* Darkest charcoal for main typography */
    font-weight: 400;
    /* Increased slightly for better legibility on light background */
}

/* UI Fragments */
.hotel-ui {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hotel-thumb {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.hotel-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stars {
    color: #b89163;
    /* Slightly deeper muted gold for light background */
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.half-star {
    opacity: 0.4;
}

.review-snippet {
    font-size: 0.75rem;
    color: #666;
    /* Charcoal grey */
    font-style: italic;
    opacity: 0.9;
}

.transport-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.route-container {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
}

.route-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 2px 0;
}

.route-line .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
}

.route-line .line {
    flex-grow: 1;
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
    min-height: 16px;
}

.route-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #555;
}

.notif-badge {
    background: rgba(220, 100, 100, 0.08);
    color: #b34d4d;
    /* Muted brick red */
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.65rem;
    border: 1px solid rgba(220, 100, 100, 0.2);
    letter-spacing: 0.05em;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.check-item {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.8rem;
    color: #333;
}

.check-item.pending {
    color: rgba(0, 0, 0, 0.35);
}

.check-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.6rem;
}

.check-box.checked {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #444;
}

.check-box.empty {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.chat-ui {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-avatars {
    display: flex;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0dcd3;
    border: 2px solid #fdfbf7;
}

.av-1 {
    z-index: 2;
}

.av-2 {
    background: #d0c8bd;
    margin-left: -8px;
    z-index: 1;
}

.chat-bubble {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 12px 12px 12px 2px;
    font-size: 0.8rem;
    color: #555;
}

.receipt-ui {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #555;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 0.4rem;
}

/* =========================================
   SCROLL HINT
   ========================================= */
.scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 0.6;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    animation: scroll-bob 2s infinite ease-in-out;
}

/* Dark variant for ivory background */
.scroll-hint.dark .mouse {
    border-color: rgba(0, 0, 0, 0.3);
}

.scroll-hint.dark .wheel {
    background: rgba(0, 0, 0, 0.4);
}

.scroll-hint.dark .scroll-line {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

@keyframes scroll-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* =========================================
   RELIEF CHAPTER (FINAL REVEAL)
   ========================================= */
.final-reveal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    /* Ensures it stays within screen on mobile */
    font-size: clamp(2rem, 6vw, 4rem);
    /* Responsive font size */
    color: #1a1a1a;
    /* Dark charcoal */
    z-index: 4;
    /* Above the cards layer */
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    text-align: center;
}



.mouse {
    width: 26px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* =========================================
   MIST / PARTICLES (SUBTLE)
   ========================================= */
.mist {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.mist.layer-1 {
    animation: drift 60s linear infinite;
    opacity: 0.5;
}

.mist.layer-2 {
    animation: drift 90s linear infinite reverse;
    opacity: 0.3;
    transform: scale(1.5);
}

@keyframes drift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   SCROLLING BEHAVIOR (SCENE 1 ADVANCE)
   ========================================= */
body.scroll-active {
    overflow-y: auto;
    /* allow scroll after prologue */
}

/* Simulating camera advance on scroll via JS transform applied to hero-image */

/* =========================================
   PHILOSOPHY SEQUENCE
   ========================================= */
.philosophy-stmt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    color: #1a1a1a;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    will-change: opacity, transform;
    text-align: center;
}

.philosophy-text {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    /* Regular, readable size for supporting lines */
    font-weight: 300;
    line-height: 1.6;
}

.philosophy-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.philosophy-group .philosophy-text {
    position: static;
    transform: none;
    opacity: 1;
    /* Group handles overall opacity/transform in JS, except individual fades */
}

.accent-amber {
    color: #b89163;
    /* Always warm amber */
    font-weight: 400;
    /* Standard weight */
    transition: font-weight 1s ease-in-out;
}

.accent-amber.warm-up {
    font-weight: 600;
    /* Bolded for emphasis */
}

/* =========================================
   SCENE 3: SIGNATURE JOURNEY REVEAL
   ========================================= */
#scene-3 {
    z-index: 2;
    /* Below the ivory paper cards (z-index 3) so it reveals when ivory fades */
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.windows-wrapper {
    display: flex;
    gap: 16px;
    width: 90vw;
    height: 80vh;
    opacity: 0;
    transition: opacity 0.1s;
}

.windows-wrapper.is-revealed {
    opacity: 1;
}

.window-panel {
    position: relative;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100px);
    /* Start slightly below */
}

.panel-tiger {
    width: 30%;
}

.panel-beefalls {
    width: 40%;
}

.panel-marblerocks {
    width: 30%;
}

.windows-wrapper.is-revealed .panel-tiger {
    animation: slideUpReveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0s forwards;
}

.windows-wrapper.is-revealed .panel-beefalls {
    animation: slideUpReveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

.windows-wrapper.is-revealed .panel-marblerocks {
    animation: slideUpReveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.4s forwards;
}

@keyframes slideUpReveal {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.window-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.window-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    /* Covers the bottom half */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.window-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

/* Tiger: slow zoom in */
.img-tiger {
    transform: scale(1.05);
}

.windows-wrapper.is-revealed .img-tiger {
    animation: zoomInTiger 2s cubic-bezier(0.25, 1, 0.5, 1) 0.6s forwards;
}

@keyframes zoomInTiger {
    to {
        transform: scale(1.0);
    }
}

/* Bee Falls: pan top to bottom */
.img-beefalls {
    /* Scale slightly so we have room to pan vertically without breaking the mask */
    transform: scale(1.2) translateY(-8%);
}

.windows-wrapper.is-revealed .img-beefalls {
    animation: panDownBee 3s cubic-bezier(0.25, 1, 0.5, 1) 0.8s forwards;
}

@keyframes panDownBee {
    to {
        transform: scale(1.2) translateY(8%);
    }
}

/* Marble Rocks: zoom out */
.img-marblerocks {
    /* Start closer */
    transform: scale(1.1);
}

.windows-wrapper.is-revealed .img-marblerocks {
    animation: zoomOutMarble 2s cubic-bezier(0.25, 1, 0.5, 1) 1.0s forwards;
}

@keyframes zoomOutMarble {
    to {
        transform: scale(1.0);
    }
}

/* Typography Overlay */
.window-text {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--color-text-primary);
    opacity: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.05em;
    z-index: 2;
}

.windows-wrapper.is-revealed .panel-tiger .window-text {
    animation: fadeInText 1s ease 0.8s forwards;
}

.windows-wrapper.is-revealed .panel-beefalls .window-text {
    animation: fadeInText 1s ease 1.0s forwards;
}

.windows-wrapper.is-revealed .panel-marblerocks .window-text {
    animation: fadeInText 1s ease 1.2s forwards;
}

@keyframes fadeInText {
    to {
        opacity: 1;
    }
}

/* =========================================
   SCENE 3: JOURNEY EDITORIAL TEXT
   ========================================= */
.journey-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.journey-details {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 80px;
    /* generous breathing space */
    text-align: center;
    color: var(--color-text-primary);
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
}

.journey-details.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.journey-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 24px;
}

.journey-date {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.journey-meta {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 32px;
}

.journey-desc {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(253, 251, 247, 0.9);
}

/* Mobile Layout */
@media (max-width: 768px) {
    #scene-3 {
        align-items: flex-start;
        /* Start from the top instead of centering the massive column */
    }

    .windows-wrapper {
        flex-direction: column;
        width: 100vw;
        height: auto;
        gap: 0;
        padding-top: 5vh;
        /* Will be translated by JS to simulate scrolling through the stack */
    }

    .window-panel {
        width: 100% !important;
        height: 90vh;
        margin-bottom: 5vh;
    }
}

/* =========================================
   SCENE 4: AUTUMN HORIZONTAL SCROLL
   ========================================= */
#scene-4 {
    z-index: 1;
    /* Below scene-3 so that journey-details (z=2) can stay pinned over it! Wait, if scene-3 is z-index:2, it covers scene-4? */
    display: flex;
    align-items: center;
    background-color: transparent;
    /* Changed dynamically in JS */
}

/* Let's elevate scene-4 so it appears below scene-3's pinned text, but above the old images */
/* Actually, scene-3 should fade out its windows wrapper, keeping journey-details.
   We can make scene-4 z-index: 1, and ensure scene-3 windows fade out. */

.autumn-card-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradient overlay at the top to ensure pinned title text is readable */
.autumn-card-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    /* Above the stacked frames, behind the title text which is in a different scene */
    pointer-events: none;
}

.autumn-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* JS will crossfade this */
    will-change: opacity;
}

.autumn-img-wrapper {
    width: 80vw;
    height: 80vh;
    overflow: hidden;
    position: relative;
}

.autumn-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    opacity: 0.8;
    /* Subtle darkening for text readability */
    transform: scale(1.1);
    /* Buffer for panning */
}

/* Cinematic Animations */
.autumn-frame.is-active .img-pan-right {
    animation: panRight 20s linear forwards;
}

.autumn-frame.is-active .img-pan-left {
    animation: panLeft 20s linear forwards;
}

.autumn-frame.is-active .img-pan-up {
    animation: panUp 20s linear forwards;
}

.autumn-frame.is-active .img-zoom-in {
    animation: slowZoomIn 20s linear forwards;
}

.autumn-frame.is-active .img-zoom-out {
    animation: slowZoomOut 20s linear forwards;
}

@keyframes panRight {
    to {
        transform: scale(1.1) translateX(4%);
    }
}

@keyframes panLeft {
    to {
        transform: scale(1.1) translateX(-4%);
    }
}

@keyframes panUp {
    to {
        transform: scale(1.1) translateY(-4%);
    }
}

@keyframes slowZoomIn {
    to {
        transform: scale(1.2);
    }
}

@keyframes slowZoomOut {
    0% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Typography */
.autumn-text {
    position: absolute;
    bottom: 14vh;
    /* 4vh spacing from the bottom of the 80vh image container */
    left: calc(10vw + 4vh);
    /* 4vh spacing from the left of the 80vw image container */
    color: var(--color-text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.autumn-frame.is-active .autumn-text {
    opacity: 1;
    transform: translateY(0);
}

.autumn-city {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.autumn-caption {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* Color accents */
.accent-amber.burnt {
    color: #c96b34;
    /* Rich burnt amber */
}

.epilogue-together.accent-amber {
    color: #d19a4d;
    /* Warm gold accent established earlier */
}

/* =========================================
   SCENE 5: EPILOGUE
   ========================================= */
#scene-5 {
    z-index: 0;
    /* Let scene-1 button stay above */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.epilogue-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(252, 249, 242, 0) 0%, #ffffff 100%);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
}

.epilogue-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 5vh 0;
}

.epilogue-phrase {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    color: #1a1c23;
    margin-bottom: 24px;
    opacity: 0;
    will-change: transform, opacity;
}

.epilogue-together {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 3.5vw, 3rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 50px;
    /* Space between 'Together' and button */
    opacity: 0;
    will-change: opacity;
    padding-left: 5px;
}

.epilogue-button-target {
    width: 220px;
    height: 56px;
    margin-bottom: 30px;
    /* Space between button and logo */
}

.epilogue-logo {
    width: 100%;
    max-width: 480px;
    /* Increased to match width of "the first chapter" */
    opacity: 0;
    will-change: opacity;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .autumn-img-wrapper {
        width: 100vw;
        height: 100vh;
        /* Full screen on mobile */
    }

    .autumn-text {
        bottom: 8vh;
        left: 6vw;
    }

    /* .epilogue-together {
        padding-left: 2px;
    } */

    .epilogue-logo {
        max-width: 300px;
        /* 20% smaller on mobile */
    }

    .epilogue-button-target {
        margin-top: 40px;
        margin-bottom: 70px;
        /* Increased space between button and logo */
    }
}