/* mystical.boo - Digital Seance Portal */

:root {
    --void: #0A0A12;
    --aubergine: #1A1028;
    --violet: #7B2FBE;
    --ectoplasm: #3DFFA2;
    --gold: #D4A843;
    --lavender: #C8B8DB;
    --phantom: #F0E6FF;
    --cyan: #4AEADC;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    color: var(--lavender);
    background: var(--void);
    overflow-x: hidden;
}

/* ===== Orbs ===== */
.orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 255, 162, 0.3) 0%, transparent 70%);
    animation: orb-drift linear infinite;
}

.orb-deep { filter: blur(5px); opacity: 0.4; }
.orb-mid { filter: blur(2px); opacity: 0.6; }
.orb-float { filter: blur(0px); opacity: 0.8; }

@keyframes orb-drift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(30px, -40px); }
    50% { transform: translate(-20px, -80px); }
    75% { transform: translate(40px, -40px); }
    100% { transform: translate(0, 0); }
}

/* ===== Acts ===== */
.act {
    position: relative;
    z-index: 2;
    min-height: min(100vh, 900px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(4rem, 8vh, 8rem) 2rem;
}

/* ===== Crystal Ball ===== */
.crystal-ball {
    width: min(60vw, 600px);
    height: min(60vw, 600px);
    border-radius: 50%;
    border: 1px solid rgba(123, 47, 190, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(26, 16, 40, 0.5) 0%, var(--void) 100%);
}

.crystal-ball.small {
    width: min(30vw, 200px);
    height: min(30vw, 200px);
}

.crystal-title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    animation: crystal-fade 3s ease-in forwards;
}

@keyframes crystal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.small-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* ===== Invocation ===== */
.invocation {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--phantom);
    text-align: center;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 1s ease 1.5s;
}

.invocation.revealed {
    opacity: 1;
}

/* ===== Liminal Zones ===== */
.liminal {
    height: 200px;
    position: relative;
    z-index: 2;
}

/* ===== Torn Edge Dividers ===== */
.liminal::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--violet), transparent);
    opacity: 0.2;
    margin-top: 98px;
    filter: drop-shadow(0 0 6px var(--violet));
}

/* ===== Content Blocks ===== */
.content-block {
    max-width: 55ch;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
}

.content-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.content-block.left { align-self: flex-start; margin-left: 12%; }
.content-block.right { align-self: flex-end; margin-right: 12%; }
.content-block.center { text-align: center; }

.content-block h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--phantom);
    margin-bottom: 1.5rem;
    letter-spacing: 0.06em;
}

.content-block p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    color: var(--lavender);
}

/* ===== Candle Flames ===== */
.candle-flame {
    width: 8px;
    height: 16px;
    background: linear-gradient(to top, var(--gold), var(--phantom));
    clip-path: ellipse(50% 50% at 50% 100%);
    position: absolute;
    top: -1.5rem;
    left: 0;
    animation: flame-flicker 1.5s ease-in-out infinite alternate;
}

@keyframes flame-flicker {
    0% { transform: scaleY(1) scaleX(1); opacity: 0.8; }
    50% { transform: scaleY(1.2) scaleX(0.8); opacity: 1; }
    100% { transform: scaleY(0.9) scaleX(1.1); opacity: 0.7; }
}

/* ===== Sigils ===== */
.sigil {
    width: 120px;
    height: 120px;
    opacity: 0.2;
    position: absolute;
    animation: sigil-spin 60s linear infinite;
}

.sigil-left { left: 5%; }
.sigil-right { right: 5%; }

@keyframes sigil-spin {
    to { transform: rotate(360deg); }
}

/* ===== Revelation Cards ===== */
.revelation-cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.rev-card {
    max-width: 40ch;
    padding: 2rem;
    background: rgba(26, 16, 40, 0.5);
    border: 1px solid rgba(123, 47, 190, 0.2);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.rev-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rev-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(74, 234, 220, 0.1);
}

.rev-card h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--phantom);
    margin-bottom: 0.75rem;
}

.rev-card p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--lavender);
}

/* ===== Farewell ===== */
.act-farewell {
    gap: 2rem;
}

.farewell-text {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.8;
    color: var(--lavender);
    text-align: center;
    max-width: 50ch;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.farewell-text.revealed {
    opacity: 1;
}

.domain-echo {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: pulse-glow 3s ease-in-out infinite;
}

.domain-echo.revealed {
    opacity: 1;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 12px rgba(212, 168, 67, 0.3); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .content-block.left,
    .content-block.right {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .sigil {
        display: none;
    }

    .revelation-cards {
        flex-direction: column;
        align-items: center;
    }
}
