/* parallel.day — Earth-tone cinematic editorial */

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

html {
    scroll-behavior: smooth;
    background-color: #F5F0E8;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #3B2F2F;
    background-color: #F5F0E8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Noise Overlay ===== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    filter: url(#noise);
    background: transparent;
}

/* ===== Content Wrapper ===== */
.content-wrapper {
    position: relative;
    width: 100%;
}

/* ===== Scene Base ===== */
.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-left: 8vw;
    padding-right: 12vw;
}

.scene-inner {
    position: relative;
    z-index: 2;
}

/* ===== Stagger Animation ===== */
[data-stagger] {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--stagger-index, 0) * 120ms),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--stagger-index, 0) * 120ms);
}

[data-stagger].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Temporal Markers ===== */
.temporal-marker {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8B7355;
    opacity: 0;
    position: absolute;
    left: -6vw;
    top: 2rem;
    transform: translateY(12px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.temporal-marker.revealed {
    opacity: 0.5;
    transform: translateY(0);
}

.temporal-marker-light {
    color: #C2784E;
}

/* ===== Scene 1: Hero ===== */
.scene-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 15vh;
    padding-bottom: 25vh;
    position: relative;
    overflow: hidden;
}

.hero-gradient-bands {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        linear-gradient(180deg,
            #F5F0E8 0%,
            #F5F0E8 15%,
            #C2784E 35%,
            #A0522D 50%,
            #CC7722 65%,
            #F5F0E8 85%,
            #F5F0E8 100%
        );
    opacity: 0.12;
}

.scene-hero .scene-inner {
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.8rem, 7vw + 1rem, 7rem);
    color: #1C1410;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
}

.hero-letter {
    display: inline-block;
    font-variation-settings: 'wght' var(--letter-weight, 400), 'opsz' 144;
    transition: font-variation-settings 0.1s ease-out;
}

.hero-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
    line-height: 1.75;
    color: #3B2F2F;
    max-width: 48ch;
}

/* ===== Scene 2: Split Narrative ===== */
.scene-split {
    padding-top: 20vh;
    padding-bottom: 20vh;
    position: relative;
}

.spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #A0522D;
    opacity: 0.3;
    z-index: 1;
    transform: translateX(-50%);
    transition: opacity 0.4s ease;
}

.scene-split-inner {
    display: flex;
    gap: 4vw;
    align-items: flex-start;
}

.split-left {
    flex: 1;
    position: relative;
    will-change: transform;
}

.split-right {
    flex: 1;
    position: relative;
    will-change: transform;
    padding-top: 6vh;
}

/* Mixed-media composition (CSS only) */
.mixed-media-composition {
    position: relative;
    width: 100%;
    height: 65vh;
    overflow: hidden;
    border-radius: 2px;
}

.media-layer {
    position: absolute;
    width: 100%;
}

.media-layer-1 {
    top: 0;
    height: 40%;
    background: linear-gradient(180deg, #C2784E 0%, #A0522D 60%, transparent 100%);
    opacity: 0.85;
}

.media-layer-2 {
    top: 35%;
    height: 35%;
    background: linear-gradient(180deg, transparent 0%, #CC7722 30%, #8B7355 70%, transparent 100%);
    opacity: 0.6;
}

.media-layer-3 {
    bottom: 0;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, #F5F0E8 40%, #C2784E 100%);
    opacity: 0.7;
}

.media-circle {
    position: absolute;
    top: 45%;
    left: 30%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #CC7722 0%, #A0522D 60%, transparent 100%);
    opacity: 0.5;
    box-shadow: 0 8px 32px rgba(160, 82, 45, 0.3);
}

.editorial-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #3B2F2F;
    margin-bottom: 1.75rem;
}

.editorial-text:last-child {
    margin-bottom: 0;
}

/* ===== Scene 3: Circuit Meditation ===== */
.scene-circuit {
    padding-top: 20vh;
    padding-bottom: 20vh;
    position: relative;
    background: linear-gradient(180deg,
        #F5F0E8 0%,
        #2E1F14 15%,
        #2E1F14 85%,
        #F5F0E8 100%
    );
}

.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image:
        /* Horizontal lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 79px,
            rgba(139, 115, 85, 0.2) 79px,
            rgba(139, 115, 85, 0.2) 80px
        ),
        /* Vertical lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 119px,
            rgba(139, 115, 85, 0.2) 119px,
            rgba(139, 115, 85, 0.2) 120px
        ),
        /* Nodes at intersections */
        radial-gradient(circle 3px at 120px 80px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 240px 160px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 360px 80px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 480px 240px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 600px 160px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 720px 80px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 123px 240px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 363px 320px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 483px 80px, rgba(204, 119, 34, 0.4) 100%, transparent 100%),
        radial-gradient(circle 3px at 243px 320px, rgba(204, 119, 34, 0.4) 100%, transparent 100%);
    background-size:
        100% 80px,
        120px 100%,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px,
        720px 400px;
    opacity: 0.6;
}

.scene-circuit .scene-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.meditation-column {
    max-width: 38ch;
    margin: 0 auto;
}

.meditation-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #F5F0E8;
    margin-bottom: 2rem;
}

.meditation-text:last-child {
    margin-bottom: 0;
}

.scene-circuit .temporal-marker {
    color: #C2784E;
}

/* ===== Scene 4: Timeline Diptych ===== */
.scene-diptych {
    padding-top: 20vh;
    padding-bottom: 20vh;
    position: relative;
}

.diptych-panels {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    justify-content: center;
}

.diptych-panel {
    flex: 1;
    max-width: 45%;
}

.panel-composition {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 2px;
}

.panel-layer {
    position: absolute;
    width: 100%;
}

.panel-layer-a {
    top: 0;
    height: 55%;
    background: linear-gradient(180deg, #F5F0E8 0%, #C2784E 40%, #CC7722 100%);
    opacity: 0.9;
}

.panel-layer-b {
    bottom: 0;
    height: 55%;
    background: linear-gradient(180deg, #CC7722 0%, #A0522D 50%, #8B7355 100%);
    opacity: 0.7;
}

.panel-layer-c {
    top: 0;
    height: 55%;
    background: linear-gradient(180deg, #8B7355 0%, #A0522D 40%, #2E1F14 100%);
    opacity: 0.85;
}

.panel-layer-d {
    bottom: 0;
    height: 55%;
    background: linear-gradient(180deg, #2E1F14 0%, #3B2F2F 50%, #1C1410 100%);
    opacity: 0.75;
}

.panel-rect {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 60%;
    height: 25%;
    background: rgba(245, 240, 232, 0.15);
    box-shadow: 0 4px 24px rgba(46, 31, 20, 0.2);
}

.panel-rect-dark {
    background: rgba(28, 20, 16, 0.2);
    box-shadow: 0 4px 24px rgba(28, 20, 16, 0.35);
}

.panel-caption {
    display: block;
    margin-top: 1.25rem;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8B7355;
    opacity: 0.7;
}

/* ===== Scene 5: Close ===== */
.scene-close {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 20vh;
    padding-bottom: 20vh;
    background: linear-gradient(180deg,
        #F5F0E8 0%,
        #F5F0E8 70%,
        #F5F0E8 100%
    );
}

.close-word {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: 'wght' 300, 'opsz' 144;
    font-size: clamp(2.4rem, 6vw + 0.5rem, 5.5rem);
    color: #1C1410;
    letter-spacing: -0.01em;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) 120ms,
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}

.close-word.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Gradient Transitions Between Scenes ===== */
.scene-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background: linear-gradient(180deg, transparent 0%, #F5F0E8 100%);
    z-index: 1;
    pointer-events: none;
}

.scene-circuit::before {
    content: '';
    position: absolute;
    top: -15vh;
    left: 0;
    width: 100%;
    height: 30vh;
    background: linear-gradient(180deg, #F5F0E8 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* ===== Spine Pulse Animation ===== */
@keyframes spinePulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.4; }
}

.spine.animate {
    animation: spinePulse 4s ease-in-out infinite;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .scene {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .scene-split-inner {
        flex-direction: column;
        gap: 3rem;
    }

    .split-left,
    .split-right {
        flex: none;
        width: 100%;
    }

    .split-right {
        padding-top: 0;
    }

    .mixed-media-composition {
        height: 45vh;
    }

    .spine {
        display: none;
    }

    .diptych-panels {
        flex-direction: column;
        gap: 2rem;
    }

    .diptych-panel {
        max-width: 100%;
    }

    .temporal-marker {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 4.5rem);
    }
}
