/* assets/css/main.css - Premium Global Styles */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f59e0b;

    /* Default (Dark Mode) Tokens */
    --bg-body: #050608;
    --bg-section-alt: #0a0c10;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.08);
    --border-main: rgba(255, 255, 255, 0.05);

    /* Premium Accent Tokens */
    --premium-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --mesh-color-1: rgba(102, 126, 234, 0.25);
    --mesh-color-2: rgba(118, 75, 162, 0.25);
    --noir-bg: #050608;
    --noir-card: rgba(255, 255, 255, 0.03);
    --noir-border: rgba(255, 255, 255, 0.08);
}

/* Noir Context Utility */
.bg-noir {
    background-color: var(--noir-bg) !important;
    color: white !important;
}

.bg-noir .text-main {
    color: #ffffff !important;
}

.bg-noir .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.bg-noir .bento-item {
    background: var(--noir-card);
    border-color: var(--noir-border);
}

/* Transparent Header Support */
.nav-glass {
    background: rgba(5, 6, 8, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.nav-glass .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav-glass .nav-link:hover,
.nav-glass .nav-link.active {
    color: white !important;
}

/* Noir Context Utility */
.bg-noir {
    background-color: var(--noir-bg) !important;
    color: white !important;
}

.bg-noir .text-main {
    color: #ffffff !important;
}

.bg-noir .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.bg-noir .bento-item {
    background: var(--noir-card);
    border-color: var(--noir-border);
}

/* Light Mode Overrides */
.light {
    --bg-body: #f8fafc;
    --bg-section-alt: #eef2f7;
    --text-main: #0f172a;
    --text-muted: #475569;
    /* Improved contrast for light mode readability */
    --glass-bg: rgba(255, 255, 255, 0.8);
    /* Increased opacity for light mode */
    --glass-border: rgba(0, 0, 0, 0.08);
    --card-hover: rgba(0, 0, 0, 0.04);
    --border-main: rgba(0, 0, 0, 0.1);
}

.bg-body {
    background-color: var(--bg-body);
}

.bg-section-alt {
    background-color: var(--bg-section-alt);
}

.text-main {
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted);
}

/* Footer & CTA Section - Always Dark Mode */
footer,
.section-cta {
    background: #050608 !important;
    color: white !important;
}

footer *:not(a):not(span):not(i) {
    color: inherit;
}

/* Ensure footer stays dark in light mode as well */
.light footer,
.light .section-cta {
    background: #050608 !important;
    color: white !important;
}

.light footer .text-gray-400,
.light footer .text-gray-500,
.light footer .text-gray-600 {
    color: rgb(156 163 175) !important;
}

.light footer .text-white {
    color: white !important;
}

.light .section-cta .text-gray-300,
.light .section-cta .text-white {
    color: inherit !important;
}

/* CTA Blob Animation - GPU Optimized */
.cta-blob {
    animation: cta-blob-float 12s infinite alternate ease-in-out;
    will-change: transform;
}

@keyframes cta-blob-float {
    0% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(20px, -30px) scale(1.05);
        opacity: 0.2;
    }
    100% {
        transform: translate(-10px, 15px) scale(0.98);
        opacity: 0.15;
    }
}

/* Disable heavy animations on mobile for performance */
@media (max-width: 768px) {
    .cta-blob,
    .animate-blob {
        animation: none !important;
        opacity: 0.1;
    }
}


body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Premium Typography */
.text-display-2xl {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.text-gradient {
    background: linear-gradient(to right, #ffffff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mesh Gradient Background */
.mesh-bg {
    position: relative;
    background-color: var(--bg-body);
    overflow: hidden;
}

.mesh-bg::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 70% 30%, var(--mesh-color-1) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, var(--mesh-color-2) 0%, transparent 50%);
    animation: mesh-float 20s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes mesh-float {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.bento-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2.5rem;
    padding: 3rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bento-item:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.bento-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bento-item:hover::after {
    opacity: 1;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 35s linear infinite;
}

.hover\:pause-marquee:hover {
    animation-play-state: paused;
}

.animate-marquee-fast {
    animation: marquee 15s linear infinite;
}

/* Glassmorphism Presets */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
}

/* Typography Helpers */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, var(--primary), var(--secondary));
}

.text-shadow-glow {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.light .text-shadow-glow {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.1);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* Modern Pulse for Interactive Elements */
.glow-pulse {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* [3D Perspective & Advanced Animations] */
.perspective-2000 {
    perspective: 2000px;
}

.perspective-1000 {
    perspective: 1000px;
}

.phone-mockup {
    transform-style: preserve-3d;
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow infinite ease-in-out;
}

/* Specific Parallax for Floating Elements */
.floating-element {
    transition: transform 0.1s ease-out;
}

/* Footer & CTA Specific Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite alternate ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes gradient-x {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 5s linear infinite;
}

/* Magnetic Link Underline Animation */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 50%;
    background: var(--primary);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateX(-50%);
}

.link-underline:hover::after {
    width: 100%;
}