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

:root {
    --pink-hot: #ff6b9d;
    --burgundy-deep: #4a0e2e;
    --burgundy-dark: #2d0f22;
    --burgundy-mid: #8b2252;
    --pink-muted: #c76b8a;
    --void: #1a0a14;
    --magenta: #d4367b;
    --parchment: #f5e6d0;
    --burgundy-accent: #3a0a1e;
    --sand-muted: #d4b8a0;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--parchment);
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--magenta), var(--pink-hot));
    z-index: 1000;
    transition: width 0.3s ease-out;
}

.stage {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.stage-number {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--pink-muted);
    opacity: 0.5;
    letter-spacing: 0.2em;
}

.stage-content {
    text-align: center;
    max-width: 80vw;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.stage.visible .stage-content {
    opacity: 1;
    transform: translateY(0);
}

.stage-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 15vw, 12rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    color: var(--parchment);
    margin-bottom: 2rem;
    text-shadow: 0 0 80px rgba(212, 54, 123, 0.3);
}

.stage-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.7;
    color: var(--pink-muted);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.85;
}

/* Watercolor bloom effects */
.watercolor-bloom {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

.bloom-1 {
    background:
        radial-gradient(ellipse 40% 50% at 20% 60%, rgba(139, 34, 82, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 30% 40% at 80% 30%, rgba(212, 54, 123, 0.2) 0%, transparent 60%);
}

.bloom-2 {
    background:
        radial-gradient(ellipse 50% 60% at 70% 70%, rgba(199, 107, 138, 0.3) 0%, transparent 65%),
        radial-gradient(ellipse 35% 45% at 25% 40%, rgba(74, 14, 46, 0.5) 0%, transparent 60%);
}

.bloom-3 {
    background:
        radial-gradient(ellipse 45% 55% at 50% 50%, rgba(255, 107, 157, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 30% 35% at 15% 80%, rgba(139, 34, 82, 0.4) 0%, transparent 55%);
}

.bloom-4 {
    background:
        radial-gradient(ellipse 55% 45% at 60% 40%, rgba(212, 54, 123, 0.3) 0%, transparent 65%),
        radial-gradient(ellipse 40% 50% at 30% 70%, rgba(45, 15, 34, 0.6) 0%, transparent 60%);
}

.bloom-5 {
    background:
        radial-gradient(ellipse 60% 60% at 50% 50%, rgba(255, 107, 157, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 35% 40% at 80% 20%, rgba(199, 107, 138, 0.3) 0%, transparent 55%),
        radial-gradient(ellipse 25% 30% at 20% 80%, rgba(212, 54, 123, 0.25) 0%, transparent 50%);
}

/* Logic grid for stage 3 */
.logic-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

/* CRT flicker overlay */
.crt-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(26, 10, 20, 0.15) 2px,
        rgba(26, 10, 20, 0.15) 4px
    );
    animation: flicker 0.15s infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Cursor glow */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 54, 123, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 999;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease-out, top 0.1s ease-out;
    display: none;
}

/* Stage-specific color shifts */
#stage1 { background-color: var(--void); }
#stage2 { background-color: #1f0b18; }
#stage3 { background-color: #200e1a; }
#stage4 { background-color: var(--burgundy-dark); }
#stage5 { background-color: #120810; }

/* Glitch effect on headlines */
.stage-headline {
    position: relative;
}

.stage.visible .stage-headline::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--pink-hot);
    opacity: 0;
    clip-path: inset(0 0 0 0);
    animation: glitch-subtle 8s infinite;
}

@keyframes glitch-subtle {
    0%, 95% { opacity: 0; }
    96% { opacity: 0.6; clip-path: inset(20% 0 60% 0); transform: translateX(-3px); }
    97% { opacity: 0; }
    98% { opacity: 0.4; clip-path: inset(50% 0 20% 0); transform: translateX(2px); }
    99% { opacity: 0; }
    100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .stage-headline {
        font-size: clamp(3rem, 12vw, 6rem);
    }
    .stage-body {
        max-width: 90vw;
        font-size: 1rem;
    }
    .stage-number {
        top: 1.5rem;
        right: 1.5rem;
    }
}
