html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body.overflow-hidden {
    overflow: hidden !important;
}

/* --- Global Polish --- */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a0b2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c026d3, #7c3aed);
    border-radius: 5px;
    border: 2px solid #1a0b2e;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #db2777, #9333ea);
}

/* Selection Stying */
::selection {
    background: rgba(192, 38, 211, 0.3);
    color: #fff;
    text-shadow: 0 0 10px rgba(192, 38, 211, 0.5);
}

/* Enhanced Glassmorphism & Hover */
.glass-card {
    /* Helper class if needed, or matched by existing structures */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Noise Animation */
@keyframes noise {

    0%,
    100% {
        background-position: 0 0;
    }

    10% {
        background-position: -5% -10%;
    }

    20% {
        background-position: -15% 5%;
    }

    30% {
        background-position: 7% -25%;
    }

    40% {
        background-position: 20% 25%;
    }

    50% {
        background-position: -25% 10%;
    }

    60% {
        background-position: 15% 5%;
    }

    70% {
        background-position: 0% 15%;
    }

    80% {
        background-position: 25% 35%;
    }

    90% {
        background-position: -10% 10%;
    }
}

.animate-noise {
    animation: noise 8s steps(10) infinite;
}

/* --- Advanced Redesign Animations --- */

/* Marquee (Infinite Scroll) */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee-reverse {
    animation: marquee 30s linear infinite reverse;
}

/* Mesh Gradient */
@keyframes mesh {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-mesh {
    background-size: 200% 200%;
    animation: mesh 8s ease infinite;
}

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Scanner Animation */
@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scan {
    animation: scan 3s linear infinite;
    background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.5), transparent);
}

/* Bento Grid Hover */
.bento-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    transform: scale(0.98);
}

/* --- Animations --- */

/* Floating Animation */
@keyframes float-up-down {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes float-rotate {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(15px) rotate(10deg);
    }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) rotate(12deg);
    }

    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

.animate-float {
    animation: float-up-down 4s ease-in-out infinite;
}

.animate-float-rotate {
    animation: float-rotate 5s ease-in-out infinite;
}

/* Entry Animations */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Button Hover Glow & Shine */
.glow-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glow-hover:hover {
    box-shadow: 0 0 25px rgba(192, 38, 211, 0.5);
    transform: scale(1.05);
}

.glow-hover:active {
    transform: scale(0.98);
}

/* Shine Effect */
.glow-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transform: skewX(-20deg);
    transition: none;
}

.glow-hover:hover::after {
    animation: shine 0.75s ease-in-out;
}

@keyframes shine {
    100% {
        left: 200%;
    }
}

/* Capsule Scrolled State */
.capsule-scrolled {
    background-color: rgba(30, 27, 75, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --- Magic Cursor --- */
@media (min-width: 1024px) {
    body {
        cursor: none;
    }

    .magic-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 12px;
        height: 12px;
        background: white;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        mix-blend-mode: difference;
        transition: transform 0.2s ease, opacity 0.2s;
        transform: translate(-50%, -50%);
    }

    .magic-cursor-follower {
        position: fixed;
        top: 0;
        left: 0;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
        transform: translate(-50%, -50%);
    }

    .magic-cursor.hovered {
        opacity: 0;
    }

    .magic-cursor-follower.hovered {
        width: 80px;
        height: 80px;
        background-color: rgba(255, 255, 255, 0.1);
        border-color: transparent;
        mix-blend-mode: difference;
    }
}

/* --- Mobile Fixes --- */
/* Fix for About Us section visibility on mobile */
@media (max-width: 768px) {
    .about-section-mobile-fix {
        padding-top: 6rem !important;
    }
}