/* ============================================================
   mysterious.boo — Surreal Candy Magazine
   ============================================================ */

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

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

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: #5A4060;
    background: #FFF8FC;
    overflow-x: hidden;
    cursor: none;
}

/* --- CURSOR: DREAM LIGHT --- */
.dream-light {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 192, 240, 0.45) 0%, rgba(224, 192, 240, 0) 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: left 0.2s ease-out, top 0.2s ease-out, background 0.6s ease;
    will-change: left, top;
    mix-blend-mode: screen;
}

/* --- LINE ILLUSTRATION OVERLAYS --- */
.line-overlay {
    position: fixed;
    pointer-events: none;
    opacity: 0.12;
    z-index: 10;
}

.line-overlay--moon {
    width: 180px;
    top: 5vh;
    right: 8vw;
    animation: floatSlow 18s ease-in-out infinite;
}

.line-overlay--eye {
    width: 220px;
    bottom: 12vh;
    left: 4vw;
    animation: floatSlow 22s ease-in-out infinite reverse;
}

.line-overlay--hand {
    width: 120px;
    top: 35vh;
    left: 2vw;
    animation: floatSlow 25s ease-in-out infinite;
}

.line-overlay--flower {
    width: 150px;
    bottom: 8vh;
    right: 5vw;
    animation: floatSlow 20s ease-in-out infinite reverse;
}

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

/* --- TYPOGRAPHY --- */
.kinetic-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #2A1830;
    letter-spacing: 0.05em;
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
}

.kinetic-letter {
    display: inline-block;
    animation: breathe 4s ease-in-out infinite;
    animation-delay: calc(var(--letter-delay, 0) * 0.18s);
}

.kinetic-dot {
    display: inline-block;
    color: #8A6080;
    margin: 0 0.02em;
}

@keyframes breathe {
    0%, 100% {
        letter-spacing: 0;
        transform: translateY(0);
    }
    50% {
        letter-spacing: 0.04em;
        transform: translateY(-2px);
    }
}

.kinetic-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.8rem);
    color: #2A1830;
    line-height: 1.05;
    letter-spacing: 0.02em;
    animation: headingBreathe 6s ease-in-out infinite;
}

@keyframes headingBreathe {
    0%, 100% {
        letter-spacing: 0.02em;
        transform: translateY(0);
    }
    50% {
        letter-spacing: 0.04em;
        transform: translateY(-1.5px);
    }
}

.caveat,
.spread__label {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    color: #8A6080;
}

/* --- SPREADS: MAGAZINE LAYOUT --- */
.spread {
    min-height: 100vh;
    display: grid;
    position: relative;
    overflow: hidden;
}

/* ---- SPREAD 1: OPENING ---- */
.spread--opening {
    grid-template-columns: 58% 42%;
    background: #FFF8FC;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(224, 192, 240, 0.35) 0%, transparent 100%),
        radial-gradient(ellipse 50% 40% at 85% 20%, rgba(192, 240, 224, 0.2) 0%, transparent 100%);
}

.spread--opening .spread__visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6vh 4vw;
}

.spread--opening .spread__illustration--stars {
    width: 70%;
    max-width: 400px;
    opacity: 0.5;
    animation: floatSlow 15s ease-in-out infinite;
}

.spread--opening .spread__label {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.6s forwards;
}

.spread--opening .spread__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 6vw 6vh 2vw;
}

.spread--opening .kinetic-title {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.spread--opening .spread__tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: #5A4060;
    margin-top: 2rem;
    max-width: 380px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- SPREAD 2: THE DREAM ---- */
.spread--dream {
    grid-template-columns: 40% 60%;
    background: #F0D0C0;
}

.spread--dream .spread__content--left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8vh 3vw 8vh 6vw;
}

.spread--dream .spread__label {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.spread--dream .kinetic-heading {
    margin-bottom: 2rem;
}

.spread--dream .spread__body {
    max-width: 360px;
    color: #5A4060;
}

.spread--dream .spread__visual--right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    position: relative;
}

.spread--dream .spread__illustration--portal {
    width: 65%;
    max-width: 350px;
    opacity: 0.6;
    animation: spinSlow 60s linear infinite;
}

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

/* ---- SPREAD 3: THE COLLECTION ---- */
.spread--collection {
    grid-template-columns: 62% 38%;
    background: #C0F0E0;
}

.spread--collection .spread__visual--wide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5vw;
    padding: 6vh 2vw 6vh 5vw;
}

.collection-piece {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.5s ease;
}

.collection-piece svg {
    width: 140px;
    opacity: 0.55;
}

.collection-piece--a {
    transform: translateY(20px);
}

.collection-piece--b {
    transform: translateY(-15px);
}

.collection-piece--c {
    transform: translateY(10px);
}

.collection-piece__label {
    font-family: 'Caveat', cursive;
    color: #3A2040;
    font-size: 1rem;
    margin-top: 0.8rem;
    opacity: 0.6;
}

.spread--collection .spread__content--narrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8vh 5vw 8vh 2vw;
}

.spread--collection .kinetic-heading {
    margin-bottom: 2rem;
}

.spread--collection .spread__body {
    max-width: 340px;
    color: #5A4060;
}

/* ---- SPREAD 4: WHISPERS ---- */
.spread--whispers {
    grid-template-columns: 45% 55%;
    background: #E0C0F0;
}

.spread--whispers .spread__content--left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8vh 3vw 8vh 6vw;
}

.spread--whispers .kinetic-heading {
    margin-bottom: 2.5rem;
}

.whisper-fragments {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.whisper-fragment {
    border: none;
    padding-left: 1.2rem;
    border-left: 2px solid rgba(58, 32, 64, 0.2);
}

.whisper-fragment p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: #2A1830;
    font-style: italic;
    line-height: 1.7;
}

.whisper-fragment cite {
    font-family: 'Caveat', cursive;
    color: #8A6080;
    font-size: 0.95rem;
    display: block;
    margin-top: 0.4rem;
    font-style: normal;
}

.spread--whispers .spread__visual--right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 5vw;
}

.spread--whispers .spread__illustration--faces {
    width: 60%;
    max-width: 380px;
    opacity: 0.45;
}

/* ---- SPREAD 5: THE VANISHING ---- */
.spread--vanishing {
    grid-template-columns: 1fr;
    grid-template-rows: 55% 45%;
    background: #F0D0C0;
    background-image:
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(255, 248, 252, 0.4) 0%, transparent 100%);
}

.spread--vanishing .spread__visual--full {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4vh 4vw 0;
}

.spread--vanishing .spread__illustration--dissolve {
    width: 85%;
    max-width: 750px;
    opacity: 0.4;
}

.spread--vanishing .spread__content--centered {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2vh 6vw 8vh 15vw;
}

.spread--vanishing .kinetic-heading {
    margin-bottom: 1.5rem;
}

.spread--vanishing .spread__body {
    max-width: 440px;
    color: #5A4060;
    margin-bottom: 1.5rem;
}

.spread--vanishing .spread__label {
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    opacity: 0.6;
}

/* --- SCROLL REVEAL --- */
.spread__content,
.spread__visual {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.spread__content.revealed,
.spread__visual.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Opening spread is special — animated by keyframes, not scroll */
.spread--opening .spread__content,
.spread--opening .spread__visual {
    opacity: 1;
    transform: none;
}

/* --- RESPONSIVE: SMALLER SCREENS --- */
@media (max-width: 900px) {
    .spread--opening,
    .spread--dream,
    .spread--collection,
    .spread--whispers {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .spread--opening .spread__visual,
    .spread--dream .spread__visual--right,
    .spread--collection .spread__visual--wide,
    .spread--whispers .spread__visual--right {
        padding: 4vh 6vw;
        min-height: 40vh;
    }

    .spread--opening .spread__content,
    .spread--dream .spread__content--left,
    .spread--collection .spread__content--narrow,
    .spread--whispers .spread__content--left {
        padding: 4vh 6vw;
    }

    .spread--vanishing .spread__content--centered {
        padding: 2vh 6vw 6vh;
    }

    .collection-piece svg {
        width: 100px;
    }

    .line-overlay {
        display: none;
    }

    body {
        cursor: auto;
    }

    .dream-light {
        display: none;
    }
}

/* --- SELECTION --- */
::selection {
    background: #E0C0F0;
    color: #2A1830;
}
