/* continua.st - Generative Dreamscape */
/* Palette: Sunset Warm */
/* #d4622a Molten Amber | #e8845c Sunset Coral | #f2b87a Golden Haze */
/* #f5d0b3 Peach Bloom | #c4a1c7 Dusk Lavender | #3d1e0c Burnt Umber */
/* #fdf0e3 Ember Cream | #1a0e1e Deep Twilight */

:root {
    --molten-amber: #d4622a;
    --sunset-coral: #e8845c;
    --golden-haze: #f2b87a;
    --peach-bloom: #f5d0b3;
    --dusk-lavender: #c4a1c7;
    --burnt-umber: #3d1e0c;
    --ember-cream: #fdf0e3;
    --deep-twilight: #1a0e1e;
    --bg-progress: 0;
}

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

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

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--burnt-umber);
    background: linear-gradient(170deg,
        #fdf0e3 0%,
        #f5d0b3 25%,
        #e8845c 50%,
        #d4622a 70%,
        #c4a1c7 85%,
        #1a0e1e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ======================== */
/* Scroll Indicator         */
/* ======================== */

.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-track {
    width: 1px;
    height: 100%;
    background: rgba(196, 161, 199, 0.3);
    position: relative;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sunset-coral);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: top 0.1s ease-out;
    box-shadow: 0 0 8px rgba(232, 132, 92, 0.6);
}

/* ======================== */
/* Pool 1 - The Emergence   */
/* ======================== */

#pool-emergence {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#blob-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-title-wrap {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 2s ease-out 1.5s forwards;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.03em;
    line-height: 1.05;
    color: var(--ember-cream);
    text-shadow:
        0 0 40px rgba(253, 240, 227, 0.4),
        0 0 80px rgba(232, 132, 92, 0.2);
    mix-blend-mode: difference;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--sunset-coral);
    opacity: 0;
    animation: chevronPulse 2s ease-in-out infinite, chevronFadeIn 1s ease-out 4s forwards;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

@keyframes chevronFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ======================== */
/* Pool 2 - The Drift       */
/* ======================== */

#pool-drift {
    position: relative;
    min-height: 120vh;
    padding: 8rem 2rem;
    overflow: visible;
}

.drift-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100%;
}

.drift-card {
    position: relative;
    width: clamp(280px, 35vw, 420px);
    padding: 2.5rem 2rem;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(253, 240, 227, 0.6) 0%, rgba(245, 208, 179, 0.4) 100%);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(242, 184, 122, 0.3);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    box-shadow:
        0 8px 32px rgba(61, 30, 12, 0.08),
        0 2px 8px rgba(61, 30, 12, 0.04);
}

.drift-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.drift-card[data-index="0"] { margin-left: 5%; }
.drift-card[data-index="1"] { margin-left: 45%; }
.drift-card[data-index="2"] { margin-left: 15%; }
.drift-card[data-index="3"] { margin-left: 55%; }
.drift-card[data-index="4"] { margin-left: 25%; }

.card-heading {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--burnt-umber);
    margin-bottom: 1rem;
}

.card-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    letter-spacing: 0.01em;
    line-height: 1.75;
    color: var(--burnt-umber);
    opacity: 0.85;
}

/* Decorative Blobs */

.deco-blob {
    position: absolute;
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    pointer-events: none;
    z-index: -1;
    animation: blobPulse 12s ease-in-out infinite;
}

@keyframes blobPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(3deg); }
}

.deco-blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(232, 132, 92, 0.15);
    box-shadow: 0 0 80px 40px rgba(232, 132, 92, 0.2);
    top: 10%;
    left: -10%;
}

.deco-blob-2 {
    width: 400px;
    height: 400px;
    background: rgba(196, 161, 199, 0.15);
    box-shadow: 0 0 80px 40px rgba(196, 161, 199, 0.2);
    top: 40%;
    right: -5%;
    animation-delay: -4s;
}

.deco-blob-3 {
    width: 350px;
    height: 350px;
    background: rgba(242, 184, 122, 0.15);
    box-shadow: 0 0 80px 40px rgba(242, 184, 122, 0.2);
    bottom: 5%;
    left: 20%;
    animation-delay: -8s;
}

/* ======================== */
/* Pool 3 - The Convergence */
/* ======================== */

#pool-convergence {
    position: relative;
    min-height: 120vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
}

.convergence-container {
    position: relative;
    width: min(90vw, 900px);
    height: min(90vw, 900px);
    max-width: 900px;
    max-height: 900px;
}

.gen-circle {
    position: absolute;
    border-radius: 50%;
    overflow: hidden;
    transform: scale(0);
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gen-circle.visible {
    transform: scale(1);
}

.gen-circle-1 {
    width: 55%;
    height: 55%;
    top: 0;
    left: 22%;
    z-index: 3;
}

.gen-circle-2 {
    width: 50%;
    height: 50%;
    bottom: 10%;
    left: 0;
    z-index: 2;
}

.gen-circle-3 {
    width: 48%;
    height: 48%;
    bottom: 10%;
    right: 0;
    z-index: 1;
    mix-blend-mode: screen;
}

.gen-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.convergence-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--ember-cream);
    margin-top: 4rem;
    opacity: 0.8;
    text-align: center;
}

/* ======================== */
/* Pool 4 - The Resonance   */
/* ======================== */

#pool-resonance {
    position: relative;
    height: 120vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.resonance-strip {
    display: flex;
    gap: 4px;
    height: 70vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 4rem;
}

.resonance-strip::-webkit-scrollbar {
    display: none;
}

.resonance-panel {
    flex: 0 0 auto;
    width: calc(28vh);
    height: 70vh;
    border-radius: 24px;
    overflow: hidden;
    scroll-snap-align: start;
    background: rgba(61, 30, 12, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.panel-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ======================== */
/* Pool 5 - The Dissolve    */
/* ======================== */

#pool-dissolve {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    overflow: hidden;
}

.dissolve-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.dissolve-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--ember-cream);
    opacity: 0.08;
    line-height: 1.05;
    letter-spacing: 0.03em;
}

.dissolve-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dusk-lavender);
    opacity: 0.5;
    margin-top: 1.5rem;
}

/* Floating Embers */

.ember {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: soft-light;
    pointer-events: none;
    animation: emberFloat 10s ease-in-out infinite alternate;
}

@keyframes emberFloat {
    from { transform: translateY(20px); }
    to { transform: translateY(-20px); }
}

.ember-1 {
    width: 60px;
    height: 60px;
    background: var(--sunset-coral);
    opacity: 0.3;
    top: 15%;
    left: 10%;
    animation-duration: 8s;
}

.ember-2 {
    width: 40px;
    height: 40px;
    background: var(--golden-haze);
    opacity: 0.25;
    top: 25%;
    right: 15%;
    animation-duration: 12s;
    animation-delay: -3s;
}

.ember-3 {
    width: 70px;
    height: 70px;
    background: var(--dusk-lavender);
    opacity: 0.2;
    bottom: 30%;
    left: 20%;
    animation-duration: 15s;
    animation-delay: -6s;
}

.ember-4 {
    width: 50px;
    height: 50px;
    background: var(--molten-amber);
    opacity: 0.2;
    top: 60%;
    right: 25%;
    animation-duration: 10s;
    animation-delay: -2s;
}

.ember-5 {
    width: 45px;
    height: 45px;
    background: var(--peach-bloom);
    opacity: 0.3;
    bottom: 20%;
    right: 10%;
    animation-duration: 9s;
    animation-delay: -4s;
}

.ember-6 {
    width: 55px;
    height: 55px;
    background: var(--sunset-coral);
    opacity: 0.15;
    top: 40%;
    left: 35%;
    animation-duration: 14s;
    animation-delay: -7s;
}

/* ======================== */
/* General Pool Styles      */
/* ======================== */

.pool {
    position: relative;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-title-wrap {
        opacity: 1;
        animation: none;
    }

    .scroll-chevron {
        opacity: 0.5;
        animation: none;
    }

    .deco-blob,
    .ember {
        animation: none;
    }

    .drift-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .gen-circle {
        transform: scale(1);
        transition: none;
    }

    #blob-canvas,
    .gen-canvas,
    .panel-canvas {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .drift-card {
        width: 90%;
        margin-left: 5% !important;
    }

    .convergence-container {
        width: 95vw;
        height: 95vw;
    }

    .resonance-panel {
        width: calc(60vw);
    }

    .scroll-indicator {
        right: 10px;
    }
}
