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

:root {
    --midnight-hull: #0b1628;
    --naval-twilight: #162a45;
    --pewter-mist: #c8cfd8;
    --brushed-chrome: #9aa5b4;
    --steel-whisper: #8b95a3;
    --deep-slate: #2a3444;
    --gunmetal: #5e697a;
    --oxidized-copper: #7a8a6e;
    --glass-frost: #e8ecf0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--midnight-hull);
    color: var(--steel-whisper);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.site-title {
    font-family: 'Recursive', sans-serif;
    font-variation-settings: 'MONO' 0, 'CASL' 1, 'wght' 800, 'slnt' -15, 'CRSV' 1;
    font-size: clamp(3rem, 6vw, 6rem);
    color: var(--pewter-mist);
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.site-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    color: var(--steel-whisper);
    margin-top: 0.5em;
}

.pool-title {
    font-family: 'Recursive', sans-serif;
    font-variation-settings: 'MONO' 0, 'CASL' 1, 'wght' 700, 'slnt' -10, 'CRSV' 1;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--pewter-mist);
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin-bottom: 1.2em;
}

.label-text,
.herbarium-label,
.specimen-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gunmetal);
}

/* === SECTION BASE === */
.section {
    position: relative;
    width: 100%;
}

.section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* === LENS FLARE ATMOSPHERIC LAYERS === */
.greenhouse::before {
    background: radial-gradient(circle at 30% 20%, rgba(200, 207, 216, 0.08) 0%, transparent 60%);
}

.root-system::before {
    background: radial-gradient(circle at 70% 30%, rgba(200, 207, 216, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 20% 70%, rgba(200, 207, 216, 0.04) 0%, transparent 40%);
}

/* === GREENHOUSE ENTRANCE === */
.greenhouse {
    height: 100vh;
    background: var(--midnight-hull);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.greenhouse-blur-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    mask-image: radial-gradient(circle at center, transparent 0%, black 100%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 0%, black 100%);
    z-index: 10;
    transition: opacity 2s ease-out;
}

.greenhouse-blur-overlay.resolved {
    opacity: 0;
}

.greenhouse-content {
    position: absolute;
    left: 38%;
    top: 55%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.greenhouse-content.visible {
    opacity: 1;
}

/* Chrysanthemum */
.chrysanthemum {
    position: absolute;
    width: 400px;
    height: 400px;
    left: 55%;
    top: 40%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    animation: chrysanthemum-rotate 300s linear infinite;
}

.chrysanthemum.visible {
    opacity: 1;
}

@keyframes chrysanthemum-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll chevron */
.scroll-chevron {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    animation: chevron-breathe 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease-out 2.5s;
}

.scroll-chevron.visible {
    opacity: 1;
}

@keyframes chevron-breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

/* === ROOT SYSTEM === */
.root-system {
    min-height: 200vh;
    background: var(--midnight-hull);
    padding: 10vh 0;
    position: relative;
}

.root-svg-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.root-svg-container svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.content-pool {
    position: relative;
    z-index: 2;
    max-width: 520px;
    padding: 3rem 2rem;
    filter: blur(8px);
    opacity: 0.5;
    transition: filter 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease-out;
}

.content-pool.in-focus {
    filter: blur(0px);
    opacity: 1;
}

.pool-1 {
    margin-left: 15%;
}

.pool-2 {
    margin-left: 55%;
}

.pool-3 {
    margin-left: 21%;
}

.pool-text {
    margin-bottom: 1.4em;
    color: var(--steel-whisper);
}

/* Fern containers */
.fern-container {
    position: absolute;
    z-index: 1;
}

.fern-left {
    left: -80px;
    top: 20px;
}

.fern-right {
    right: -70px;
    top: 10px;
}

.fern-frond .fern-stem,
.fern-frond .fern-leaf {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease-out;
}

.content-pool.in-focus .fern-frond .fern-stem,
.content-pool.in-focus .fern-frond .fern-leaf {
    stroke-dashoffset: 0;
}

/* === EXCHANGE CHAMBER === */
.exchange-chamber {
    height: 100vh;
    background: var(--pewter-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.transaction-lens {
    width: min(60vw, 700px);
    height: min(60vw, 700px);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%,
        #e8ecf0 0%,
        #c8cfd8 25%,
        #9aa5b4 50%,
        #8b95a3 70%,
        #5e697a 100%
    );
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 120px rgba(11, 22, 40, 0.15), inset 0 0 80px rgba(255,255,255,0.1);
}

.lens-text-ring {
    position: absolute;
    width: 75%;
    height: 75%;
    animation: lens-rotate 120s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lens-text-ring span {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.85rem, 1.1vw, 1.1rem);
    color: var(--deep-slate);
    text-align: center;
    line-height: 1.8;
    max-width: 80%;
    opacity: 0.7;
}

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

.lens-flare-drift {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 236, 240, 0.25) 0%, transparent 70%);
    animation: flare-drift 60s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes flare-drift {
    0% { transform: translate(-200px, -100px); }
    25% { transform: translate(150px, -50px); }
    50% { transform: translate(200px, 100px); }
    75% { transform: translate(-100px, 80px); }
    100% { transform: translate(-200px, -100px); }
}

.chamber-label {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
}

/* === HERBARIUM === */
.herbarium {
    min-height: 120vh;
    background: var(--midnight-hull);
    padding: 12vh 5vw 15vh;
    position: relative;
}

.herbarium-title {
    font-family: 'Recursive', sans-serif;
    font-variation-settings: 'MONO' 0, 'CASL' 1, 'wght' 800, 'slnt' -15, 'CRSV' 1;
    font-size: clamp(2.4rem, 5.5vw, 5.8rem);
    color: var(--pewter-mist);
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 0.3em;
}

.herbarium-label {
    display: block;
    margin-bottom: 6vh;
}

.specimen-card {
    background: var(--naval-twilight);
    border: 1px solid rgba(154, 165, 180, 0.15);
    padding: 2rem 1.8rem;
    display: inline-block;
    vertical-align: top;
    filter: blur(6px);
    opacity: 0.5;
    transition: filter 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease-out, transform 0.4s ease;
}

.specimen-card.in-focus {
    filter: blur(0px);
    opacity: 1;
}

.specimen-card:hover {
    transform: translateY(-4px);
}

.specimen-card:hover .specimen-botanical svg {
    filter: drop-shadow(0 0 8px rgba(122, 138, 110, 0.4));
}

.specimen-botanical {
    margin-bottom: 1.2rem;
}

.specimen-name {
    display: block;
    margin-bottom: 0.8rem;
}

.specimen-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    color: var(--steel-whisper);
    font-size: 0.95rem;
    line-height: 1.65;
}

.card-1 {
    width: clamp(280px, 30vw, 380px);
    margin-left: 5%;
    transform: rotate(-3deg);
}

.card-2 {
    width: clamp(280px, 28vw, 360px);
    margin-left: 34%;
    transform: rotate(2deg);
    margin-top: -3rem;
}

.card-3 {
    width: clamp(280px, 32vw, 420px);
    margin-left: 21%;
    transform: rotate(-1.5deg);
    margin-top: 2rem;
}

.card-4 {
    width: clamp(280px, 26vw, 340px);
    margin-left: 55%;
    transform: rotate(5deg);
    margin-top: -4rem;
}

.card-5 {
    width: clamp(280px, 30vw, 400px);
    margin-left: 13%;
    transform: rotate(-2deg);
    margin-top: 2rem;
}

/* Preserve rotation on hover */
.card-1:hover { transform: rotate(-3deg) translateY(-4px); }
.card-2:hover { transform: rotate(2deg) translateY(-4px); }
.card-3:hover { transform: rotate(-1.5deg) translateY(-4px); }
.card-4:hover { transform: rotate(5deg) translateY(-4px); }
.card-5:hover { transform: rotate(-2deg) translateY(-4px); }

/* === CLOSING FOG === */
.closing-fog {
    height: 100vh;
    background: var(--midnight-hull);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fog-content {
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.closing-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--steel-whisper);
    text-align: center;
    max-width: 600px;
    padding: 0 2rem;
    transition: opacity 0.8s ease-out;
}

/* === SEED PODS === */
.seed-pod {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: seed-pulse 4s ease-in-out infinite;
}

@keyframes seed-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.pod-1 { width: 18px; height: 18px; top: 15%; left: 8%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 0s; }
.pod-2 { width: 22px; height: 22px; top: 30%; right: 12%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 0.8s; }
.pod-3 { width: 16px; height: 16px; top: 50%; left: 5%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 1.5s; }
.pod-4 { width: 20px; height: 20px; top: 65%; right: 7%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 2.2s; }
.pod-5 { width: 17px; height: 17px; top: 80%; left: 15%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 0.5s; }
.pod-6 { width: 24px; height: 24px; top: 42%; right: 20%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 1.8s; }
.pod-7 { width: 16px; height: 16px; top: 22%; left: 25%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 3s; }
.pod-8 { width: 19px; height: 19px; top: 73%; right: 25%; background: radial-gradient(circle, #7a8a6e 20%, #162a45 70%, transparent 100%); animation-delay: 2.5s; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .chrysanthemum {
        animation: none;
    }
    .lens-text-ring {
        animation: none;
    }
    .lens-flare-drift {
        animation: none;
    }
    .seed-pod {
        animation: none;
        opacity: 0.7;
    }
    .scroll-chevron {
        animation: none;
        opacity: 0.6;
    }
    .greenhouse-blur-overlay {
        transition: none;
    }
    .greenhouse-content {
        transition: none;
    }
    .content-pool,
    .specimen-card {
        transition: opacity 0.1s;
        filter: none !important;
    }
    .fern-frond .fern-stem,
    .fern-frond .fern-leaf {
        transition: none;
        stroke-dashoffset: 0;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .greenhouse-content {
        left: 50%;
        top: 50%;
    }

    .chrysanthemum {
        width: 280px;
        height: 280px;
        left: 50%;
        top: 35%;
    }

    .content-pool {
        max-width: 90vw;
        padding: 2rem 1.5rem;
    }

    .pool-1, .pool-2, .pool-3 {
        margin-left: 5%;
    }

    .specimen-card {
        display: block;
        width: 85vw !important;
        margin-left: 5% !important;
        margin-top: 1.5rem !important;
    }

    .card-1, .card-2, .card-3, .card-4, .card-5 {
        transform: rotate(0deg) !important;
    }

    .fern-container {
        display: none;
    }
}
