/* Magic CSS - Subtle effects for a premium feel */

:root {
    --accent-primary: #4F46E5;
    /* Indigo 600 */
    --accent-secondary: #4338ca;
    /* Indigo 700 */
    --surface-glass: rgba(255, 255, 255, 0.7);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8fafc;
    /* Slate 50 */
    color: #1e293b;
    /* Slate 800 */
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Hover Effects */
.magic-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.magic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(79, 70, 229, 0.15);
    /* Soft Indigo Glow */
    border-color: rgba(79, 70, 229, 0.2);
}

/* Button Glow */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-glow:hover::after {
    left: 100%;
    transition: 0.5s;
}

/* Text Gradient for emphasis */
@keyframes textShimmer {
    0% {
        background-position: 0% 50%;
    }

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

.text-gradient {
    /* Richer gradient with multiple stops for iridescent effect */
    background: linear-gradient(90deg,
            #4F46E5 0%,
            #8b5cf6 25%,
            #3B82F6 50%,
            #8b5cf6 75%,
            #4F46E5 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* Fallback */
    animation: textShimmer 4s linear infinite;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.animate-fade-in {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: opacity, transform;
}

.delay-100 {
    animation-delay: 0.35s;
}

.delay-200 {
    animation-delay: 0.65s;
}

.delay-300 {
    animation-delay: 0.95s;
}

@media (prefers-reduced-motion: reduce) {
    .animate-fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Animated hero glow */
@keyframes glowShimmer {
    0% {
        background-position: 0% 50%;
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        /* Subtle breathing */
    }

    100% {
        background-position: 200% 50%;
        transform: scale(1);
    }
}

.hero-glow {
    /* Identical gradient colors to text-gradient for consistency */
    background: linear-gradient(90deg,
            rgba(79, 70, 229, 0.45) 0%,
            /* Indigo */
            rgba(139, 92, 246, 0.55) 25%,
            /* Violet */
            rgba(59, 130, 246, 0.45) 50%,
            /* Blue */
            rgba(139, 92, 246, 0.55) 75%,
            /* Violet */
            rgba(79, 70, 229, 0.45) 100%
            /* Indigo */
        );
    background-size: 200% 200%;
    filter: blur(80px);
    /* Increased blur for softer, dreamy look */
    animation: glowShimmer 6s linear infinite;
    /* Slightly slower than text for background depth */
    pointer-events: none;
    will-change: transform, background-position;
    opacity: 0.8;
}

/* CTA ambient glow */
.cta-glow {
    background: linear-gradient(90deg,
            rgba(79, 70, 229, 0.2) 0%,
            rgba(139, 92, 246, 0.28) 30%,
            rgba(59, 130, 246, 0.22) 60%,
            rgba(139, 92, 246, 0.28) 80%,
            rgba(79, 70, 229, 0.2) 100%);
    background-size: 200% 200%;
    filter: blur(70px);
    animation: glowShimmer 10s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

.cta-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 35%, #22c55e 60%, #312E81 100%);
    background-size: 300% 300%;
    box-shadow: 0 20px 50px -20px rgba(79, 70, 229, 0.45), 0 10px 30px -15px rgba(59, 130, 246, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, background-position 0.3s ease;
    animation: ctaFlow 12s ease-in-out infinite;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(200px 200px at 30% 30%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(220px 220px at 70% 60%, rgba(34, 197, 94, 0.25), transparent 60%);
    opacity: 0.8;
    mix-blend-mode: screen;
    animation: ctaPulse 14s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 25px 55px -20px rgba(79, 70, 229, 0.55), 0 12px 35px -16px rgba(59, 130, 246, 0.4),
        0 0 40px -10px rgba(34, 197, 94, 0.35);
    filter: brightness(1.04);
    background-position: 100% 50%;
}

.cta-button:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: 3px;
}

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

@keyframes ctaPulse {
    0% {
        background-position: 0% 0%, 60% 60%, 20% 20%;
        opacity: 0.75;
    }
    50% {
        background-position: 60% 40%, 20% 80%, 80% 30%;
        opacity: 0.9;
    }
    100% {
        background-position: 0% 0%, 60% 60%, 20% 20%;
        opacity: 0.8;
    }
}

/* Back to Top - moved to Tailwind classes in base.html */
