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

html, body {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100vh;
    background: #f2ece0;
    color: #2d3a2e;
    font-family: 'Quicksand', sans-serif;
}

.scroll-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 500vw;
    height: 100vh;
}

.chamber {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
}

/* Chamber backgrounds */
.chamber-1 { background: #f2ece0; }
.chamber-2 { background: #faf7f0; }
.chamber-3 { background: #f2ece0; }
.chamber-4 { background: #faf7f0; }
.chamber-5 { background: #f2ece0; }

/* Typography */
.site-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(4rem, 10vw, 8rem);
    color: #2d3a2e;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 1px 1px 0 rgba(212, 198, 172, 0.3);
}

.subtitle {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    color: #8a9e8b;
    margin-top: 1rem;
}

.body-text {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 400;
    line-height: 1.85;
    letter-spacing: 0.015em;
    max-width: 28ch;
    color: #2d3a2e;
}

/* Chamber 1 */
.chamber-1 .chamber-content {
    position: absolute;
    top: 35%;
    left: 15%;
}

.chamber-1 .vine-growing {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 600px;
}

.vine-growing path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawVine 3s ease-out forwards;
}

@keyframes drawVine {
    to { stroke-dashoffset: 0; }
}

.scroll-hint {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    animation: pulseHint 2s ease-in-out infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) translateX(0); }
    50% { opacity: 0.8; transform: translateY(-50%) translateX(5px); }
}

/* Floating elements */
.floating-element {
    position: absolute;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaf-1 { top: 20%; left: 60%; animation: float1 22s ease-in-out infinite; }
.leaf-2 { top: 55%; left: 70%; animation: float2 18s ease-in-out infinite 2s; }
.leaf-3 { top: 30%; left: 80%; animation: float3 25s ease-in-out infinite 4s; }
.seed-1 { top: 65%; left: 45%; animation: float1 20s ease-in-out infinite 1s; }
.leaf-4 { top: 15%; left: 40%; animation: float2 23s ease-in-out infinite 3s; }
.leaf-5 { top: 70%; left: 25%; animation: float3 19s ease-in-out infinite 5s; }
.tendril-1 { top: 45%; left: 85%; animation: float1 26s ease-in-out infinite 2s; }
.leaf-6 { top: 80%; left: 55%; animation: float2 21s ease-in-out infinite 6s; }

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    33% { transform: translateY(-12px) rotate(3deg); opacity: 0.55; }
    66% { transform: translateY(-5px) rotate(-2deg); opacity: 0.45; }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.35; }
    50% { transform: translateY(-15px) rotate(5deg); opacity: 0.6; }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    40% { transform: translateY(-10px) rotate(-4deg); opacity: 0.5; }
    70% { transform: translateY(-8px) rotate(2deg); opacity: 0.55; }
}

/* Chamber 2 - Roots */
.chamber-2 .chamber-text {
    position: absolute;
    top: 12%;
    left: 10%;
}

.root-system {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 65%;
}

.root-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease-out;
}

.root-path.revealed {
    stroke-dashoffset: 0;
}

.root-label {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.2vw, 1.05rem);
    color: #3d3632;
    transform: rotate(-5deg);
}

/* Chamber 3 - Branches */
.branch-system {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    height: 80%;
}

.branch-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2.5s ease-out;
}

.branch-path.revealed {
    stroke-dashoffset: 0;
}

.branch-label {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    color: #3d3632;
}

/* Chamber 4 - Canopy */
.orbit-paths {
    position: absolute;
    top: 5%;
    left: 10%;
    width: 80%;
    height: 90%;
}

.canopy-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
}

.orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.orbit-element {
    position: absolute;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.oe-1 { top: 20%; left: 55%; animation: orbit1 40s linear infinite; }
.oe-2 { top: 35%; left: 70%; animation: orbit2 35s linear infinite 5s; }
.oe-3 { top: 60%; left: 30%; animation: orbit1 45s linear infinite 10s; }
.oe-4 { top: 40%; left: 25%; animation: orbit2 38s linear infinite 3s; }
.oe-5 { top: 70%; left: 60%; animation: orbit1 42s linear infinite 8s; }
.oe-6 { top: 25%; left: 40%; animation: orbit2 50s linear infinite 2s; }
.oe-7 { top: 65%; left: 75%; animation: orbit1 36s linear infinite 12s; }

@keyframes orbit1 {
    0% { transform: rotate(0deg) translateX(30px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(30px) rotate(-360deg); }
}

@keyframes orbit2 {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(-360deg) translateX(50px) rotate(360deg); }
}

/* Chamber 5 - Horizon */
.horizon-question {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.horizon-question h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #2d3a2e;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.horizon-line {
    position: absolute;
    top: 62%;
    left: 0;
    width: 100%;
    height: 10px;
}

.seed-rise-1 { bottom: 20%; left: 35%; animation: seedRise 20s ease-in-out infinite; }
.seed-rise-2 { bottom: 15%; left: 50%; animation: seedRise 25s ease-in-out infinite 3s; }
.seed-rise-3 { bottom: 18%; left: 65%; animation: seedRise 22s ease-in-out infinite 7s; }

@keyframes seedRise {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-30px); opacity: 0.6; }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    bottom: 24px;
    left: 5vw;
    width: 90vw;
    height: 20px;
    z-index: 100;
}

.progress-bar svg {
    width: 100%;
    height: 100%;
}

.progress-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 0.3s ease-out;
}

.progress-marker {
    transition: fill 0.3s ease;
}

.progress-marker.active {
    fill: #c4734f;
}

/* Magnetic element hover enhancement */
.magnetic-element {
    will-change: transform;
}

/* Root brown accent usage */
.root-label span {
    border-bottom: 1px solid #6b4e3d;
}

/* Mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
        height: auto;
    }

    .scroll-track {
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .chamber {
        width: 100%;
        height: auto;
        min-height: 100vh;
        scroll-snap-align: start;
    }

    .progress-bar {
        display: none;
    }

    .site-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .chamber-1 .chamber-content {
        left: 8%;
        top: 30%;
    }
}
