/* annual.quest - Parallax Seasonal Journey Through Twelve Months */
/* Palette: Jan #dde6ed/#8ba4b8, Mar #e8f5e9/#81c784, Jun #fff8e1/#ffb74d, Sep #fbe9e7/#e57373, Dec #e8eaf6/#7986cb */
/* Text: #2c2c2c */

:root {
    --text: #2c2c2c;
    --jan-bg: #dde6ed;
    --jan-accent: #8ba4b8;
    --mar-bg: #e8f5e9;
    --mar-accent: #81c784;
    --jun-bg: #fff8e1;
    --jun-accent: #ffb74d;
    --sep-bg: #fbe9e7;
    --sep-accent: #e57373;
    --dec-bg: #e8eaf6;
    --dec-accent: #7986cb;
}

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

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    font-family: 'Spectral', serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
    background: var(--jan-bg);
}

/* ===== THREAD LINE ===== */
.thread-line {
    position: fixed;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        rgba(139,164,184,0.15) 0%,
        rgba(129,199,132,0.15) 25%,
        rgba(255,183,77,0.15) 50%,
        rgba(229,115,115,0.15) 75%,
        rgba(121,134,203,0.15) 100%
    );
    z-index: 100;
    pointer-events: none;
}

.thread-marker {
    position: absolute;
    left: 24px;
    top: 3rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(44,44,44,0.2);
    background: rgba(255,255,255,0.5);
    z-index: 101;
    transition: transform 0.3s ease, background 0.3s ease;
}

.thread-marker:hover {
    transform: scale(1.3);
    background: rgba(255,255,255,0.8);
}

.thread-end {
    top: auto;
    bottom: 3rem;
}

/* ===== SUN DISC ===== */
.sun-disc {
    position: fixed;
    right: 40px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffb74d 0%, #ffa726 100%);
    box-shadow: 0 0 30px rgba(255,183,77,0.4), 0 0 60px rgba(255,183,77,0.15);
    z-index: 100;
    opacity: 0.7;
    top: 60%;
    transition: top 0.05s linear, box-shadow 0.3s ease, background 0.5s ease;
    pointer-events: none;
}

.sun-disc.moon {
    background: radial-gradient(circle, #b0bec5 0%, #90a4ae 100%);
    box-shadow: 0 0 20px rgba(176,190,197,0.4), 0 0 50px rgba(176,190,197,0.15);
}

/* ===== SEASON SECTIONS ===== */
.season {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 3rem 6rem 70px;
    overflow: hidden;
}

.season-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
    z-index: 0;
}

/* ===== PARALLAX LAYERS ===== */
.parallax-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    will-change: transform;
}

.layer-far {
    z-index: 1;
}

.layer-mid {
    z-index: 2;
}

.layer-near {
    z-index: 3;
}

.silhouette {
    display: block;
    width: 100%;
    height: 200px;
}

.silhouette-mid {
    height: 180px;
}

.silhouette-near {
    height: 130px;
}

/* ===== MONTH LABELS ===== */
.month-label {
    position: absolute;
    left: 55px;
    top: 2.5rem;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 200;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(44,44,44,0.25);
    writing-mode: vertical-rl;
    z-index: 20;
    user-select: none;
}

/* ===== FLOATING TEXT ===== */
.float-text {
    position: relative;
    z-index: 15;
    max-width: 380px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.ft-center {
    align-self: center;
    text-align: center;
}

.ft-center-high {
    align-self: center;
    text-align: center;
    margin-bottom: 4rem;
}

.ft-center-low {
    align-self: center;
    text-align: center;
    margin-top: 5rem;
}

.ft-left {
    align-self: flex-start;
}

.ft-left-low {
    align-self: flex-start;
    margin-top: 4rem;
}

.ft-left-mid {
    align-self: flex-start;
    margin-top: 2.5rem;
}

.ft-right {
    align-self: flex-end;
    text-align: right;
}

.ft-right-low {
    align-self: flex-end;
    text-align: right;
    margin-top: 3rem;
}

/* ===== TYPOGRAPHY ===== */
.display-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--text);
    text-shadow: 0 0 40px rgba(221,230,237,0.9), 0 0 80px rgba(221,230,237,0.5);
    line-height: 1.1;
}

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

.section-display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--text);
    text-shadow: 0 0 30px rgba(255,248,225,0.8);
    letter-spacing: 0.01em;
}

.body-text {
    font-family: 'Spectral', serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(44,44,44,0.65);
    text-shadow: 0 0 25px rgba(255,255,255,0.7), 0 0 50px rgba(255,255,255,0.3);
}

.closing-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 200;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: rgba(44,44,44,0.25);
}

/* ===== FOG LAYERS ===== */
.fog-layer {
    position: absolute;
    width: 250%;
    height: 120px;
    z-index: 6;
    pointer-events: none;
    opacity: 0.8;
}

.fog-slow {
    bottom: 18%;
    left: -75%;
    background: linear-gradient(90deg, transparent 0%, var(--fog-color) 30%, var(--fog-color) 50%, transparent 100%);
    animation: fogDriftSlow 25s ease-in-out infinite;
}

.fog-fast {
    bottom: 35%;
    left: -60%;
    background: linear-gradient(90deg, transparent 0%, var(--fog-color) 25%, var(--fog-color) 45%, transparent 100%);
    animation: fogDriftFast 18s ease-in-out infinite;
}

@keyframes fogDriftSlow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(12%); }
}

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

/* ===== CONSTELLATION ===== */
.constellation {
    position: absolute;
    z-index: 5;
    opacity: 0.6;
    pointer-events: none;
    animation: constellationTwinkle 6s ease-in-out infinite;
}

@keyframes constellationTwinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ===== PARTICLES ===== */
.particle-el {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Snow */
.particle-snow {
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    0% {
        transform: translateY(-20px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    8% { opacity: 0.7; }
    92% { opacity: 0.6; }
    100% {
        transform: translateY(100vh) translateX(40px) rotate(120deg);
        opacity: 0;
    }
}

/* Rain */
.particle-rain {
    width: 1px;
    height: 12px;
    background: linear-gradient(to bottom, rgba(129,199,132,0.4), rgba(129,199,132,0.05));
    border-radius: 0 0 1px 1px;
    opacity: 0;
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    5% { opacity: 0.6; }
    95% { opacity: 0.3; }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Pollen */
.particle-pollen {
    background: rgba(129,199,132,0.6);
    border-radius: 50%;
    opacity: 0;
    animation: pollenFloat ease-in-out infinite;
}

@keyframes pollenFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    15% { opacity: 0.5; }
    50% {
        transform: translate(40px, -60px) scale(1.2);
        opacity: 0.6;
    }
    85% { opacity: 0.4; }
    100% {
        transform: translate(80px, -120px) scale(0.8);
        opacity: 0;
    }
}

/* Blossom petals */
.particle-blossom {
    width: 8px;
    height: 6px;
    background: radial-gradient(ellipse, rgba(244,143,177,0.7) 0%, rgba(244,143,177,0.2) 100%);
    border-radius: 50% 0 50% 50%;
    opacity: 0;
    animation: blossomDrift ease-in-out infinite;
}

@keyframes blossomDrift {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% { opacity: 0.7; }
    50% {
        transform: translate(80px, 40vh) rotate(180deg) scale(0.9);
        opacity: 0.6;
    }
    90% { opacity: 0.3; }
    100% {
        transform: translate(150px, 90vh) rotate(360deg) scale(0.6);
        opacity: 0;
    }
}

/* Fireflies */
.particle-firefly {
    background: #ffb74d;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255,183,77,0.6), 0 0 20px rgba(255,183,77,0.2);
    animation: fireflyGlow ease-in-out infinite;
}

@keyframes fireflyGlow {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    25% {
        opacity: 0.9;
        transform: translate(10px, -15px);
    }
    50% {
        opacity: 0.2;
        transform: translate(-5px, -25px);
    }
    75% {
        opacity: 0.8;
        transform: translate(15px, -10px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

/* Leaves */
.particle-leaf {
    border-radius: 0 50% 50% 50%;
    opacity: 0;
    animation: leafFall ease-in-out infinite;
}

.particle-leaf.leaf-red {
    background: rgba(229,115,115,0.7);
}

.particle-leaf.leaf-gold {
    background: rgba(255,183,77,0.7);
}

.particle-leaf.leaf-brown {
    background: rgba(188,143,100,0.6);
}

@keyframes leafFall {
    0% {
        transform: translateY(-15px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    8% { opacity: 0.7; }
    25% {
        transform: translateY(25vh) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-10px) rotate(200deg);
        opacity: 0.6;
    }
    75% {
        transform: translateY(75vh) translateX(45px) rotate(290deg);
    }
    92% { opacity: 0.4; }
    100% {
        transform: translateY(100vh) translateX(20px) rotate(380deg);
        opacity: 0;
    }
}

/* ===== SCROLL PROGRESS INDICATOR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        #8ba4b8 0%,
        #81c784 25%,
        #ffb74d 50%,
        #e57373 75%,
        #7986cb 100%
    );
    z-index: 200;
    transform-origin: left;
    width: 100%;
    transform: scaleX(0);
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .season {
        padding: 5rem 1.5rem 5rem 1.5rem;
    }

    .thread-line,
    .thread-marker {
        display: none;
    }

    .month-label {
        writing-mode: horizontal-tb;
        left: 1.5rem;
        top: 1.5rem;
    }

    .ft-right,
    .ft-right-low {
        align-self: flex-start;
        text-align: left;
    }

    .float-text {
        max-width: 100%;
    }

    .display-text {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .sun-disc {
        right: 20px;
        width: 18px;
        height: 18px;
    }

    .constellation {
        display: none;
    }

    .silhouette {
        height: 140px;
    }

    .silhouette-mid {
        height: 120px;
    }

    .silhouette-near {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .season {
        padding: 4rem 1rem 4rem 1rem;
    }

    .month-label {
        left: 1rem;
        top: 1rem;
    }

    .body-text {
        font-size: 0.88rem;
    }
}
