/* Cross-Browser Text Rendering Consistency */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
    font-feature-settings: "kern" 1;
}

/* Ethereal Mesh Glows (Light Mode Optimized) */
.mesh-glow-wrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15; /* Soft and Airy for Light Mode */
    transition: opacity 0.5s ease, background 0.5s ease;
}

.glow-blue { background: #60a5fa; }
.glow-purple { background: #a78bfa; }
.glow-cyan { background: #22d3ee; }

/* Dark Mode Transitions: High Saturation */
.dark .glow-orb {
    opacity: 0.25;
}

.glow-orb-1 { top: -10%; right: -5%; }
.glow-orb-2 { bottom: -10%; left: -5%; }
.glow-orb-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Grid Overlay Utility */
.mesh-grid {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: linear-gradient(#000 1px, transparent 1px), linear-gradient(90deg, #000 1px, transparent 1px);
    background-size: 60px 60px;
}

.dark .mesh-grid {
    opacity: 0.02;
    background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
}
.ai-text-gradient {
    background: linear-gradient(to right, #00f2ff, #0060df, #bc00ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: gradient-move 5s linear infinite;
    display: inline-block;
    padding-bottom: 0.15em;
    line-height: 1.2;
    overflow: visible;
}

.ai-card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* Clean, premium hover effect */
.ai-card-hover:hover {
    transform: translateY(-4px);
    /* Soft, deep blue glow */
    box-shadow: 0 20px 40px -15px rgba(0, 96, 223, 0.2),
        0 0 0 1px rgba(0, 96, 223, 0.1);
    border-color: rgba(0, 96, 223, 0.5);
}

/* Dark mode adjustment */
.dark .ai-card-hover:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 242, 255, 0.1),
        0 0 0 1px rgba(0, 242, 255, 0.15);
    border-color: rgba(0, 242, 255, 0.4);
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Infinite Marquee Animation - Horizontal */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Infinite Marquee Animation - Vertical */
@keyframes marquee-vertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.animate-marquee-vertical {
    animation: marquee-vertical 40s linear infinite;
}

.animate-marquee-vertical:hover {
    animation-play-state: paused;
}

/* Glassmorphism Utilities */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    /* slate-800 with opacity */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Slow Spin Animation for Orbit */
@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes orbit-reverse-spin {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

.animate-orbit {
    animation: orbit-spin 60s linear infinite;
}

.animate-orbit-reverse {
    animation: orbit-reverse-spin 60s linear infinite;
}

/* Decorative Ring Animations */
.animate-spin-slow {
    animation: orbit-spin 60s linear infinite;
}

.animate-spin-medium-reverse {
    animation: orbit-reverse-spin 40s linear infinite;
}

/* Hover pause */
.group:hover .animate-orbit,
.group:hover .animate-orbit-reverse,
.group:hover .animate-spin-slow,
.group:hover .animate-spin-medium-reverse {
    animation-play-state: paused;
}

/* Responsive Orbit Radius */
.orbit-container {
    --orbit-radius: 130px;
}

@media (min-width: 640px) {
    .orbit-container {
        --orbit-radius: 180px;
    }
}