/* continuum.quest — Holographic Museum Installation */

/* ===== CSS Custom Properties ===== */
:root {
    --burnt-sienna: #CC6622;
    --ember-amber: #D4943A;
    --bone: #F5EDE0;
    --charred-walnut: #1E1410;
    --coffee: #3D2B1F;
    --parchment: #E8DBC5;
    --holo-teal: #2EC4B6;
    --holo-rose: #E84393;
    --holo-violet: #6C5CE7;
    --dusty-bronze: #8B7355;
    --left-ratio: 1fr;
    --right-ratio: 1fr;
}

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

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Epilogue', sans-serif;
    font-weight: 350;
    color: var(--coffee);
    background: var(--bone);
    overflow-x: hidden;
}

/* Grain overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    filter: url(#grain-filter);
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
    background: var(--bone);
}

/* ===== Scroll Container ===== */
#scroll-container {
    width: 100%;
}

/* ===== Section Layout ===== */
.section {
    display: grid;
    grid-template-columns: var(--left-ratio) var(--right-ratio);
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    transition: grid-template-columns 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#section-1 { --left-ratio: 1fr; --right-ratio: 1fr; }
#section-2 { --left-ratio: 35fr; --right-ratio: 65fr; }
#section-3 { --left-ratio: 70fr; --right-ratio: 30fr; }
#section-4 { --left-ratio: 1fr; --right-ratio: 0fr; }
#section-5 { --left-ratio: 1fr; --right-ratio: 1fr; }

.section-merged {
    grid-template-columns: 1fr !important;
}

/* ===== Panes ===== */
.pane {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.text-pane {
    background: var(--bone);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8vh 6vw;
    z-index: 2;
}

.text-pane-dark {
    background: var(--charred-walnut);
}

.visual-pane {
    background: var(--charred-walnut);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.merged-pane {
    position: relative;
    height: 100vh;
    background: var(--charred-walnut);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: crosshair;
}

/* ===== Typography ===== */
.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--dusty-bronze);
    margin-bottom: 1.5rem;
    display: block;
}

.section-label-light {
    color: var(--dusty-bronze);
}

.section-title {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 7vw;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: var(--burnt-sienna);
    text-shadow: 0 0 40px rgba(204, 102, 34, 0.15);
    margin-bottom: 2rem;
}

.section-title-light {
    color: var(--parchment);
    text-shadow: 0 0 40px rgba(204, 102, 34, 0.25);
}

.narrative {
    font-family: 'Epilogue', sans-serif;
    font-weight: 350;
    font-size: 1.125rem;
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: var(--coffee);
    max-width: 520px;
    margin-bottom: 1.25rem;
}

.narrative-light {
    color: var(--parchment);
}

.narrative.emphasis {
    font-weight: 480;
    font-variation-settings: 'wght' 480;
}

/* ===== Vintage Photo Backgrounds ===== */
.vintage-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.photo-1 {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(204, 102, 34, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(212, 148, 58, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(139, 115, 85, 0.3) 0%, transparent 70%),
        conic-gradient(from 45deg at 50% 50%, rgba(30, 20, 16, 0.6), rgba(204, 102, 34, 0.3), rgba(245, 237, 224, 0.2), rgba(30, 20, 16, 0.6));
}

.photo-2 {
    background:
        radial-gradient(circle at 60% 30%, rgba(212, 148, 58, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 70%, rgba(204, 102, 34, 0.3) 0%, transparent 60%),
        conic-gradient(from 180deg at 40% 50%, rgba(30, 20, 16, 0.7), rgba(139, 115, 85, 0.4), rgba(212, 148, 58, 0.25), rgba(30, 20, 16, 0.7));
}

.photo-3 {
    background:
        radial-gradient(ellipse at 50% 20%, rgba(204, 102, 34, 0.45) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(30, 20, 16, 0.6) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(212, 148, 58, 0.3), rgba(30, 20, 16, 0.8));
}

.photo-4 {
    background:
        radial-gradient(ellipse at 25% 35%, rgba(204, 102, 34, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 65%, rgba(212, 148, 58, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 115, 85, 0.25) 0%, transparent 60%),
        conic-gradient(from 90deg at 50% 50%, rgba(30, 20, 16, 0.5), rgba(204, 102, 34, 0.35), rgba(245, 237, 224, 0.15), rgba(212, 148, 58, 0.3), rgba(30, 20, 16, 0.5));
}

.photo-5 {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(212, 148, 58, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(204, 102, 34, 0.35) 0%, transparent 45%),
        conic-gradient(from 270deg at 50% 50%, rgba(30, 20, 16, 0.6), rgba(139, 115, 85, 0.35), rgba(245, 237, 224, 0.2), rgba(30, 20, 16, 0.6));
}

/* ===== Holographic Overlay ===== */
.holographic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2EC4B6 0%, #E84393 25%, #6C5CE7 50%, #2EC4B6 75%, #E84393 100%);
    background-size: 400% 400%;
    mix-blend-mode: screen;
    opacity: 0.2;
    animation: holographic-shift 8s ease-in-out infinite;
}

@keyframes holographic-shift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 200%; }
    100% { background-position: 0% 0%; }
}

/* ===== Geometric Shapes ===== */
.geo-shape {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 3;
    animation: slow-rotate 45s linear infinite;
}

.merged-pane .geo-shape {
    position: absolute;
    right: 10%;
    bottom: 15%;
    opacity: 0.6;
}

@keyframes slow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Holographic Divide Line ===== */
#divide-line {
    position: fixed;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100vh;
    z-index: 100;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #2EC4B6 15%,
        #E84393 35%,
        #6C5CE7 55%,
        #2EC4B6 75%,
        transparent 100%
    );
    background-size: 100% 300%;
    animation: divide-shimmer 6s ease-in-out infinite;
    transition: width 0.3s ease, left 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    pointer-events: auto;
}

#divide-line:hover {
    width: 8px;
}

#divide-line.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes divide-shimmer {
    0% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

/* ===== Divide Dots ===== */
.divide-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dusty-bronze);
    transition: background-color 0.4s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.divide-dot.active {
    background: var(--burnt-sienna);
    transform: scale(1.5);
}

/* ===== Merged Section Content ===== */
.merged-content {
    position: relative;
    z-index: 4;
    padding: 8vh 10vw;
    max-width: 700px;
}

/* ===== Ripple Effect ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    pointer-events: none;
    animation: ripple-expand 800ms ease-out forwards;
    z-index: 10;
}

@keyframes ripple-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
        border-color: #2EC4B6;
    }
    33% {
        border-color: #E84393;
    }
    66% {
        border-color: #6C5CE7;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        border-color: #2EC4B6;
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    .section {
        grid-template-columns: 1fr !important;
        grid-template-rows: 55vh 45vh;
    }

    .section-merged {
        grid-template-rows: 1fr !important;
    }

    .section-inverted {
        grid-template-rows: 45vh 55vh;
    }

    .pane {
        height: auto;
    }

    .text-pane {
        padding: 5vh 6vw;
    }

    .section-title {
        font-size: 10vw;
    }

    .narrative {
        font-size: 1rem;
    }

    .geo-shape {
        width: 120px;
        height: 120px;
    }

    #divide-line {
        top: auto;
        left: 0;
        bottom: 55vh;
        width: 100vw;
        height: 3px;
        flex-direction: row;
        background: linear-gradient(
            90deg,
            transparent 0%,
            #2EC4B6 15%,
            #E84393 35%,
            #6C5CE7 55%,
            #2EC4B6 75%,
            transparent 100%
        );
        background-size: 300% 100%;
        animation: divide-shimmer-h 6s ease-in-out infinite;
    }

    #divide-line:hover {
        width: 100vw;
        height: 8px;
    }

    @keyframes divide-shimmer-h {
        0% { background-position: 0% 0%; }
        50% { background-position: 100% 0%; }
        100% { background-position: 0% 0%; }
    }

    .divide-dot {
        width: 5px;
        height: 5px;
    }
}
