/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #FAFAF5;
    --parchment: #F5EDE0;
    --dusty-rose: #C4A3A0;
    --deep-earth: #3D2B2B;
    --burgundy: #6B2D3E;
    --warm-tan: #D4B896;
    --dark-berry: #8B3A4A;
}

html {
    font-size: 16px;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--cream);
    color: var(--deep-earth);
    height: 100%;
    overflow: hidden;
}

/* === HORIZONTAL SCROLL CONTAINER === */
.scroll-container {
    display: flex;
    height: 100vh;
    width: 500vw;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* === PANELS === */
.panel {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.panel-1 { background-color: var(--cream); }
.panel-2 { background-color: var(--parchment); }
.panel-3 { background-color: var(--cream); }
.panel-4 { background-color: var(--parchment); }
.panel-5 { background-color: var(--cream); }

.panel-content {
    max-width: 680px;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s ease 0.3s, transform 0.9s ease 0.3s;
}

.panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
}

/* === TYPOGRAPHY === */
.panel-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--deep-earth);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.panel-text {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    color: var(--deep-earth);
    margin-bottom: 1.5rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.panel-epigraph {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    line-height: 1.6;
    color: var(--burgundy);
    border-left: 2px solid var(--dusty-rose);
    padding-left: 1.2rem;
    text-align: left;
    max-width: 480px;
    margin: 0 auto;
}

/* === SVG ILLUSTRATIONS === */
.svg-illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.svg-illustration svg {
    width: 100%;
    height: 100%;
}

.draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.panel.active .draw-path {
    stroke-dashoffset: 0;
}

.hatching line {
    stroke: #6B2D3E;
    stroke-width: 1.5;
}

/* === MEADOW LINE (transition between panels) === */
.meadow-line {
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 10%,
        var(--dusty-rose) 30%,
        var(--warm-tan) 50%,
        var(--dusty-rose) 70%,
        transparent 90%
    );
    opacity: 0.4;
}

/* === PROGRESS BAR === */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--parchment);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    width: 20%;
    background-color: var(--burgundy);
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === NAVIGATION DOTS === */
.panel-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 100;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--burgundy);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.4s ease, transform 0.3s ease;
    padding: 0;
}

.nav-dot.active {
    background-color: var(--burgundy);
    transform: scale(1.3);
}

.nav-dot:hover {
    background-color: var(--dusty-rose);
}

/* === SCROLL HINT === */
.scroll-hint {
    position: fixed;
    bottom: 60px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-hint span {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--burgundy);
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.scroll-hint svg {
    animation: nudge 2s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* === ORGANIC BLOBS (background decoration) === */
.panel::before {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    z-index: 0;
}

.panel-1::before {
    width: 400px;
    height: 400px;
    background: var(--dusty-rose);
    top: -100px;
    right: -100px;
}

.panel-2::before {
    width: 350px;
    height: 350px;
    background: var(--warm-tan);
    bottom: -80px;
    left: -80px;
}

.panel-3::before {
    width: 300px;
    height: 450px;
    background: var(--dusty-rose);
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
}

.panel-4::before {
    width: 380px;
    height: 380px;
    background: var(--warm-tan);
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
}

.panel-5::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--warm-tan) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .svg-illustration {
        width: 150px;
        height: 150px;
        margin-bottom: 1.5rem;
    }

    .panel-content {
        padding: 1.5rem;
    }

    .scroll-hint {
        right: 20px;
        bottom: 55px;
    }

    .scroll-hint span {
        display: none;
    }
}
