:root {
    --klimt-aureate: #C5A028;
    --tarnished-gilt: #8B6914;
    --oxidized-bronze: #5C4510;
    --carbon-concrete: #0A0A0A;
    --brutalist-char: #1A1710;
    --exposed-aggregate: #2A2520;
    --gilt-edge: #F2E8C9;
    --leaf-vein: #D4AF37;
}

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

body {
    background: var(--carbon-concrete);
    color: var(--gilt-edge);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* Concrete texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* Blob base */
.blob {
    position: absolute;
    border-radius: 30% 70% 65% 35% / 55% 45% 60% 40%;
    background: radial-gradient(ellipse at center, var(--klimt-aureate), var(--tarnished-gilt) 60%, transparent);
    box-shadow: inset 0 0 60px rgba(197, 160, 40, 0.3);
    animation: blobMorph 15s ease-in-out infinite, pulse 2.5s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 30% 70% 65% 35% / 55% 45% 60% 40%; }
    33% { border-radius: 58% 42% 40% 60% / 45% 55% 35% 65%; }
    66% { border-radius: 42% 58% 55% 45% / 60% 40% 50% 50%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Dust Field */
.dust-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.dust-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--leaf-vein);
}

@keyframes dustRise {
    0% { transform: translateY(100vh); opacity: 0.4; }
    100% { transform: translateY(-10vh); opacity: 0; }
}

/* Overgrowth Leaf Layer */
.overgrowth-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    overflow: hidden;
}

.drift-leaf {
    position: absolute;
    width: 40px;
    height: 60px;
}

.leaf-1 { top: -80px; right: 10%; animation: leafDrift1 70s linear infinite; }
.leaf-2 { top: -80px; right: 30%; animation: leafDrift2 55s linear infinite 10s; }
.leaf-3 { top: -80px; right: 55%; animation: leafDrift3 80s linear infinite 25s; }
.leaf-4 { top: -80px; right: 75%; animation: leafDrift1 65s linear infinite 40s; }

@keyframes leafDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-200px, 120vh) rotate(360deg); }
}

@keyframes leafDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-150px, 120vh) rotate(-270deg); }
}

@keyframes leafDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-250px, 120vh) rotate(300deg); }
}

/* Scenes */
.scene {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Scene 1: Monolith */
.scene-monolith {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--carbon-concrete);
}

.monolith-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 12rem);
    color: var(--gilt-edge);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    z-index: 3;
    mix-blend-mode: multiply;
}

.hero-blob {
    --base-opacity: 0.6;
    opacity: var(--base-opacity);
}

.blob-1 {
    width: 45vw;
    height: 45vw;
    top: 15%;
    left: 20%;
    animation-delay: 0s, 0s;
}

.blob-2 {
    width: 35vw;
    height: 35vw;
    top: 25%;
    right: 15%;
    animation-delay: -5s, -0.8s;
}

.blob-3 {
    width: 25vw;
    height: 25vw;
    bottom: 15%;
    left: 35%;
    animation-delay: -10s, -1.6s;
}

/* Scene 2: Crack */
.scene-crack {
    min-height: 30vh;
    background: var(--brutalist-char);
    clip-path: polygon(0 8%, 15% 0, 30% 12%, 45% 2%, 60% 15%, 75% 4%, 90% 10%, 100% 0, 100% 100%, 0 100%);
    margin-top: -5vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crack-fill {
    position: relative;
    width: 100%;
    height: 100%;
}

.crack-blob {
    --base-opacity: 0.5;
    opacity: var(--base-opacity);
}

.crack-blob-1 {
    width: 120px;
    height: 100px;
    top: 20%;
    left: 40%;
}

.crack-blob-2 {
    width: 80px;
    height: 70px;
    top: 40%;
    left: 55%;
}

/* Scene 3: Archive */
.scene-archive {
    min-height: 90vh;
    background: var(--carbon-concrete);
    display: flex;
    align-items: center;
    padding: 10vh 5vw;
    gap: 4vw;
}

.archive-text {
    flex: 0 0 35%;
    max-width: 42ch;
}

.archive-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    color: var(--gilt-edge);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
}

.text-emerge {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--gilt-edge);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.text-emerge.visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-blob-container {
    flex: 1;
    position: relative;
    min-height: 60vh;
}

.archive-blob {
    width: 60vw;
    height: 70vh;
    max-width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    --base-opacity: 0.5;
    opacity: var(--base-opacity);
}

.archive-leaf {
    position: absolute;
    width: 40px;
    height: 55px;
}

.al-1 { top: 10%; right: 5%; }
.al-2 { bottom: 15%; right: 20%; }

/* Scene 4: Overgrowth */
.scene-overgrowth {
    min-height: 90vh;
    background: var(--brutalist-char);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overgrowth-blob {
    animation: blobMorph 15s ease-in-out infinite, pulseStrong 2.5s ease-in-out infinite;
}

@keyframes pulseStrong {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.ob-1 { width: 50vw; height: 50vh; top: 5%; left: -5%; --base-opacity: 0.4; opacity: 0.4; animation-delay: 0s, 0s; }
.ob-2 { width: 40vw; height: 45vh; top: 10%; right: -5%; --base-opacity: 0.5; opacity: 0.5; animation-delay: -3s, -0.5s; }
.ob-3 { width: 35vw; height: 40vh; bottom: 5%; left: 15%; --base-opacity: 0.35; opacity: 0.35; animation-delay: -7s, -1s; }
.ob-4 { width: 30vw; height: 35vh; bottom: 10%; right: 10%; --base-opacity: 0.6; opacity: 0.6; animation-delay: -11s, -1.5s; }
.ob-5 { width: 25vw; height: 30vh; top: 30%; left: 30%; --base-opacity: 0.45; opacity: 0.45; animation-delay: -5s, -2s; }

.overgrowth-words {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4vh;
}

.overgrowth-word {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--gilt-edge);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.overgrowth-word.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scene 5: Sediment */
.scene-sediment {
    min-height: 60vh;
    background: var(--carbon-concrete);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.sediment-blob {
    width: 80px;
    height: 80px;
    position: relative;
    --base-opacity: 0.7;
    opacity: 0.7;
}

.sediment-domain {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--gilt-edge);
    letter-spacing: 0.04em;
}

.sediment-leaf {
    width: 30px;
    height: 42px;
    position: relative;
}

/* Progress Ring */
.progress-ring {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 36px;
    height: 36px;
    z-index: 10;
}

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

.progress-fill {
    transition: stroke-dashoffset 0.1s linear;
}

/* Responsive */
@media (max-width: 768px) {
    .scene-archive {
        flex-direction: column;
    }

    .archive-text {
        flex: none;
        max-width: 100%;
    }

    .archive-blob {
        width: 90vw;
        height: 40vh;
        position: relative;
    }

    .overgrowth-blob {
        width: 80vw !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none;
    }

    .drift-leaf {
        animation: none;
    }

    .dust-particle {
        animation: none;
    }

    .overgrowth-blob {
        animation: none;
    }
}
