@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Inter:wght@200;300;400;600&display=swap');

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

body, html {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 16% 76%, rgba(255, 64, 174, 0.13), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(128, 85, 255, 0.12), transparent 24%),
        radial-gradient(circle at 54% 48%, rgba(255, 255, 255, 0.05), transparent 36%),
        linear-gradient(180deg, #0a0410 0%, #05030a 45%, #020205 100%);
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    position: relative;
}

/* 5 pages worth of scroll proxy for the 3D scene */
.scroll-proxy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400vh;
    z-index: 1; /* Above canvas, below UI */
}

/* Premium Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
    opacity: 0.03;
    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");
}

.ambient-wash {
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 1;
    filter: blur(76px);
    opacity: 0.88;
}

.ambient-wash-left {
    left: -8vw;
    bottom: -14vh;
    width: 40vw;
    height: 40vw;
    max-width: 540px;
    max-height: 540px;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 44, 163, 0.22) 0%, rgba(255, 44, 163, 0.09) 34%, rgba(255, 44, 163, 0) 72%);
}

.ambient-wash-right {
    right: -10vw;
    top: -12vh;
    width: 34vw;
    height: 34vw;
    max-width: 480px;
    max-height: 480px;
    background:
        radial-gradient(circle at 50% 50%, rgba(118, 84, 255, 0.2) 0%, rgba(118, 84, 255, 0.08) 32%, rgba(118, 84, 255, 0) 76%);
}

/* Vignette for Cinematic Depth */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle at center, transparent 28%, rgba(4, 3, 8, 0.76) 100%);
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Audio Control - High-end Glassmorphism */
.audio-control {
    position: fixed;
    top: 32px;
    right: 50px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.visualizer-hint {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    .ambient-wash-left {
        width: 58vw;
        height: 58vw;
        left: -18vw;
        bottom: -8vh;
        opacity: 0.72;
    }

    .ambient-wash-right {
        width: 42vw;
        height: 42vw;
        right: -14vw;
        top: -6vh;
    }

    .audio-control {
        right: 24px;
        top: 24px;
    }
}

@media (max-width: 640px) {
    .audio-control {
        right: 16px;
        top: calc(16px + env(safe-area-inset-top, 0px));
    }

    .noise-overlay {
        opacity: 0.03;
    }

    .vignette {
        background: radial-gradient(circle at center, transparent 22%, rgba(6, 7, 12, 0.88) 100%);
    }

    .ambient-wash-left {
        width: 74vw;
        height: 74vw;
        left: -24vw;
        bottom: -12vh;
        opacity: 0.78;
    }

    .ambient-wash-right {
        width: 52vw;
        height: 52vw;
        right: -20vw;
        top: -10vh;
    }
}
