/* --- IMPORTS & VARIABLES --- */
:root {
    --bg-dark: #050a14;
    --primary: #2dd4bf; /* Teal 400 */
    --secondary: #a855f7; /* Purple 500 */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* --- UNIFIED SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: #e2e8f0;
    overflow-x: hidden;
    cursor: none; /* Custom cursor override */
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

/* --- NOISE BACKGROUND --- */
#noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    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)' opacity='1'/%3E%3C/svg%3E");
}

/* --- FOOTER GRID BACKGROUND --- */
.footer-grid-bg {
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(circle at center top, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center top, black, transparent 80%);
}

/* --- CYBER RETICLE CURSOR --- */
#cursor {
    width: 10px;
    height: 10px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    /* Diamond Shape */
    transform: translate(-50%, -50%) rotate(45deg);
    transition: transform 0.2s, background-color 0.2s;
}

#cursor-follower {
    width: 50px;
    height: 50px;
    border: 1px dashed rgba(45, 212, 191, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    pointer-events: none;
    transform: translate(-50%, -50%);
    /* Default Spin Animation */
    animation: cursorSpin 5s linear infinite;
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background-color 0.3s, border-color 0.3s;
}

@keyframes cursorSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hover State (Lock On) */
body.hovering #cursor-follower {
    width: 70px;
    height: 70px;
    border-color: var(--secondary); /* Turn Purple */
    border-style: solid; /* Solid Lock Ring */
    border-width: 2px;
    background-color: rgba(168, 85, 247, 0.05);
    animation: none; /* Stop spinning to focus */
    transform: translate(-50%, -50%) rotate(0deg);
}

body.hovering #cursor {
    background: var(--secondary);
    box-shadow: 0 0 15px var(--secondary);
    transform: translate(-50%, -50%) rotate(0deg) scale(0.5); /* Shrink dot */
}

/* Click State (Snap) */
body.clicking #cursor-follower {
    width: 30px;
    height: 30px;
    background-color: rgba(45, 212, 191, 0.2);
    border-width: 2px;
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (hover: none) {
    #cursor, #cursor-follower {
        display: none;
    }
    body {
        cursor: auto;
    }
    a, button, .faq-btn {
        cursor: pointer;
    }
}

/* --- COOKIE BANNER VISIBILITY --- */
#cookie-banner.show {
    transform: translateY(0);
}

/* --- PRELOADER --- */
#preloader {
    background-color: #000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader-content {
    text-align: center;
}
.code-loader {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    color: var(--primary);
    animation: blink 1s infinite;
}
.loader-line {
    width: 0%;
    height: 2px;
    background: var(--secondary);
    margin-top: 10px;
    animation: loadLine 1.5s ease-out forwards;
}
@keyframes loadLine {
    to { width: 100%; }
}
@keyframes blink {
    50% { opacity: 0.5; }
}

/* --- TYPOGRAPHY & GLITCH --- */
.glitch-wrapper {
    position: relative;
}
.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(12px, 9999px, 81px, 0); }
    5% { clip: rect(34px, 9999px, 15px, 0); }
    10% { clip: rect(6px, 9999px, 86px, 0); }
    100% { clip: rect(1px, 9999px, 1px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(82px, 9999px, 21px, 0); }
    5% { clip: rect(2px, 9999px, 5px, 0); }
    10% { clip: rect(54px, 9999px, 32px, 0); }
    100% { clip: rect(1px, 9999px, 1px, 0); }
}

/* --- HOLOGRAPHIC CARDS --- */
.holo-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d; /* Critical for inner 3D effects */
    transform: perspective(1000px);
}
.holo-glass-card:hover {
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.3);
}

/* --- UTILS --- */
.animate-pulse-slow {
    animation: pulse 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* --- NAVBAR --- */
.glass-nav {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
}
.nav-link {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}
.nav-link:hover {
    color: #fff;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}
.nav-link:hover::after {
    width: 100%;
}

/* --- 3D PERSPECTIVE HELPERS --- */
.transform-style-3d {
    transform-style: preserve-3d;
}
.perspective-container {
    perspective: 1000px;
}

/* --- NEW 3D TEXT & IMAGE EFFECTS --- */

/* Deep 3D Text Shadow */
.text-3d-layered {
    text-shadow: 
        0 1px 0 #0d9488,
        0 2px 0 #0f766e,
        0 3px 0 #0f172a,
        0 4px 0 #0f172a,
        0 5px 0 #0f172a,
        0 6px 1px rgba(0,0,0,.1),
        0 0 5px rgba(0,0,0,.1),
        0 1px 3px rgba(0,0,0,.3),
        0 3px 5px rgba(0,0,0,.2),
        0 5px 10px rgba(0,0,0,.25),
        0 10px 10px rgba(0,0,0,.2),
        0 20px 20px rgba(0,0,0,.15);
    transform: translateZ(60px); /* Pushes text forward */
    transition: transform 0.3s;
}

/* Make images pop out of cards */
.img-3d-pop {
    transform: translateZ(40px);
    transition: transform 0.5s ease-out;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.holo-glass-card:hover .img-3d-pop {
    transform: translateZ(60px) scale(1.05); /* Extra pop on hover */
}

/* Make icons/text inside cards pop */
.content-3d-pop {
    transform: translateZ(30px);
}

/* --- MODAL STYLES --- */
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-overlay.open .modal-content {
    transform: scale(1);
}

/* Custom Scrollbar for Modals */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* --- FAQ ACCORDION STYLES --- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust if content is longer */
}
.faq-icon {
    transition: transform 0.3s ease;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
.faq-item:last-child {
    border-bottom: none;
}
