/* dilemma.quest - Surreal Dreamscape Promo */
/* Palette: #1e1b4b, #312e81, #818cf8, #06b6d4, #f43f5e, #e0e7ff, #c7d2fe */

:root {
    --deep: #1e1b4b;
    --mid: #312e81;
    --glow: #818cf8;
    --teal: #06b6d4;
    --rose: #f43f5e;
    --text: #e0e7ff;
    --mist: #c7d2fe;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep);
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================================================
   FOG OVERLAYS
   ============================================================ */

.fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(199, 210, 254, 0.02) 20%,
        rgba(199, 210, 254, 0.05) 50%,
        rgba(199, 210, 254, 0.03) 80%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 5;
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.fog-secondary {
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(129, 140, 248, 0.02) 30%,
        rgba(199, 210, 254, 0.04) 60%,
        transparent 100%
    );
    z-index: 4;
    opacity: 0.2;
}

/* ============================================================
   FLOATING SHAPES
   ============================================================ */

.shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    opacity: 0.05;
    will-change: transform;
}

.floating-shape.circle {
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--glow);
    border-radius: 50%;
}

.floating-shape.triangle {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 21px solid var(--glow);
}

.floating-shape.diamond {
    width: 16px;
    height: 16px;
    border: 1px solid var(--glow);
    transform: rotate(45deg);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.05;
    }
    90% {
        opacity: 0.05;
    }
    100% {
        transform: translateY(-110vh) rotate(180deg);
        opacity: 0;
    }
}

/* ============================================================
   SCROLL LINE (thin glow along left edge)
   ============================================================ */

.scroll-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.scroll-line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--teal), var(--glow), var(--rose));
    opacity: 0.4;
    transition: height 0.1s linear;
}

/* ============================================================
   SCENES (full-viewport sections)
   ============================================================ */

.scene {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.scene-inner {
    max-width: 580px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.scene-bg-accent {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

/* ============================================================
   THE THRESHOLD
   ============================================================ */

.scene-threshold {
    background: radial-gradient(ellipse at 50% 40%, var(--mid) 0%, var(--deep) 70%);
    min-height: 100vh;
    padding-bottom: 2rem;
}

.threshold-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 2;
}

.brand {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: clamp(2.8rem, 8vw, 4.5rem);
    text-shadow: 0 0 60px rgba(129, 140, 248, 0.35), 0 0 120px rgba(129, 140, 248, 0.15);
    letter-spacing: 0.02em;
    animation: brandGlow 4s ease-in-out infinite alternate;
}

.brand-dot {
    color: var(--glow);
}

@keyframes brandGlow {
    0% {
        text-shadow: 0 0 60px rgba(129, 140, 248, 0.35), 0 0 120px rgba(129, 140, 248, 0.15);
    }
    100% {
        text-shadow: 0 0 80px rgba(129, 140, 248, 0.5), 0 0 160px rgba(129, 140, 248, 0.25);
    }
}

.hero-sub {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--mist);
    margin-top: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
}

/* ============================================================
   DOORWAYS
   ============================================================ */

.doorways {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.doorway-gap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 160px;
}

.doorway-or {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--glow);
    opacity: 0.4;
    letter-spacing: 0.1em;
}

.doorway {
    width: 100px;
    height: 160px;
    border: 2px solid var(--glow);
    border-radius: 50px 50px 0 0;
    background: rgba(129, 140, 248, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.doorway-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60%;
    height: 0%;
    transform: translateX(-50%);
    border-radius: 50%;
    transition: height 1.5s ease, opacity 1.5s ease;
    opacity: 0;
    pointer-events: none;
}

.doorway-inner-light {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 2px;
    height: 0%;
    transform: translateX(-50%);
    opacity: 0;
    transition: height 2s ease 0.5s, opacity 2s ease 0.5s;
}

.doorway-teal {
    border-color: var(--teal);
    background: rgba(6, 182, 212, 0.06);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.1), inset 0 -20px 40px rgba(6, 182, 212, 0.05);
}

.doorway-teal .doorway-glow {
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
}

.doorway-teal .doorway-inner-light {
    background: linear-gradient(180deg, transparent, rgba(6, 182, 212, 0.4), transparent);
}

.doorway-rose {
    border-color: var(--rose);
    background: rgba(244, 63, 94, 0.06);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.1), inset 0 -20px 40px rgba(244, 63, 94, 0.05);
}

.doorway-rose .doorway-glow {
    background: radial-gradient(ellipse, rgba(244, 63, 94, 0.3) 0%, transparent 70%);
}

.doorway-rose .doorway-inner-light {
    background: linear-gradient(180deg, transparent, rgba(244, 63, 94, 0.4), transparent);
}

/* Doorway activated state (after scroll begins) */
.doorway.active .doorway-glow {
    height: 80%;
    opacity: 1;
}

.doorway.active .doorway-inner-light {
    height: 50%;
    opacity: 1;
}

.doorway.active.doorway-teal {
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.2), inset 0 -30px 60px rgba(6, 182, 212, 0.1);
}

.doorway.active.doorway-rose {
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.2), inset 0 -30px 60px rgba(244, 63, 94, 0.1);
}

/* ============================================================
   SCROLL HINT
   ============================================================ */

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.scroll-hint-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--glow);
    opacity: 0.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-hint-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.scroll-hint.hidden {
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* ============================================================
   FORK SVG CONNECTORS
   ============================================================ */

.fork-container {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    position: relative;
    z-index: 2;
    background: transparent;
}

.fork-svg {
    width: 300px;
    height: 100px;
}

.fork-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease, opacity 1.2s ease;
}

.fork-path.drawn {
    stroke-dashoffset: 0;
    opacity: 0.5;
}

.fork-node {
    transition: opacity 0.8s ease 0.3s;
}

.fork-node.drawn {
    opacity: 0.6;
}

/* ============================================================
   JOURNEY SCENES
   ============================================================ */

.scene-journey-1 {
    background: linear-gradient(180deg, var(--deep) 0%, #222060 50%, #252262 100%);
}

.scene-journey-1 .scene-bg-accent {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
}

.scene-journey-2 {
    background: linear-gradient(180deg, #252262 0%, #2a2670 50%, var(--mid) 100%);
}

.scene-journey-2 .scene-bg-accent {
    background: radial-gradient(circle, rgba(244, 63, 94, 0.04) 0%, transparent 60%);
}

/* ============================================================
   DEEPENING SCENES
   ============================================================ */

.scene-deepening {
    background: linear-gradient(180deg, #1a1745 0%, #151240 50%, #120f35 100%);
}

.scene-deepening .scene-bg-accent {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.03) 0%, transparent 60%);
}

.scene-deepening-2 {
    background: linear-gradient(180deg, #120f35 0%, #0f0d2a 50%, #0d0b25 100%);
}

.scene-deepening-2 .scene-bg-accent {
    background: radial-gradient(circle, rgba(199, 210, 254, 0.02) 0%, transparent 60%);
}

/* ============================================================
   SCENE CONTENT
   ============================================================ */

.scene-number {
    display: block;
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--glow);
    opacity: 0.35;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
}

.scene-title {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1.2rem;
    letter-spacing: 0.02em;
}

.scene-text {
    font-size: 1rem;
    color: rgba(224, 231, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.85;
}

.scene-reflection {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--glow);
    opacity: 0;
    margin-top: 1.5rem;
    min-height: 1.5em;
    transition: opacity 0.8s ease;
}

.scene-reflection.shown {
    opacity: 0.6;
}

/* ============================================================
   CHOICE BUTTONS
   ============================================================ */

.choice-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.choice {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease, opacity 0.4s ease;
    position: relative;
    overflow: hidden;
}

.choice::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.5s ease;
    z-index: 0;
}

.choice span {
    position: relative;
    z-index: 1;
}

.choice-teal {
    border: 1.5px solid var(--teal);
    color: var(--teal);
}

.choice-teal::before {
    background: rgba(6, 182, 212, 0.12);
}

.choice-teal:hover {
    background: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
    transform: translateY(-2px);
}

.choice-teal:hover::before {
    left: 0;
}

.choice-rose {
    border: 1.5px solid var(--rose);
    color: var(--rose);
}

.choice-rose::before {
    background: rgba(244, 63, 94, 0.12);
}

.choice-rose:hover {
    background: rgba(244, 63, 94, 0.08);
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
}

.choice-rose:hover::before {
    left: 0;
}

/* Selected state */
.choice.selected {
    transform: translateY(-2px);
}

.choice-teal.selected {
    background: rgba(6, 182, 212, 0.15);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

.choice-rose.selected {
    background: rgba(244, 63, 94, 0.15);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.2);
}

.choice.dimmed {
    opacity: 0.25;
    pointer-events: none;
    transform: none;
}

/* ============================================================
   GLOW LINE DIVIDER
   ============================================================ */

.glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--glow) 50%, transparent 95%);
    opacity: 0.25;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    max-width: 600px;
}

/* ============================================================
   THE REVELATION
   ============================================================ */

.scene-revelation {
    background: radial-gradient(ellipse at 50% 50%, #1a174d 0%, #0f0d2a 60%, #0a0820 100%);
    min-height: 100vh;
}

.revelation-radiance {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(129, 140, 248, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease;
}

.scene-revelation.revealed .revelation-radiance {
    opacity: 1;
}

.revelation-text {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.morph-mark {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 3.5rem;
    color: var(--glow);
    margin-top: 2.5rem;
    opacity: 0.4;
    transition: opacity 0.8s ease, transform 0.8s ease, color 0.8s ease;
    display: inline-block;
}

.morph-mark.exclaim {
    opacity: 0.7;
    transform: scale(1.1);
    color: var(--text);
}

.revelation-sub {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--mist);
    opacity: 0;
    margin-top: 2rem;
    letter-spacing: 0.05em;
    transition: opacity 1.5s ease;
}

.revelation-sub.shown {
    opacity: 0.5;
}

/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */

.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grouped elements */
.scene-inner .fade-in:nth-child(2) {
    transition-delay: 0.1s;
}

.scene-inner .fade-in:nth-child(3) {
    transition-delay: 0.2s;
}

.scene-inner .fade-in:nth-child(4) {
    transition-delay: 0.3s;
}

.scene-inner .fade-in:nth-child(5) {
    transition-delay: 0.4s;
}

/* ============================================================
   SCENE BG ACCENT ACTIVATION
   ============================================================ */

.scene.in-view .scene-bg-accent {
    opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .doorways {
        gap: 0.5rem;
    }

    .doorway {
        width: 80px;
        height: 130px;
    }

    .doorway-gap {
        width: 30px;
        height: 130px;
    }

    .scene {
        padding: 3rem 1.5rem;
    }

    .scene-inner {
        max-width: 100%;
    }

    .fork-svg {
        width: 220px;
        height: 80px;
    }

    .choice {
        padding: 0.6rem 1.3rem;
        font-size: 0.8rem;
    }

    .threshold-glow,
    .revelation-radiance {
        width: 280px;
        height: 280px;
    }

    .scroll-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .doorway {
        width: 65px;
        height: 110px;
        border-radius: 32px 32px 0 0;
    }

    .choice-row {
        gap: 1rem;
    }
}
