/* ========================================================
   mosoon.org — Cinematic Monsoon Chronicle
   Ma-Negative-Space Layout with Scroll-Triggered Scenes
   ======================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: #3A2818;
    background-color: #F8F4EC;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: #1A1008;
    letter-spacing: 0.02em;
}

h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    color: #1A1008;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 0.5rem;
}

/* --- Scenes (General) --- */
.scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.scene-content {
    position: relative;
    z-index: 2;
    max-width: 55%;
    padding: 6vh 8vw 10vh;
}

.scene-label {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #7A6848;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: block;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scene-heading {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.15s, transform 1s ease 0.15s;
}

.scene-body p {
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.scene-body p:nth-child(2) {
    transition-delay: 0.45s;
}

/* Revealed state */
.scene.revealed .scene-label,
.scene.revealed .scene-heading,
.scene.revealed .scene-body p,
.scene.revealed .data-grid,
.scene.revealed .tutorial-steps,
.scene.revealed .chronicle-grid,
.scene.revealed .accent-bar {
    opacity: 1;
    transform: translateY(0);
}

/* --- Photography Wash Background --- */
.photography-wash {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #E8E0D0;
    opacity: 0.1;
    filter: contrast(1.1) saturate(0.8);
}

.photography-wash.wash-alt {
    background: linear-gradient(135deg, #E8E0D0 0%, #F8F4EC 50%, #E8E0D0 100%);
    opacity: 0.15;
}

/* --- Leaf Motifs --- */
.leaf {
    position: absolute;
    z-index: 1;
    color: #C06828;
    opacity: 0.12;
    pointer-events: none;
}

.leaf svg {
    width: 100%;
    height: 100%;
}

@keyframes leafDrift {
    0% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-8px); }
    100% { transform: rotate(-3deg) translateY(0); }
}

@keyframes leafDriftAlt {
    0% { transform: rotate(2deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-6px); }
    100% { transform: rotate(2deg) translateY(0); }
}

@keyframes leafDriftSlow {
    0% { transform: rotate(-1deg) translateX(0); }
    50% { transform: rotate(2deg) translateX(-5px); }
    100% { transform: rotate(-1deg) translateX(0); }
}

/* Hero leaves */
.leaf-hero-1 {
    top: 8vh;
    right: 8vw;
    width: 80px;
    animation: leafDrift 8s ease-in-out infinite;
}

.leaf-hero-2 {
    bottom: 15vh;
    right: 15vw;
    width: 55px;
    animation: leafDriftAlt 10s ease-in-out infinite;
}

.leaf-hero-3 {
    top: 25vh;
    right: 35vw;
    width: 65px;
    opacity: 0.08;
    animation: leafDriftSlow 12s ease-in-out infinite;
}

/* Section leaves */
.leaf-section-left {
    top: 10vh;
    left: -20px;
    width: 60px;
    animation: leafDrift 9s ease-in-out infinite;
}

.leaf-section-right {
    top: 12vh;
    right: 5vw;
    width: 70px;
    animation: leafDriftAlt 11s ease-in-out infinite;
}

.leaf-science-1 {
    top: 5vh;
    right: 10vw;
    width: 50px;
    animation: leafDrift 10s ease-in-out infinite;
}

.leaf-science-2 {
    bottom: 10vh;
    right: 3vw;
    width: 40px;
    animation: leafDriftSlow 13s ease-in-out infinite;
}

.leaf-living-1 {
    top: 8vh;
    left: 3vw;
    width: 75px;
    animation: leafDriftAlt 9s ease-in-out infinite;
}

.leaf-chronicle-1 {
    bottom: 12vh;
    right: 6vw;
    width: 55px;
    animation: leafDrift 11s ease-in-out infinite;
}

.leaf-closing-1 {
    top: 10vh;
    left: 5vw;
    width: 70px;
    animation: leafDriftSlow 10s ease-in-out infinite;
}

.leaf-closing-2 {
    top: 30vh;
    right: 8vw;
    width: 45px;
    animation: leafDriftAlt 12s ease-in-out infinite;
}

/* ========================================================
   SCENE: Hero / Opening Sequence
   ======================================================== */
.scene-hero {
    min-height: 100vh;
    align-items: flex-end;
    justify-content: flex-start;
    background-color: #F8F4EC;
}

.hero-content {
    padding: 0 8vw 12vh;
    max-width: 60%;
}

.hero-accent-mark {
    width: 40px;
    height: 4px;
    background-color: #C06828;
    margin-bottom: 2rem;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 1.2s ease 0.6s, transform 1.2s ease 0.6s;
}

.scene-hero.revealed .hero-accent-mark {
    opacity: 1;
    transform: scaleX(1);
}

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 7rem);
    color: #1A1008;
    line-height: 1;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s ease 0.3s, transform 1.5s ease 0.3s;
}

.scene-hero.revealed .hero-title {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    color: #7A6848;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease 0.9s, transform 1.2s ease 0.9s;
}

.scene-hero.revealed .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3vh;
    right: 8vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
    opacity: 0;
    transition: opacity 1.5s ease 1.5s;
}

.scene-hero.revealed .scroll-indicator {
    opacity: 1;
}

.scroll-indicator-text {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: #7A6848;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-indicator-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #C06828, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ========================================================
   SCENE: Arrival
   ======================================================== */
.scene-arrival {
    background-color: #F8F4EC;
    align-items: center;
}

.arrival-content {
    padding: 8vh 8vw;
    max-width: 50%;
}

.accent-bar {
    width: 60px;
    height: 3px;
    background-color: #C06828;
    margin-top: 2rem;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

/* ========================================================
   SCENE: Patterns
   ======================================================== */
.scene-patterns {
    background-color: #F8F4EC;
    align-items: flex-end;
    justify-content: flex-end;
}

.patterns-content {
    padding: 8vh 8vw 10vh;
    max-width: 55%;
    margin-left: auto;
}

.data-grid {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.data-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.data-value {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #C06828;
    line-height: 1;
}

.data-label {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    color: #7A6848;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ========================================================
   SCENE: Science / Tutorial Steps
   ======================================================== */
.scene-science {
    background-color: #F8F4EC;
    align-items: center;
    min-height: 120vh;
}

.science-content {
    padding: 8vh 8vw;
    max-width: 55%;
}

.tutorial-steps {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.tutorial-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: #C06828;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.5;
}

.step-content h3 {
    margin-bottom: 0.4rem;
}

.step-content p {
    color: #3A2818;
    line-height: 1.8;
}

/* ========================================================
   SCENE: Living With Monsoon
   ======================================================== */
.scene-living {
    background-color: #F8F4EC;
    align-items: flex-end;
}

.living-content {
    padding: 8vh 8vw 12vh;
    max-width: 50%;
    margin-left: auto;
    margin-right: 10vw;
}

/* ========================================================
   SCENE: Chronicle
   ======================================================== */
.scene-chronicle {
    background-color: #F8F4EC;
    align-items: center;
    min-height: 110vh;
}

.chronicle-content {
    padding: 8vh 8vw;
    max-width: 60%;
}

.chronicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.chronicle-item {
    border-top: 2px solid #C06828;
    padding-top: 1.2rem;
}

.chronicle-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.chronicle-item p {
    font-size: 0.9rem;
    color: #7A6848;
    line-height: 1.7;
}

/* ========================================================
   SCENE: Closing / Footer
   ======================================================== */
.scene-closing {
    background-color: #1A1008;
    min-height: 70vh;
    align-items: center;
    justify-content: center;
}

.scene-closing .leaf {
    color: #A05828;
    opacity: 0.08;
}

.closing-content {
    text-align: center;
    max-width: 100%;
    padding: 8vh 8vw;
}

.closing-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #F8F4EC;
    letter-spacing: 0.06em;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1s ease, transform 1s ease;
}

.scene-closing.revealed .closing-title {
    opacity: 1;
    transform: translateY(0);
}

.closing-tagline {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    color: #7A6848;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.scene-closing.revealed .closing-tagline {
    opacity: 1;
    transform: translateY(0);
}

.closing-divider {
    width: 50px;
    height: 2px;
    background-color: #C06828;
    margin: 2rem auto;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}

.scene-closing.revealed .closing-divider {
    opacity: 1;
    transform: scaleX(1);
}

.closing-note {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #7A6848;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease 0.9s, transform 1s ease 0.9s;
}

.scene-closing.revealed .closing-note {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 1024px) {
    .scene-content {
        max-width: 70%;
    }

    .hero-content {
        max-width: 75%;
    }

    .patterns-content {
        max-width: 70%;
    }

    .chronicle-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .data-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .scene-content {
        max-width: 90%;
        padding: 5vh 6vw 8vh;
    }

    .hero-content {
        max-width: 90%;
        padding: 0 6vw 8vh;
    }

    .patterns-content {
        max-width: 90%;
        margin-left: 0;
    }

    .living-content {
        max-width: 90%;
        margin-right: 0;
        margin-left: 0;
    }

    .chronicle-content {
        max-width: 90%;
    }

    .data-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .tutorial-step {
        flex-direction: column;
        gap: 0.8rem;
    }

    .leaf {
        display: none;
    }

    .scene {
        align-items: flex-end;
        justify-content: flex-start;
    }

    .scene-patterns {
        justify-content: flex-start;
    }

    .scene-science {
        min-height: 100vh;
    }

    .scene-chronicle {
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .scene-heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .scene-content {
        max-width: 95%;
        padding: 4vh 5vw 6vh;
    }
}
