/* =============================================
   monopole.quest — Fairycore Botanical Quest
   =============================================
   Palette:
     Twilight Grey:  #3A3A4A  — headings
     Dusk Grey:      #5A5A6A  — body text
     Mystic Violet:  #7A6A8A  — quest labels, accents
     Glade Cream:    #F0EDE6  — primary background
     Forest Mist:    #E0E8D8  — alternate section backgrounds
     Vine Green:     #6A7A5A  — botanical frames
     Firefly Gold:   #D0B060  — floating element accents
   ============================================= */

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

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

body {
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: #5A5A6A;
    background-color: #F0EDE6;
    overflow-x: hidden;
    position: relative;
}

/* =============================================
   FLOATING SPRITES CONTAINER
   ============================================= */

#sprites-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.firefly {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #D0B060 0%, rgba(208, 176, 96, 0.4) 40%, transparent 70%);
    pointer-events: none;
    will-change: transform, opacity;
}

.petal {
    position: absolute;
    background: radial-gradient(ellipse, rgba(208, 176, 96, 0.3) 0%, rgba(122, 106, 138, 0.15) 60%, transparent 100%);
    border-radius: 50% 50% 50% 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.spore {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 232, 216, 0.6) 0%, rgba(224, 232, 216, 0.2) 50%, transparent 80%);
    pointer-events: none;
    will-change: transform, opacity;
}

/* =============================================
   BOTANICAL VINE OVERLAYS
   ============================================= */

.vine-overlay {
    position: fixed;
    width: 300px;
    height: 300px;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.8s ease;
}

.vine-overlay.visible {
    opacity: 1;
}

.vine-tl {
    top: 0;
    left: 0;
}

.vine-tr {
    top: 0;
    right: 0;
}

.vine-bl {
    bottom: 0;
    left: 0;
}

.vine-br {
    bottom: 0;
    right: 0;
}

.vine-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 3.5s ease;
}

.vine-overlay.visible .vine-path {
    stroke-dashoffset: 0;
}

.leaf,
.flower {
    opacity: 0;
    transition: opacity 1.4s ease;
}

.vine-overlay.visible .leaf,
.vine-overlay.visible .flower {
    opacity: 1;
}

.vine-grow {
    transform-origin: center;
}

.vine-delay-1 { transition-delay: 0.3s; }
.vine-delay-2 { transition-delay: 0.7s; }
.vine-delay-3 { transition-delay: 1.1s; }
.vine-delay-4 { transition-delay: 1.6s; }
.vine-delay-5 { transition-delay: 2.1s; }

/* =============================================
   GLADE SECTIONS — Full-Bleed Layout
   ============================================= */

.glade-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.glade-cream {
    background-color: #F0EDE6;
}

.glade-mist {
    background-color: #E0E8D8;
}

.glade-lavender {
    background: linear-gradient(
        180deg,
        #F0EDE6 0%,
        #E8E0F0 25%,
        #E2DAEC 50%,
        #E8E0F0 75%,
        #F0EDE6 100%
    );
}

/* Section transitions — soft fog between glades */
.glade-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(
        to bottom,
        rgba(240, 237, 230, 0.85) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.glade-mist::before {
    background: linear-gradient(
        to bottom,
        rgba(224, 232, 216, 0.85) 0%,
        transparent 100%
    );
}

.glade-lavender::before {
    background: linear-gradient(
        to bottom,
        rgba(240, 237, 230, 0.85) 0%,
        transparent 100%
    );
}

.glade-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(
        to top,
        rgba(240, 237, 230, 0.5) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* =============================================
   ZOOM-FOCUS REVEALS
   ============================================= */

.zoom-reveal {
    transform: scale(0.9);
    filter: blur(3px);
    opacity: 0;
    transition: transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 1.2s ease;
}

.zoom-reveal.revealed {
    transform: scale(1);
    filter: blur(0);
    opacity: 1;
}

/* =============================================
   HERO SECTION
   ============================================= */

#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-emblem {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.hero-emblem svg {
    width: 80px;
    height: 80px;
    animation: emblemFloat 6s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes emblemFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.hero-title {
    font-family: 'Cormorant Infant', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #3A3A4A;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-subtitle {
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #7A6A8A;
    line-height: 1.9;
    max-width: 520px;
    margin: 0 auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

.scroll-dot {
    animation: scrollDotMove 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

@keyframes scrollDotMove {
    0% {
        cy: 12;
        opacity: 1;
    }
    100% {
        cy: 30;
        opacity: 0.2;
    }
}

/* =============================================
   BOTANICAL FRAMES
   ============================================= */

.botanical-frame {
    position: relative;
    width: 100%;
    max-width: 820px;
    padding: 0;
}

.frame-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.5s ease;
}

.frame-content {
    position: relative;
    z-index: 3;
    padding: 4.5rem 4rem;
}

/* Subtle firefly glow animation for in-frame dots */
.frame-firefly {
    animation: frameFireflyPulse 4s ease-in-out infinite;
}

.frame-firefly:nth-child(odd) {
    animation-delay: 1.5s;
}

@keyframes frameFireflyPulse {
    0%, 100% {
        opacity: 0.15;
    }
    50% {
        opacity: 0.5;
    }
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3 {
    font-family: 'Cormorant Infant', Georgia, serif;
    color: #3A3A4A;
    font-weight: 600;
}

.quest-label {
    font-family: 'Cinzel Decorative', 'Cormorant Infant', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #7A6A8A;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(122, 106, 138, 0.2);
    transition: text-shadow 0.6s ease;
}

.body-text {
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: #5A5A6A;
    margin-bottom: 1.5rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.body-text:last-of-type {
    margin-bottom: 0;
}

/* =============================================
   THE THRESHOLD (Final Section)
   ============================================= */

.threshold-content {
    text-align: center;
    max-width: 650px;
}

.threshold-sigil {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.threshold-sigil svg {
    width: 140px;
    height: 140px;
    animation: sigilRotate 30s linear infinite;
}

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

.threshold-sigil circle:nth-of-type(4) {
    animation: sigilGoldRingPulse 4s ease-in-out infinite;
}

.threshold-sigil circle:nth-of-type(5) {
    animation: sigilCorePulse 3s ease-in-out infinite;
}

@keyframes sigilGoldRingPulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes sigilCorePulse {
    0%, 100% {
        opacity: 0.5;
        r: 4;
    }
    50% {
        opacity: 1;
        r: 6;
    }
}

.threshold-whisper {
    font-family: 'Cormorant Infant', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    color: #7A6A8A;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .vine-overlay {
        width: 160px;
        height: 160px;
    }

    .glade-section {
        padding: 4rem 1.5rem;
    }

    .frame-content {
        padding: 3rem 2rem;
    }

    .hero-title {
        letter-spacing: 0.08em;
    }

    .body-text {
        text-align: left;
    }

    .hero-emblem svg {
        width: 60px;
        height: 60px;
    }

    .hero-emblem {
        margin-bottom: 1.8rem;
    }

    .threshold-sigil svg {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 480px) {
    .vine-overlay {
        width: 100px;
        height: 100px;
    }

    .frame-content {
        padding: 2rem 1.5rem;
    }

    .glade-section {
        padding: 3rem 1rem;
    }

    .hero-emblem svg {
        width: 50px;
        height: 50px;
    }

    .hero-emblem {
        margin-bottom: 1.2rem;
    }

    .threshold-sigil svg {
        width: 90px;
        height: 90px;
    }
}
