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

:root {
    --sage: #7b9e8c;
    --dark-brown: #3d3632;
    --cream: #f4efe8;
    --warm-gray: #b8a99a;
    --gold: #c4a882;
    --muted-brown: #8a7e74;
    --near-black: #2c2a28;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--near-black);
    color: var(--cream);
    overflow-x: hidden;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    mix-blend-mode: difference;
}

.nav-logo {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--cream);
}

.nav-dot {
    color: var(--sage);
}

.nav-counter {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--warm-gray);
    transition: opacity 0.4s ease;
}

.scroll-container {
    width: 100%;
}

.diptych {
    display: flex;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
}

.panel-left {
    width: 45%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.panel-divider {
    width: 1px;
    height: 100%;
    background: var(--muted-brown);
    opacity: 0.3;
}

.panel-right {
    width: 55%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.panel-content {
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

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

.section-number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    display: block;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.section-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--warm-gray);
}

/* Section I — The Grain */
.panel-grain {
    background: linear-gradient(160deg, var(--near-black), var(--dark-brown));
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.6;
    animation: grainShift 8s steps(4) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, 2px); }
    100% { transform: translate(0, 0); }
}

/* Section II — The Exposure */
.panel-exposure {
    background: var(--near-black);
}

.light-leak {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(196, 168, 130, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 70%, rgba(123, 158, 140, 0.1) 0%, transparent 50%);
    animation: lightPulse 6s ease-in-out infinite alternate;
}

@keyframes lightPulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Section III — The Contact Sheet */
.panel-contact {
    background: var(--dark-brown);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-grid {
    width: 80%;
    height: 70%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
}

.contact-grid::before,
.contact-grid::after {
    content: '';
}

.contact-frame {
    background: var(--near-black);
    border: 1px solid var(--muted-brown);
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

.contact-frame.highlighted {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(196, 168, 130, 0.2);
}

/* Section IV — The Print */
.panel-print {
    background: var(--near-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-frame {
    width: 60%;
    height: 70%;
    border: 1px solid var(--warm-gray);
    background: linear-gradient(145deg, var(--dark-brown) 0%, var(--near-black) 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.print-frame::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(184, 169, 154, 0.2);
}

/* Section V — The Aurora */
.panel-aurora {
    background: var(--near-black);
    overflow: hidden;
}

.aurora-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(123, 158, 140, 0.05) 30%,
        rgba(123, 158, 140, 0.15) 50%,
        rgba(196, 168, 130, 0.1) 70%,
        transparent 100%
    );
    animation: auroraMove 10s ease-in-out infinite alternate;
}

@keyframes auroraMove {
    0% { transform: translateY(10%) scaleY(1); }
    50% { transform: translateY(-5%) scaleY(1.1); }
    100% { transform: translateY(10%) scaleY(0.9); }
}

/* Responsive */
@media (max-width: 768px) {
    .diptych {
        flex-direction: column;
    }
    .panel-left {
        width: 100%;
        height: 40vh;
    }
    .panel-divider {
        width: 100%;
        height: 1px;
    }
    .panel-right {
        width: 100%;
        height: 60vh;
        padding: 2rem;
    }
}
