/* ========================================
   About Page - Interactive Story Scroll
   ======================================== */

/* Reset for story page */
.about-story {
    overflow-x: hidden;
}

/* When in horizontal scroll mode - lock body scroll */
body.story-scroll-active {
    overflow: hidden;
    height: 100vh;
}

/* Hide header on about story page for full immersion */
body:has(.about-story) .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* Keep header visible during horizontal scroll section */
body.story-scroll-active .site-header {
    transform: translateY(0);
}

/* ========================================
   Intro Section - Full Screen
   ======================================== */
.story-intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    position: relative;
}

.story-intro-content {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.story-intro-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 2rem;
}

.story-intro-content .brand-name {
    font-style: italic;
}

.story-scroll-hint {
    font-size: 1.2rem;
    color: var(--color-primary);
    opacity: 0.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.story-arrow-down {
    animation: bounceDown 2s ease-in-out infinite;
}

.story-arrow-down svg {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(15px);
    }
    60% {
        transform: translateY(8px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* ========================================
   Horizontal Scroll Section
   ======================================== */
.story-horizontal-wrapper {
    position: relative;
    height: 100vh;
}

.story-horizontal-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: var(--color-secondary);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* When scroll mode is active, show the container */
body.story-scroll-active .story-horizontal-container {
    opacity: 1;
    pointer-events: auto;
}

.story-track {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 0.5s ease-out;
}

/* ========================================
   Individual Story Slides
   ======================================== */
.story-slide {
    min-width: 100vw;
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 6rem;
    box-sizing: border-box;
    overflow: hidden;
}

/* Slides 2 and 3 - transparent/secondary background */
.story-slide[data-index="1"],
.story-slide[data-index="2"] {
    background-color: transparent;
}

.story-slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

/* Layout variations - text left/right */
.story-layout-left .story-text {
    order: 1;
}
.story-layout-left .story-lottie {
    order: 2;
}

.story-layout-right .story-text {
    order: 2;
}
.story-layout-right .story-lottie {
    order: 1;
}

/* ========================================
   Story Text Styling
   ======================================== */
.story-text {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.story-slide.active .story-text {
    opacity: 1;
    transform: translateX(0);
}

.story-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.3;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.story-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-width: 500px;
}

/* ========================================
   Lottie Animation Container
   ======================================== */
.story-lottie {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.story-slide.active .story-lottie {
    opacity: 1;
    transform: translateX(0);
}

.story-lottie dotlottie-player {
    width: 100%;
    max-width: 450px;
    height: auto;
    aspect-ratio: 1;
}

/* Slides 2 and 3 - transparent Lottie background */
.story-slide[data-index="1"] .story-lottie dotlottie-player,
.story-slide[data-index="2"] .story-lottie dotlottie-player {
    background: transparent !important;
}

/* ========================================
   Outro Section - Thank You
   ======================================== */
.story-outro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    position: relative;
}

.story-outro-content {
    text-align: center;
    padding: 2rem;
    max-width: 700px;
}

.story-thankyou-heading {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.story-thankyou-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2.5rem;
}

.story-outro .cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 18px 50px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: background 0.3s, transform 0.3s;
    font-size: 1.1rem;
}

.story-outro .cta-button:hover {
    transform: scale(1.05);
    background-color: #4a2d2d;
}

/* ========================================
   Progress Indicator (optional)
   ======================================== */
.story-progress {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.story-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-primary);
    opacity: 0.3;
    transition: opacity 0.3s, transform 0.3s;
}

.story-progress-dot.active {
    opacity: 1;
    transform: scale(1.3);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .story-slide {
        padding: 2rem;
    }

    .story-slide-content {
        gap: 2rem;
    }

    .story-lottie dotlottie-player {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .story-horizontal-wrapper {
        height: auto;
    }

    .story-horizontal-container {
        position: relative;
        height: auto;
        overflow: visible;
    }

    .story-track {
        flex-direction: column;
        transform: none !important;
    }

    .story-slide {
        min-width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 3rem 1.5rem;
    }

    .story-slide-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Reset order for mobile - always text first */
    .story-layout-left .story-text,
    .story-layout-right .story-text {
        order: 1;
    }
    .story-layout-left .story-lottie,
    .story-layout-right .story-lottie {
        order: 2;
    }

    /* Reset transforms for mobile */
    .story-text,
    .story-layout-right .story-text,
    .story-lottie,
    .story-layout-right .story-lottie {
        transform: translateY(30px);
    }

    .story-slide.active .story-text,
    .story-slide.active .story-lottie {
        transform: translateY(0);
    }

    .story-lottie dotlottie-player {
        max-width: 300px;
    }

    .story-number {
        font-size: 3rem;
    }

    .story-text p {
        max-width: 100%;
    }

    .story-progress {
        display: none;
    }
}
