/* ==========================================================================
   QUANTUM PRECISION: VANGUARD TECH v.2026
   SecureDatalytics Senior Lead UI/UX System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Precision Palette */
    --qp-midnight: #0A0C10;
    --qp-slate: #161B22;
    --qp-aura: #3B82F6;
    --qp-silver: #E2E8F0;
    --qp-glass-rgb: 255, 255, 255;
    --qp-border: rgba(255, 255, 255, 0.08);
    --qp-border-active: rgba(59, 130, 246, 0.4);

    /* Typonomy */
    --font-main: 'Inter', sans-serif;

    /* Precision Tokens */
    --radius-max: 12px;
    --radius-sm: 8px;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --glow-aura: 0 0 40px rgba(59, 130, 246, 0.15);
}

body {
    background-color: var(--qp-midnight);
    color: var(--qp-silver);
    font-family: var(--font-main);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Impact: Mature & Serious */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #FFFFFF;
}

h1 {
    font-size: 5.5rem;
}

h2 {
    font-size: 3.8rem;
}

.subheading {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--qp-aura);
    display: block;
    margin-bottom: 1.5rem;
}

/* Layered Refraction Card */
.quantum-card {
    background: rgba(22, 27, 34, 0.7);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid var(--qp-border);
    border-radius: var(--radius-max);
    padding: 3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quantum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.quantum-card:hover {
    transform: translateY(-8px);
    border-color: var(--qp-border-active);
    box-shadow: var(--glow-aura);
    background: rgba(22, 27, 34, 0.85);
}

/* Precision Navigation */
.nav-quantum {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--qp-border);
    padding: 1.2rem 0;
}

.nav-link-qp {
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-link-qp:hover {
    color: var(--qp-aura);
}

/* Buttons Cinematic */
.btn-precision {
    background: #FFFFFF;
    color: var(--qp-midnight);
    font-weight: 700;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-precision:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    color: var(--qp-midnight);
}

.btn-outline-qp {
    background: transparent;
    color: white;
    border: 1px solid var(--qp-border);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-outline-qp:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: white;
    color: white;
}

/* Video Showcase Frame */
.video-frame-qp {
    border-radius: var(--radius-max);
    border: 1px solid var(--qp-border);
    overflow: hidden;
    position: relative;
    background: #000;
    transition: var(--transition);
}

.video-frame-qp:hover {
    border-color: var(--qp-aura);
}

/* Grid Layouts */
.grid-standard {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

.col-span-4 {
    grid-column: span 4;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-8 {
    grid-column: span 8;
}

.col-span-12 {
    grid-column: span 12;
}

@media (max-width: 992px) {

    .col-span-4,
    .col-span-6,
    .col-span-8 {
        grid-column: span 12;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .quantum-card {
        padding: 2rem;
    }

    .grid-standard {
        gap: 1.5rem;
    }

    /* REORDER CONTACT: Form First on Mobile */
    .contact-form-col {
        order: -1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.4rem;
        /* Reduced from 2.8rem */
    }

    .display-3 {
        font-size: 2.0rem;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    .display-5 {
        font-size: 1.6rem;
    }

    .btn-precision,
    .btn-outline-qp {
        padding: 0.8rem 1.5rem;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
        /* Drastically reduced from 2.2rem */
        line-height: 1.3;
        word-break: break-word;
        /* Safety for long words */
    }

    .subheading {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .lead {
        font-size: 1rem !important;
    }

    .d-flex.gap-4 {
        gap: 1rem !important;
        flex-direction: column;
        /* Stack buttons on very small screens */
        width: 100%;
    }

    /* Disable custom cursor on mobile for performance */
    .quantum-cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ===================== PHASE 1 UPGRADES ===================== */

/* 1. ATMOSPHERIC MESH GRADIENT (Replaces static aura) */
.aura-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: var(--qp-midnight);
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    filter: blur(80px);
    opacity: 0.8;
    animation: auroraDrift 20s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* 2. FILM GRAIN TEXTURE */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    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)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.07;
}

/* 3. QUANTUM CURSOR */
.quantum-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 0.1s;
}

.cursor-follower {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(0, 0);
    /* Adjusted in JS */
    transition: transform 0.15s, background 0.3s;
    mix-blend-mode: difference;
}

.cursor-follower.active {
    transform: scale(1.8);
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* 4. KINETIC TYPOGRAPHY (REVEAL) */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    background-image: linear-gradient(to right, #fff, #fff);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-text.in-view {
    opacity: 1;
    transform: translateY(0);
}

.fade-up-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up-stagger.in-view>*:nth-child(1) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.fade-up-stagger.in-view>*:nth-child(2) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateY(0);
}

.fade-up-stagger.in-view>*:nth-child(3) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.fade-up-stagger.in-view>*:nth-child(4) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

/* Background Atmospheric */
.aura-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 20% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
}

/* Stat Pill */
.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .val {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFF;
}

.stat-item .lab {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 30px;
    bottom: 30px;
    z-index: 996;
    background: rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--qp-border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.back-to-top i {
    font-size: 24px;
    line-height: 0;
}

.back-to-top:hover {
    background: var(--qp-aura);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--glow-aura);
    border-color: white;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/* Neural Icon Animations - Enhanced Dynamic Light System */

/* Core Pulse Animation */
@keyframes corePulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.15);
    }
}

/* Neural Nodes Shimmer */
@keyframes nodeShimmer {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Rotating Light Ray (Radar Sweep) */
@keyframes raySweep {
    0% {
        transform: rotate(0deg);
        opacity: 0.7;
    }

    100% {
        transform: rotate(360deg);
        opacity: 0.7;
    }
}

/* Radial Burst (Pulsing from Center) */
@keyframes radialPulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Shimmer Highlight Flash */
@keyframes shimmerFlash {

    0%,
    90%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }

    95% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

/* Apply Animations to SVG Elements */
.nav-quantum img,
.back-to-top img {
    display: block;
}

/* Core glow pulse */
:global(.ai-core-glow) {
    animation: corePulse 3s ease-in-out infinite;
}

/* Neural nodes shimmer */
:global(.neural-nodes) {
    animation: nodeShimmer 2s ease-in-out infinite;
}


/* ===================== PHASE 2 UPGRADES ===================== */

/* 5. HOLOGRAPHIC GLASSMORPHISM (Enhanced Cards) */
.quantum-card {
    position: relative;
    background: rgba(22, 27, 34, 0.6);
    /* Slightly more transparent */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s, border-color 0.4s;
    /* Magnetic transition is handled via JS transform, so we separate them if needed, 
       but standard transition helps smoothing return to 0,0 */
}

.quantum-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Full cover */
    border-radius: var(--radius-max);
    padding: 1px;
    /* Border width */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s;
}

.quantum-card:hover::before {
    background: linear-gradient(135deg, var(--qp-aura), rgba(124, 58, 237, 0.5));
}

.quantum-card:hover {
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.2);
    /* Transform handled by magnetic JS, but we can add scale here if we want consistent scale */
}

/* 6. MAGNETIC & GLOW BUTTONS */
.btn-precision,
.btn-outline-qp,
.nav-link-qp {
    transition: transform 0.1s linear, background 0.3s, color 0.3s, box-shadow 0.3s;
    /* Fast transform for magnetic feel */
}

/* Neon glow on active state */
.btn-precision:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 60px rgba(59, 130, 246, 0.2);
}

/* Stat numbers font */
.stat-item .val {
    font-variant-numeric: tabular-nums;
    /* Prevents jitter when counting */
}

/* Radial burst pulse */
:global(.radial-burst) {
    animation: radialPulse 4s ease-in-out infinite;
}

/* Shimmer highlight flash */
:global(.shimmer-highlight) {
    animation: shimmerFlash 8s ease-in-out infinite;
}

/* ========== CREATIVE LIGHTNING SHINE SYSTEM ========== */

.logo-lightning-container {
    position: relative;
    display: inline-block;
    margin-right: 0.5rem;
    overflow: hidden;
    border-radius: 4px;
}

.logo-lightning-container img {
    display: block;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
    animation: logoGlow 3s ease-in-out infinite;
}

/* Sweeping Diagonal Shine Effect */
.logo-lightning-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(96, 165, 250, 0.3) 45%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(96, 165, 250, 0.3) 55%,
            transparent 70%);
    z-index: 3;
    pointer-events: none;
    animation: shineSweepContained 4s ease-in-out infinite;
}

/* Lightning Flash Overlay */
.logo-lightning-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.6) 0%, transparent 70%);
    z-index: 1;
    opacity: 0;
    animation: lightningFlash 6s ease-in-out infinite;
}

/* Keyframes for Logo Glow Pulse */
@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(96, 165, 250, 1)) brightness(1.2);
    }
}

/* Keyframes for Diagonal Shine Sweep (Contained) */
@keyframes shineSweepContained {
    0% {
        transform: translateX(-150%) translateY(-150%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    30% {
        transform: translateX(150%) translateY(150%);
        opacity: 1;
    }

    31%,
    100% {
        opacity: 0;
        transform: translateX(150%) translateY(150%);
    }
}

/* Keyframes for Lightning Flash */
@keyframes lightningFlash {

    0%,
    45%,
    55%,
    100% {
        opacity: 0;
    }

    48%,
    52% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}