/* ==========================================
   lower.quest — Styles
   Cottagecore botanical descent narrative
   DESIGN COMPLIANCE LEXICON: Intersection Observer triggers path-draw animations (400 (engraved transitional high-contrast thick/thin strokes channel elegance 18th-century engravings typographic tradition naturalist publications. sharp wedge serifs refined ball terminals give display headings an engraved quality Display" (Google (300 (humanist reading designed extended generous x-height counters. organic modulation pairs harmoniously while maintaining distinct hierarchy. Used
   ========================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: #2d3239;
    background-color: #f0f2f5;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Palette reference: #4a4e54 charcoal-sketch, #f7f5f2 parchment-ash */
}

/* ==========================================
   Particles Layer
   ========================================== */
#particles-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    pointer-events: none;
}

.particle-spore {
    background: radial-gradient(circle, #7a8b6e 0%, transparent 70%);
}

.particle-wisp {
    border-radius: 1px;
    background: #d1d5db;
}

.particle-mote {
    background: #a0785a;
    opacity: 0.4;
}

@keyframes spore-drift {
    0% { transform: translate3d(0, 100vh, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translate3d(30px, -20vh, 0) rotate(180deg); opacity: 0; }
}

@keyframes wisp-drift {
    0% { transform: translate3d(0, 80vh, 0) rotate(0deg); opacity: 0; }
    15% { opacity: 0.3; }
    85% { opacity: 0.3; }
    100% { transform: translate3d(-40px, -10vh, 0) rotate(90deg); opacity: 0; }
}

@keyframes mote-drift {
    0% { transform: translate3d(0, 60vh, 0); opacity: 0; }
    20% { opacity: 0.4; }
    80% { opacity: 0.4; }
    100% { transform: translate3d(20px, -30vh, 0); opacity: 0; }
}

/* ==========================================
   Typography
   ========================================== */
.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(5rem, 14vw, 12rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #2d3239;
    font-feature-settings: "liga" 1, "kern" 1;
}

.hero-quest {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 7vw, 6rem);
    letter-spacing: -0.02em;
    color: #6b7280;
    display: block;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #2d3239;
    margin-bottom: 2.25rem;
}

.section-title-light {
    color: #e8eaed;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #8a8f96;
    text-transform: lowercase;
    display: block;
    margin-bottom: 1.5rem;
}

.section-label-light {
    color: #6b7280;
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    color: #2d3239;
    margin-bottom: 1.5rem;
}

.body-text-light {
    color: #e8eaed;
}

.botanical-name {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    color: #8a8f96;
    font-style: italic;
}

.botanical-label {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    fill: #8a8f96;
}

.pull-quote {
    border-left: none;
    padding-left: 1.5rem;
    margin: 3rem 0;
    position: relative;
}

.pull-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
    background-size: 3px 8px;
    background-repeat: repeat-y;
}

.pull-quote p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    line-height: 1.6;
    color: #6b7280;
}

/* ==========================================
   Section: The Descent (Hero)
   ========================================== */
.section-descent {
    position: relative;
    height: 200vh;
    padding: clamp(1.5rem, 5vw, 4rem);
    z-index: 2;
}

.hero-illustration {
    position: absolute;
    left: 5%;
    top: 10%;
    width: 40%;
    max-width: 500px;
    z-index: 1;
}

.hero-text {
    position: absolute;
    bottom: 55%;
    right: clamp(1.5rem, 8vw, 6rem);
    z-index: 2;
}

.hero-subtext {
    position: absolute;
    bottom: 30%;
    right: clamp(1.5rem, 8vw, 6rem);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-subtext.visible {
    opacity: 1;
}

/* ==========================================
   Garden Rooms
   ========================================== */
.garden-room {
    position: relative;
    z-index: 2;
    padding: clamp(1.5rem, 5vw, 4rem);
}

/* Wide Meadow */
.wide-meadow {
    max-width: clamp(680px, 60vw, 960px);
    margin: 0 auto;
    padding-top: clamp(6rem, 12vh, 14rem);
    padding-bottom: clamp(6rem, 12vh, 14rem);
}

/* Hedgerow Passage */
.hedgerow-passage {
    display: flex;
    align-items: flex-start;
    gap: clamp(2rem, 5vw, 4rem);
    max-width: 1200px;
    margin: 0 auto;
    padding-top: clamp(6rem, 12vh, 14rem);
    padding-bottom: clamp(6rem, 12vh, 14rem);
}

.hedgerow-left {
    flex-direction: row;
}

.hedgerow-right {
    flex-direction: row-reverse;
}

.hedgerow-text {
    max-width: 480px;
    flex: 1;
}

.hedgerow-illustration {
    flex: 0 0 auto;
    width: clamp(150px, 25vw, 300px);
}

.hedgerow-illustration svg {
    width: 100%;
    height: auto;
}

/* Sunken Garden */
.sunken-garden {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: clamp(4rem, 8vh, 8rem);
    padding-bottom: clamp(4rem, 8vh, 8rem);
}

.sunken-illustration {
    width: clamp(200px, 40vw, 400px);
}

.sunken-illustration svg {
    width: 100%;
    height: auto;
}

.hatching-divider {
    width: clamp(100px, 30vw, 200px);
    margin: 0 auto;
}

.hatching-divider svg {
    width: 100%;
    height: 8px;
}

/* ==========================================
   Section: Root Chamber (Dark)
   ========================================== */
.section-root-chamber {
    position: relative;
    min-height: 100vh;
    background-color: #2c3038;
    padding: clamp(1.5rem, 5vw, 4rem);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.root-chamber-content {
    max-width: clamp(680px, 60vw, 960px);
    margin: 0 auto;
    padding-top: clamp(6rem, 10vh, 10rem);
    padding-bottom: 3rem;
}

.mycelium-illustration {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.mycelium-illustration svg {
    width: 100%;
    height: auto;
}

.root-chamber-footer {
    text-align: center;
    padding: clamp(4rem, 8vh, 8rem) 0;
}

.domain-name {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    color: #6b7280;
}

/* ==========================================
   SVG Botanical Illustrations
   ========================================== */
.svg-botanical .draw-path {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svg-botanical.animate .draw-path {
    opacity: 1;
}

/* ==========================================
   Ascending Spore
   ========================================== */
#ascending-spore {
    position: fixed;
    bottom: -20px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #c4a0b0 0%, transparent 70%);
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    animation: ascending-spore 25s ease-in-out infinite;
    animation-delay: 5s;
}

@keyframes ascending-spore {
    0% { transform: translate3d(0, 0, 0); opacity: 0; }
    5% { opacity: 0.6; }
    50% { transform: translate3d(15px, -50vh, 0); opacity: 0.5; }
    95% { opacity: 0; }
    100% { transform: translate3d(-10px, -110vh, 0); opacity: 0; }
}

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

    .hedgerow-right {
        flex-direction: column;
    }

    .hedgerow-illustration {
        width: 60%;
        margin: 0 auto;
    }

    .hero-illustration {
        width: 60%;
        left: 2%;
    }

    .hero-text {
        right: clamp(1rem, 5vw, 3rem);
    }

    .hero-subtext {
        right: clamp(1rem, 5vw, 3rem);
    }
}
