:root {
    --primary: #ffffff;
    --secondary: #94a3b8;
    --accent: #e0f2fe; /* very light blue, almost white */
    --accent-glow: #38bdf8;
    --bg-color: #020617;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

body, html {
    background-color: var(--bg-color);
    color: var(--primary);
    font-family: 'Comic Neue', cursive;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Hide scrollbar for cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
body::-webkit-scrollbar {
    display: none;
}

/* Custom Cursor */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Progress Indicator */
.progress-container {
    position: fixed;
    right: 3vw;
    top: 50%;
    transform: translateY(-50%);
    height: 30vh;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-bar {
    width: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--accent-glow);
    height: 0%;
    position: absolute;
    top: 0;
    left: -1px;
    border-radius: 2px;
}

/* Canvas Background */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-color: var(--bg-color);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(2,6,23,0.85) 100%);
    pointer-events: none;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Scroll Content */
.scroll-content {
    position: relative;
    z-index: 10;
}

.step {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 8vw;
    width: 100%;
}

.step.hero {
    min-height: 100vh;
    align-items: center;
    position: relative;
}

.step.right { justify-content: flex-end; text-align: right; }
.step.left { justify-content: flex-start; text-align: left; }
.step.center { justify-content: center; text-align: center; }

.step.empty { min-height: 100vh; }

/* Modern Typography & Layout */
/* Ultimate Comic Book Layout */
.content-block {
    max-width: 800px;
    padding: 3rem;
    background-color: #fff;
    border: 8px solid #000;
    border-radius: 2px 15px 3px 15px / 15px 2px 15px 3px;
    box-shadow: 16px 16px 0px 0px #000;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    overflow: hidden;
}

/* Halftone dot overlay */
.content-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(#000 15%, transparent 16%), radial-gradient(#000 15%, transparent 16%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.content-block h1, .content-block p, .content-block .subtitle {
    position: relative;
    z-index: 1;
}

.content-block:hover {
    transform: translate(-6px, -6px) scale(1.03) rotate(-1deg);
    box-shadow: 24px 24px 0px 0px #000;
}

/* High-contrast comic colors (Cyberpunk Neon) */
.step.left .content-block { background-color: #00e5ff; transform: rotate(-2deg); } /* Neon Cyan */
.step.right .content-block { background-color: #4338ca; transform: rotate(1deg); color: #fff; } /* Deep Indigo */
.step.center .content-block { background-color: #0f172a; color: #fff; } /* Slate Black */
.step.hero .content-block { background-color: #4338ca; color: #fff; } /* Deep Indigo */

.step.center .content-block p,
.step.right .content-block p,
.step.hero .content-block p {
    color: #fff;
}

.subtitle {
    display: inline-block;
    background: #000;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: none;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
}

.step.center .subtitle,
.step.hero .subtitle {
    background: #fff;
    color: #000;
}

h1 {
    font-family: 'Bangers', system-ui;
    font-size: clamp(4.5rem, 9vw, 8rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    color: #fff;
    -webkit-text-stroke: 4px #000;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    filter: none;
}

/* Colorful 3D comic shadows (Cyberpunk Neon) */
.step.left .content-block h1 { text-shadow: 6px 6px 0px #4338ca, 12px 12px 0px #000; }
.step.right .content-block h1 { text-shadow: 6px 6px 0px #00e5ff, 12px 12px 0px #000; }
.step.center .content-block h1 { text-shadow: 6px 6px 0px #00e5ff, 12px 12px 0px #000; }
.step.hero .content-block h1 { text-shadow: 6px 6px 0px #00e5ff, 12px 12px 0px #000; }

/* Staggered Reveal Animation for H1 */
.reveal-text {
    opacity: 0;
    transform: translateY(100px);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

p {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    color: #000;
    max-width: 600px;
    text-shadow: none;
    opacity: 1;
}
.step.right p { margin-left: auto; text-align: right; }
.step.center p { margin: 0 auto; text-align: center; }

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Active state triggered by JS */
.step.active .reveal-text {
    opacity: 1;
    transform: translateY(0);
}
.step.active .fade-up {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Indicator as Speech Bubble */
.scroll-indicator {
    position: absolute;
    bottom: -15vh;
    left: 4vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border: 6px solid #000;
    padding: 1.5rem 2rem;
    box-shadow: 10px 10px 0px #000;
    border-radius: 50% 50% 50% 5px / 50% 50% 50% 5px;
    transform: rotate(-4deg);
    gap: 0;
    backdrop-filter: none;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 25px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 25px solid #fff;
    z-index: 2;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    bottom: -32px;
    left: 17px;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 32px solid #000;
    z-index: 1;
}

.scroll-text {
    font-family: 'Bangers', system-ui;
    font-size: 2rem;
    color: #000;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-line {
    display: none;
}

/* Header UI */
.comic-header {
    position: fixed;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.comic-header .logo {
    font-family: 'Bangers', system-ui;
    font-size: 4rem;
    color: #00e5ff;
    -webkit-text-stroke: 3px #000;
    text-shadow: 6px 6px 0px #000, 10px 10px 0px #4338ca;
    transform: rotate(-3deg);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    filter: none;
    letter-spacing: 0.02em;
}

.comic-header .header-controls {
    display: flex;
    gap: 1rem;
    pointer-events: auto;
}

.comic-header .issue {
    background-color: #4338ca;
    color: #fff;
    border: 5px solid #000;
    padding: 0.5rem 1.5rem;
    font-family: 'Bangers', system-ui;
    font-size: 2.5rem;
    font-weight: 400;
    box-shadow: 8px 8px 0px #000;
    transform: rotate(4deg);
    -webkit-text-stroke: 1px #000;
    letter-spacing: 0.05em;
    border-radius: 0;
    backdrop-filter: none;
}

.comic-header .btn-sound {
    cursor: none; /* Keep custom cursor */
    transition: transform 0.1s, background-color 0.2s;
}

.comic-header .btn-sound:hover {
    transform: scale(1.05) rotate(-2deg);
    background-color: #0f172a;
}

.comic-header .btn-sound.playing {
    background-color: #00e5ff;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .comic-header {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .comic-header .logo { 
        font-size: 2.5rem; 
        -webkit-text-stroke: 2px #000; 
        text-shadow: 3px 3px 0px #000, 6px 6px 0px #4338ca; 
    }
    .comic-header .issue { 
        font-size: 1.5rem; 
        padding: 0.25rem 0.75rem; 
        border-width: 3px;
        box-shadow: 4px 4px 0px #000;
    }

    .step { 
        padding: 0 5vw; 
        min-height: 100vh; 
        padding-top: 150px; 
        padding-bottom: 40px;
    }
    
    .content-block { 
        padding: 1.5rem; 
        border-width: 4px;
        box-shadow: 8px 8px 0px #000;
        width: 100%;
        border-radius: 2px 10px 3px 10px / 10px 2px 10px 3px;
    }
    
    /* Ensure the background colors persist on mobile */
    .step.left .content-block { background-color: #00e5ff; }
    .step.right .content-block { background-color: #4338ca; color: #fff; }
    .step.center .content-block { background-color: #0f172a; color: #fff; }
    .step.hero .content-block { background-color: #4338ca; color: #fff; }
    
    .step.right .content-block p,
    .step.center .content-block p,
    .step.hero .content-block p {
        color: #fff;
    }

    h1 { 
        font-size: 3.5rem; 
        -webkit-text-stroke: 2px #000;
        margin-bottom: 1rem;
    }
    
    .step.left .content-block h1 { text-shadow: 3px 3px 0px #4338ca, 6px 6px 0px #000; }
    .step.right .content-block h1 { text-shadow: 3px 3px 0px #00e5ff, 6px 6px 0px #000; }
    .step.center .content-block h1 { text-shadow: 3px 3px 0px #00e5ff, 6px 6px 0px #000; }
    .step.hero .content-block h1 { text-shadow: 3px 3px 0px #00e5ff, 6px 6px 0px #000; }
    
    p {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
        padding: 0.2rem 0.6rem;
    }

    .scroll-indicator {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 2rem;
        transform: rotate(0deg);
        padding: 1rem 1.5rem;
        border-width: 4px;
        box-shadow: 6px 6px 0px #000;
        border-radius: 50% 50% 50% 5px / 50% 50% 50% 5px;
    }

    .progress-container { display: none; }
    * { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
}
