/* annual.quest - Seasonal Narrative Stylesheet */

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    --deep-bg: #0d0a14;
    --surface: #1a1025;
    --neon-mint: #00f0a0;
    --hot-magenta: #ff2d95;
    --electric-marigold: #ffb627;
    --lavender-mist: #e8e0f0;
    --plum-ink: #2e2240;
    --faded-orchid: #6b5a7d;
    --petal-white: #f8f4fc;
    --season-bg: #0d0a14;
    --neon-glow: 0 0 30px rgba(0, 240, 160, 0.15), 0 0 60px rgba(255, 45, 149, 0.08);
    --gradient-accent: linear-gradient(135deg, #00f0a0, #ff2d95);
}

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

html {
    scroll-behavior: smooth;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.72;
    color: var(--lavender-mist);
    background-color: var(--season-bg);
    transition: background-color 1.2s ease-in-out;
    overflow: hidden;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[data-season='winter'] { --season-bg: #0d0a14; }
body[data-season='spring'] { --season-bg: #1a1025; }
body[data-season='summer'] { --season-bg: #f8f4fc; }
body[data-season='autumn'] { --season-bg: #14100a; }
body[data-season='renewal'] { --season-bg: #0d0a14; }

/* ========================================
   Brand / Logo
   ======================================== */
.brand {
    position: fixed;
    top: clamp(1.5rem, 3vh, 2.5rem);
    left: clamp(1.5rem, 3vw, 3rem);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faded-orchid);
    z-index: 100;
    transition: color 0.8s ease;
}

body[data-season='summer'] .brand {
    color: var(--plum-ink);
}

/* ========================================
   Dot Navigation
   ======================================== */
.dot-nav {
    position: fixed;
    right: clamp(1.5rem, 3vw, 3rem);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.dot-nav__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--faded-orchid);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    opacity: 0.5;
}

.dot-nav__dot.active {
    width: 24px;
    height: 6px;
    border-radius: 12px;
    background: var(--gradient-accent);
    opacity: 1;
    box-shadow: var(--neon-glow);
}

.dot-nav__label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faded-orchid);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dot-nav__dot.active .dot-nav__label {
    opacity: 1;
}

body[data-season='summer'] .dot-nav__dot {
    background: var(--plum-ink);
}

body[data-season='summer'] .dot-nav__dot.active {
    background: var(--gradient-accent);
}

body[data-season='summer'] .dot-nav__label {
    color: var(--plum-ink);
}

/* ========================================
   Scroll Container
   ======================================== */
.scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* ========================================
   Acts (Sections)
   ======================================== */
.act {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.act__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    padding-left: clamp(1rem, 2vw, 2rem);
    padding-right: clamp(2rem, 5vw, 6rem);
    width: 100%;
    max-width: 100%;
    min-height: 85vh;
    align-items: center;
}

/* Z-Pattern: Odd sections - content top-left, visual bottom-right */
.act__grid--odd .act__content {
    grid-column: 1 / 7;
    grid-row: 1;
    align-self: start;
    padding-top: 15vh;
}

.act__grid--odd .act__visual {
    grid-column: 6 / 13;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    padding-bottom: 10vh;
}

/* Z-Pattern: Even sections - content bottom-left visual top-right swapped */
.act__grid--even .act__content {
    grid-column: 5 / 12;
    grid-row: 1;
    align-self: end;
    padding-bottom: 12vh;
    text-align: right;
}

.act__grid--even .act__visual {
    grid-column: 1 / 7;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    padding-top: 12vh;
}

/* ========================================
   Typography
   ======================================== */
.act__label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hot-magenta);
    opacity: 0.8;
    display: block;
    margin-bottom: 1.5rem;
}

.act__headline {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--neon-mint);
    margin-bottom: 1.5rem;
}

.act__body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.72;
    color: var(--lavender-mist);
    max-width: 520px;
    font-feature-settings: 'onum';
}

/* Summer (light) section overrides */
.act--summer .act__headline {
    color: var(--surface);
}

.act--summer .act__body {
    color: var(--plum-ink);
}

.act--summer .act__label {
    color: var(--hot-magenta);
}

/* ========================================
   Morph Blobs
   ======================================== */
.morph-blob {
    width: clamp(250px, 45vw, 550px);
    height: clamp(250px, 45vw, 550px);
    position: relative;
}

.morph-blob__inner {
    width: 100%;
    height: 100%;
    animation: blobMorph 15s ease-in-out infinite;
    overflow: hidden;
}

.morph-blob--1 .morph-blob__inner {
    background: conic-gradient(from 0deg, #0d0a14, #00f0a0, #1a1025, #6b5a7d, #0d0a14);
    animation-name: blobMorph;
    animation-duration: 15s;
}

.morph-blob--2 .morph-blob__inner {
    background: conic-gradient(from 90deg, #1a1025, #00f0a0, #ff2d95, #1a1025);
    animation-name: blobMorph2;
    animation-duration: 18s;
}

.morph-blob--3 .morph-blob__inner {
    background: conic-gradient(from 180deg, #f8f4fc, #ffb627, #ff2d95, #00f0a0, #f8f4fc);
    animation-name: blobMorph;
    animation-duration: 12s;
}

.morph-blob--4 .morph-blob__inner {
    background: conic-gradient(from 270deg, #14100a, #ffb627, #ff2d95, #14100a);
    animation-name: blobMorph2;
    animation-duration: 16s;
}

.morph-blob--5 .morph-blob__inner {
    background: conic-gradient(from 45deg, #0d0a14, #00f0a0, #6b5a7d, #0d0a14);
    animation-name: blobMorph;
    animation-duration: 20s;
}

@keyframes blobMorph {
    0%   { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    25%  { border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%; }
    50%  { border-radius: 50% 60% 40% 50% / 40% 50% 60% 50%; }
    75%  { border-radius: 40% 50% 60% 40% / 60% 40% 50% 60%; }
    100% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
}

@keyframes blobMorph2 {
    0%   { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; }
    25%  { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    50%  { border-radius: 55% 45% 45% 55% / 45% 55% 45% 55%; }
    75%  { border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%; }
    100% { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; }
}

@keyframes conicRotate {
    from { filter: hue-rotate(0deg); }
    to   { filter: hue-rotate(360deg); }
}

/* ========================================
   Ring Clusters
   ======================================== */
.ring-cluster {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    border-image: var(--gradient-accent) 1;
    background: transparent;
    animation: ringPulse 8s ease-in-out infinite;
}

.ring-cluster .ring {
    border: 1px solid;
    border-image: none;
    border-color: rgba(0, 240, 160, 0.15);
}

.ring-cluster--1 .ring:nth-child(1) {
    width: 120px; height: 120px;
    top: -60px; left: -60px;
    animation-delay: 0s;
    border-color: rgba(0, 240, 160, 0.2);
}
.ring-cluster--1 .ring:nth-child(2) {
    width: 200px; height: 200px;
    top: -100px; left: -100px;
    animation-delay: -2s;
    border-color: rgba(255, 45, 149, 0.12);
}
.ring-cluster--1 .ring:nth-child(3) {
    width: 300px; height: 300px;
    top: -150px; left: -150px;
    animation-delay: -4s;
    border-color: rgba(107, 90, 125, 0.1);
}

.ring-cluster--2 .ring:nth-child(1) {
    width: 80px; height: 80px;
    top: -40px; left: -40px;
    animation-delay: 0s;
    border-color: rgba(255, 182, 39, 0.2);
}
.ring-cluster--2 .ring:nth-child(2) {
    width: 140px; height: 140px;
    top: -70px; left: -70px;
    animation-delay: -1.5s;
    border-color: rgba(0, 240, 160, 0.15);
}
.ring-cluster--2 .ring:nth-child(3) {
    width: 210px; height: 210px;
    top: -105px; left: -105px;
    animation-delay: -3s;
    border-color: rgba(255, 45, 149, 0.12);
}
.ring-cluster--2 .ring:nth-child(4) {
    width: 290px; height: 290px;
    top: -145px; left: -145px;
    animation-delay: -4.5s;
    border-color: rgba(107, 90, 125, 0.08);
}
.ring-cluster--2 .ring:nth-child(5) {
    width: 380px; height: 380px;
    top: -190px; left: -190px;
    animation-delay: -6s;
    border-color: rgba(0, 240, 160, 0.06);
}

.ring-cluster--3 .ring:nth-child(1) {
    width: 100px; height: 100px;
    top: -50px; left: -50px;
    animation-delay: 0s;
    border-color: rgba(0, 240, 160, 0.18);
}
.ring-cluster--3 .ring:nth-child(2) {
    width: 180px; height: 180px;
    top: -90px; left: -90px;
    animation-delay: -2s;
    border-color: rgba(255, 45, 149, 0.12);
}
.ring-cluster--3 .ring:nth-child(3) {
    width: 270px; height: 270px;
    top: -135px; left: -135px;
    animation-delay: -4s;
    border-color: rgba(255, 182, 39, 0.1);
}
.ring-cluster--3 .ring:nth-child(4) {
    width: 370px; height: 370px;
    top: -185px; left: -185px;
    animation-delay: -6s;
    border-color: rgba(107, 90, 125, 0.06);
}

@keyframes ringPulse {
    0%, 100% { transform: scale(0.98); opacity: 1; }
    50%      { transform: scale(1.02); opacity: 0.7; }
}

/* ========================================
   Leaf Silhouettes
   ======================================== */
.leaf-silhouettes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.leaf {
    position: absolute;
    width: 60px;
    height: 90px;
    color: var(--faded-orchid);
    opacity: 0.25;
}

.leaf--1 {
    top: 20%;
    left: 10%;
    animation: leafDrift1 30s linear infinite;
}

.leaf--2 {
    top: 60%;
    left: 70%;
    animation: leafDrift2 35s linear infinite;
    transform: rotate(45deg);
}

.leaf--3 {
    top: 15%;
    left: 25%;
    animation: leafDrift1 28s linear infinite;
}

.leaf--4 {
    top: 50%;
    left: 55%;
    animation: leafDrift2 40s linear infinite;
    transform: rotate(-30deg);
}

.leaf--5 {
    top: 75%;
    left: 80%;
    animation: leafDrift1 32s linear infinite;
    transform: rotate(60deg);
}

.leaf-silhouettes--autumn .leaf {
    color: var(--electric-marigold);
    opacity: 0.2;
}

@keyframes leafDrift1 {
    0%   { transform: translateX(0) translateY(0) rotate(0deg); }
    25%  { transform: translateX(30px) translateY(-15px) rotate(8deg); }
    50%  { transform: translateX(60px) translateY(5px) rotate(-5deg); }
    75%  { transform: translateX(25px) translateY(20px) rotate(12deg); }
    100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

@keyframes leafDrift2 {
    0%   { transform: translateX(0) translateY(0) rotate(45deg); }
    25%  { transform: translateX(-25px) translateY(20px) rotate(55deg); }
    50%  { transform: translateX(-50px) translateY(-10px) rotate(38deg); }
    75%  { transform: translateX(-20px) translateY(-25px) rotate(50deg); }
    100% { transform: translateX(0) translateY(0) rotate(45deg); }
}

/* ========================================
   Season Boundary / Growth Line
   ======================================== */
.season-boundary {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(2rem, 5vw, 6rem);
}

.growth-line {
    height: 2px;
    width: 0%;
    background: var(--gradient-accent);
    transition: width 1.2s ease-out;
    box-shadow: var(--neon-glow);
}

.season-boundary.visible .growth-line {
    width: 100%;
}

.bloom-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
}

/* ========================================
   Bloom Particles
   ======================================== */
.bloom-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    opacity: 0;
    animation: bloomScatter 1.2s ease-out forwards;
}

@keyframes bloomScatter {
    0% {
        transform: translate(-50%, -50%) translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--bloom-x), var(--bloom-y)) scale(0);
        opacity: 0;
    }
}

/* ========================================
   Act Content Reveal Animation
   ======================================== */
.act__content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.act.in-view .act__content {
    opacity: 1;
    transform: translateY(0);
}

.act__visual {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease-out 0.2s, transform 1s ease-out 0.2s;
    position: relative;
}

.act.in-view .act__visual {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .act__grid {
        grid-template-columns: 1fr;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .act__grid--odd .act__content,
    .act__grid--even .act__content {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
        padding-top: 12vh;
        padding-bottom: 0;
        text-align: left;
    }

    .act__grid--odd .act__visual,
    .act__grid--even .act__visual {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
        justify-self: center;
        padding-top: 2rem;
        padding-bottom: 5vh;
    }

    .morph-blob {
        width: clamp(200px, 70vw, 350px);
        height: clamp(200px, 70vw, 350px);
    }

    .dot-nav {
        right: 1rem;
    }

    .dot-nav__label {
        display: none;
    }

    .act__headline {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
}
