@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles to supplement Tailwind */
@layer base {
    body {
        font-family: 'Inter', sans-serif;
        background-color: #111827;
        color: white;
    }
}

@layer utilities {
    .glass-header {
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        /* Apple usually has a very faint dark border in light mode */
    }

    .dark .glass-header {
        background: rgba(22, 22, 23, 0.8);
        /* Apple Dark Mode Base */
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .glass-menu {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    /* Hero Specific Styles */
    .font-clashGrotesk {
        font-family: 'Clash Grotesk', 'Outfit', sans-serif;
    }

    /* Buttons moved to inline classes in HTML for CDN compatibility */

    .jos {
        transition: all 0.5s ease-out;
    }
}

/* Animations */
.animate-mesh {
    background-size: 200% 200%;
    animation: mesh 10s ease infinite;
}

@keyframes mesh {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Mobile Menu Transitions */
/* Mobile Menu Transitions - Curtain Effect */
.mobile-menu-enter {
    transform: translateY(-100%);
    pointer-events: none;
    border-bottom-left-radius: 100%;
    border-bottom-right-radius: 100%;
}

.mobile-menu-enter-active {
    transform: translateY(0);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    pointer-events: auto;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.6s ease-out;
}

.mobile-menu-exit {
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-menu-exit-active {
    transform: translateY(-100%);
    border-bottom-left-radius: 100%;
    border-bottom-right-radius: 100%;
    pointer-events: none;
    transition: transform 0.5s ease-in, border-radius 0.4s ease-in;
}

/* Staggered Menu Item Animation */
@keyframes slideUpItem {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up-item {
    animation: slideUpItem 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating Icon Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Floating Icon Specific Delays */
.float-delay-1 {
    animation-delay: 0s;
}

.float-delay-2 {
    animation-delay: 1s;
}

.float-delay-3 {
    animation-delay: 2s;
}

.float-delay-4 {
    animation-delay: 3s;
}

.float-delay-5 {
    animation-delay: 4s;
}

/* Custom Background for Why Us */
.bg-brand-red {
    background-color: #E03730;
}

/* Infinite Marquee Animation */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 2rem;
    animation: marquee 25s linear infinite;
    width: max-content;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Glass Card for Slider */
.slider-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.slider-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* Initial States */
.slide-left {
    transform: translateX(-50px);
}

.slide-right {
    transform: translateX(50px);
}

.fade-up {
    transform: translateY(30px);
}

.zoom-in {
    transform: scale(0.8);
}



/* --- Holographic Glass / Modern Tech Styles --- */
.bg-modern-grid {
    background-image:
        radial-gradient(circle at 50% 50%, rgba(224, 55, 48, 0.08) 0%, transparent 50%),
        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: 100% 100%, 50px 50px, 50px 50px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(224, 55, 48, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(224, 55, 48, 0.15);
}

/* Glowing Fiber Optic Spine */
.fiber-optic-line {
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.fiber-optic-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #E03730, transparent);
    animation: flowDown 3s linear infinite;
}

@keyframes flowDown {
    0% {
        top: -150px;
    }

    100% {
        top: 100%;
    }
}

/* Modern Gradient Text */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
}

.text-gradient-red {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(135deg, #ff6b6b 0%, #E03730 100%);
}

/* Node Pulse */
.timeline-node {
    box-shadow: 0 0 0 0 rgba(224, 55, 48, 0.7);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(224, 55, 48, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(224, 55, 48, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(224, 55, 48, 0);
    }
}

/* --- Futuristic HUD Styles --- */
.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(224, 55, 48, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 55, 48, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hud-card {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(224, 55, 48, 0.2);
    box-shadow: 0 0 15px rgba(224, 55, 48, 0.05);
    position: relative;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 20px),
            calc(100% - 20px) 100%,
            0 100%);
    transition: all 0.3s ease;
}

.hud-card:hover {
    border-color: rgba(224, 55, 48, 0.6);
    box-shadow: 0 0 25px rgba(224, 55, 48, 0.15);
    transform: translateY(-5px);
}

/* Corner Accents */
.hud-corner-tl {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid #E03730;
    border-left: 2px solid #E03730;
    z-index: 10;
}

.hud-corner-br {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #E03730;
    border-right: 2px solid #E03730;
    z-index: 10;
}

.neon-text-glow {
    text-shadow: 0 0 8px rgba(224, 55, 48, 0.6);
}

.tech-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #E03730, transparent);
    width: 100%;
    opacity: 0.5;
}

/* Infinite Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    display: flex;
    width: max-content;
    animation: marquee 60s linear infinite;
}

.marquee-container:hover .animate-marquee {
    animation-play-state: paused;
}