/* ==========================================================================
   BUFFALLOS USA SERVICE LAB — animation-clean & apex-creative Glassmorphism Engine
   ========================================================================== */

:root {
    --bg-canvas: #CBD5E1;
    --bg-main: #F1F5F9;
    --bg-card: #FFFFFF;
    
    --usa-blue: #1E40AF;
    --usa-blue-hover: #1D4ED8;
    --usa-red: #DC2626;
    
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-700: #334155;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Inter', sans-serif;

    --mouse-x: 50%;
    --mouse-y: 50%;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

.font-display {
    font-family: var(--font-display);
}

.font-mono {
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Efeito Sofisticado: Liquid Metallic Chrome Red (PERDENDO CLIENTES)
   -------------------------------------------------------------------------- */
@keyframes metallic-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.text-metallic-red {
    background: linear-gradient(
        120deg, 
        #991B1B 0%, 
        #DC2626 25%, 
        #FFE4E6 50%, 
        #EF4444 75%, 
        #991B1B 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: metallic-flow 9.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 10px rgba(220, 38, 38, 0.3));
    letter-spacing: -0.02em;
}

/* Continuous Pulsing Animation for ALERTA CRÍTICO Pill Badge */
@keyframes alert-badge-pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(220, 38, 38, 0.4), 0 0 20px rgba(220, 38, 38, 0.2);
        border-color: rgba(239, 68, 68, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 28px rgba(220, 38, 38, 0.85), 0 0 45px rgba(239, 68, 68, 0.5);
        border-color: rgba(220, 38, 38, 1);
        transform: scale(1.04);
        background-color: rgba(254, 226, 226, 0.95);
    }
}

.alert-badge-pulsing {
    animation: alert-badge-pulse 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Continuous Blue Aura Pulse for External Demo Button */
@keyframes open-demo-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.4), 0 0 25px rgba(30, 64, 175, 0.25);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 35px rgba(37, 99, 235, 0.85), 0 0 55px rgba(30, 64, 175, 0.6);
        transform: scale(1.04);
    }
}

.animate-open-demo-pulse {
    animation: open-demo-pulse 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Apex Creative Custom Cursor System (Liquid Magnetic Cursor)
   -------------------------------------------------------------------------- */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--usa-blue-hover);
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.8);
}

.cursor-ring {
    position: fixed;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(30, 64, 175, 0.6);
    border-radius: 50%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.hovering .cursor-ring {
    width: 62px;
    height: 62px;
    border-color: var(--usa-blue);
    background: rgba(30, 64, 175, 0.08);
}

@media (hover: none) {
    .cursor, .cursor-ring {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Apex Creative Rotating Orbit Badge ("Scroll to Explore")
   -------------------------------------------------------------------------- */
@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

.orbit-badge {
    position: absolute;
    right: 3rem;
    bottom: 2rem;
    width: 110px;
    height: 110px;
    z-index: 20;
    pointer-events: none;
}

.orbit-badge .ring {
    width: 100%;
    height: 100%;
    animation: orbitSpin 14s linear infinite;
}

/* --------------------------------------------------------------------------
   Flashlight Cursor Glow Effect & Glassmorphism (Exata do animation-clean)
   -------------------------------------------------------------------------- */
.flashlight-card {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.flashlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        500px circle at var(--mouse-x) var(--mouse-y),
        rgba(30, 64, 175, 0.08),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.flashlight-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(
        400px circle at var(--mouse-x) var(--mouse-y),
        rgba(30, 64, 175, 0.6),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.flashlight-card:hover::before,
.flashlight-card:hover .flashlight-border {
    opacity: 1;
}

.flashlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------------------
   Text Reveal & Hover Highlight Animation (animation-clean)
   -------------------------------------------------------------------------- */
.text-hover-glow {
    transition: all 0.3s ease;
}

.text-hover-glow:hover {
    color: var(--usa-blue-hover);
    text-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

/* Kinetic manifesto word illuminate */
.manifesto-word {
    color: #475569;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.manifesto-word.lit {
    color: #FFFFFF;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.manifesto-word.accent-lit {
    color: #F87171;
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.8);
}

/* --------------------------------------------------------------------------
   100% Working Infinite Marquee Slider Engine (Seamless Loop CSS)
   -------------------------------------------------------------------------- */
@keyframes marquee-slide {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.marquee-wrapper {
    display: flex !important;
    overflow: hidden !important;
    user-select: none !important;
    width: 100% !important;
    position: relative !important;
}

.marquee-content {
    display: flex !important;
    flex-shrink: 0 !important;
    min-width: 100% !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 3rem !important;
    animation: marquee-slide 28s linear infinite !important;
    will-change: transform;
}

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

.marquee-mask {
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* Electric Glow Cards */
.electric-card {
    box-shadow: 0 0 35px rgba(30, 64, 175, 0.25), inset 0 0 15px rgba(30, 64, 175, 0.1);
}

.aura-card {
    position: relative;
    background: #FFFFFF;
    border: 1px solid var(--slate-300);
    border-radius: 20px;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.aura-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--slate-400), transparent);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.aura-card:hover {
    transform: translateY(-4px);
    border-color: rgba(30, 64, 175, 0.4);
    box-shadow: 0 20px 40px -6px rgba(15, 23, 42, 0.12), 0 0 25px rgba(30, 64, 175, 0.15);
}

.aura-card:hover::before {
    background: linear-gradient(90deg, var(--usa-blue), var(--usa-red));
}

/* Range Slider */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--usa-red);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Modal Active State */
#lead-modal.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}
