/* --- GLOBAL VARIABLES --- */
:root {
    --cursor-size: 20px;
    --color-accent: #2563eb; /* Tailwind blue-600 */
    --color-bg-dark: #050505;
    --color-bg-light: #1a1a1a;
}

/* --- LENIS SMOOTH SCROLL --- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { oversize-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* --- BASE STYLES --- */
body {
    font-family: 'Satoshi', sans-serif;
    cursor: none; /* Hide default cursor for custom one */
    background-color: var(--color-bg-dark);
    background-image: radial-gradient(circle at 50% 50%, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
    color: white;
}

/* Custom selection color for brand consistency */
::selection {
    background: var(--color-accent);
    color: white;
}

/* --- CINEMATIC GRAIN OVERLAY ---
   Using an SVG data URI for better performance and no external HTTP dependencies.
*/
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    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");
}

/* --- CUSTOM CURSOR --- */
#cursor {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    pointer-events: none;
    will-change: transform;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: var(--cursor-size);
    height: var(--cursor-size);
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Hiding standard scrollbar but keeping functionality */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
scrollbar-width: none; /* Firefox */

/* --- ANIMATION UTILITIES --- */
.reveal-text {
    opacity: 0;
    transform: translateY(100%);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.is-visible {
    opacity: 1;
    transform: translateY(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* --- LAYOUT LAYERS --- */
canvas#webgl {
    position: fixed;
    top: 0; left: 0;
    outline: none;
    z-index: 0;
    pointer-events: none; /* Allows click-through to DOM */
}

main {
    position: relative;
    z-index: 1;
}

/* --- LOADER --- */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--color-bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#progress {
    font-size: 10vw;
    font-weight: 900;
    color: #333;
    font-variant-numeric: tabular-nums; /* Prevents jitter as numbers change */
}