:root {
    --bg: #050507;
    --fg: #f5f5f7;
    --muted: #9a9aa1;
    --accent: #ffffff;
    --warning: #b5b5b5;
    --neural-core: #40b0ff;
    --neural-trail: #a0d8ff;
    --neural-dark: #050811;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    width: 100vw;
    height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 20% 10%, #0c0c12 0%, var(--bg) 55%) !important;
    color: var(--fg);
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* NEURAL NETWORK CANVAS */
#neuralNet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    display: block;
}

/* PRELOADER (STARTS INVISIBLE) */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


#glitchLogo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(260px, 45vw, 500px);
    height: auto;
    max-height: 65vh;
    max-width: 90vw;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* MOBILE/WEBKIT TRANSPARENCY */
    background: transparent !important;
    background-color: transparent !important;
    isolation: isolate;
    contain: paint;
    mix-blend-mode: lighten;
    
    z-index: 20;
    transition: opacity 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
    will-change: opacity;
}

.entry-wrapper {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto auto;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 1.5rem) clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 10;
    transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}

.hero { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 100%;
    pointer-events: none;
}

.dissolve {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.dissolve.show { opacity: 1; }

.warning {
    max-width: 600px;
    margin: clamp(1rem, 4vw, 2.5rem) auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
}
.warning strong {
    display: block;
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    letter-spacing: 0.15em;
    color: var(--warning);
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.warning p {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    line-height: 1.6;
    color: var(--muted);
}

.enter {
    display: flex;
    justify-content: center;
    margin-top: clamp(1rem, 3vw, 2rem);
    padding-bottom: 2rem;
}
.enter button {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(255,255,255,0.4);
    padding: clamp(0.85rem, 3vw, 1rem) clamp(2.5rem, 8vw, 3rem);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    letter-spacing: 0.25em;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
}

/* DESKTOP HOVER */
@media (hover: hover) {
    .enter button:hover {
        background: #ffffff;
        color: #000000 !important;
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(255,255,255,0.4);
        border-color: #ffffff;
    }
}

/* MOBILE ACTIVE */
.enter button:active {
    background: #ffffff;
    color: #000000 !important;
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 8px 25px rgba(255,255,255,0.5);
    border-color: #ffffff;
}

.home-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
    background: radial-gradient(circle at 20% 10%, #0c0c12 0%, var(--bg) 55%);
    padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 2rem);
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-page.fade-in {
    opacity: 1;
    visibility: visible;
}
.home-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.home-content h1 {
    font-size: clamp(2.5rem, 9vw, 6rem);
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
    letter-spacing: 0.05em;
    font-weight: 200;
    line-height: 0.95;
    color: var(--fg);
}
.home-content p {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    color: var(--fg);
}

@media (max-width: 480px) {
    #glitchLogo { width: clamp(240px, 42vw, 280px); }
    .enter button { letter-spacing: 0.2em; padding: 1rem 2rem; }
}
