/* ============================================
   KOVEXIA Healthcare — Enterprise Motion System
   Professional • Calm • Confident • Structured
   ============================================ */

:root {
    --ease-enterprise: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-base: 0.5s;
    --duration-fast: 0.3s;
    --duration-slow: 0.6s;
}

/* ---- Core Keyframes ---- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleReveal {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawCheck {
    from {
        stroke-dashoffset: 48;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes softGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 163, 224, 0);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(0, 163, 224, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 163, 224, 0);
    }
}

@keyframes badgePulse {
    0% {
        opacity: 0.92;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.92;
    }
}

/* ---- Scroll Reveal System ---- */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--duration-base) var(--ease-enterprise),
        transform var(--duration-base) var(--ease-enterprise);
    will-change: opacity, transform;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays (for grouped elements) */
.stagger-1 {
    transition-delay: 0s;
}

.stagger-2 {
    transition-delay: 0.1s;
}

.stagger-3 {
    transition-delay: 0.2s;
}

.stagger-4 {
    transition-delay: 0.3s;
}

.stagger-5 {
    transition-delay: 0.4s;
}

.stagger-6 {
    transition-delay: 0.5s;
}

/* Hero-specific stagger (tighter) */
.hero-stagger-1 {
    transition-delay: 0s;
}

.hero-stagger-2 {
    transition-delay: 0.1s;
}

.hero-stagger-3 {
    transition-delay: 0.2s;
}

/* ---- Product Image Reveal ---- */

.product-image-reveal {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity var(--duration-slow) var(--ease-enterprise),
        transform var(--duration-slow) var(--ease-enterprise);
}

.product-image-reveal.animate-visible {
    opacity: 1;
    transform: scale(1);
}

/* ---- Fade-In Only (no slide, for tables/specs) ---- */

.fade-in-only {
    opacity: 0;
    transform: none;
    transition: opacity var(--duration-base) var(--ease-enterprise);
}

.fade-in-only.animate-visible {
    opacity: 1;
}

/* ---- Certification Badge Pulse ---- */

.cert-badge-animate {
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-enterprise);
}

.cert-badge-animate.animate-visible {
    opacity: 1;
    animation: badgePulse 0.8s var(--ease-enterprise) 0.3s 1;
}

/* ---- Hover Utilities ---- */

.hover-lift {
    transition: transform var(--duration-fast) var(--ease-enterprise),
        box-shadow var(--duration-fast) var(--ease-enterprise);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hover-btn {
    transition: transform var(--duration-fast) var(--ease-enterprise),
        box-shadow var(--duration-fast) var(--ease-enterprise),
        background-color var(--duration-fast) ease;
}

.hover-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.hover-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- Product Action Buttons ---- */

.product-actions .btn {
    transition: transform var(--duration-fast) var(--ease-enterprise),
        box-shadow var(--duration-fast) var(--ease-enterprise),
        background-color var(--duration-fast) ease;
}

.product-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.product-actions .btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- RFQ Success Screen ---- */

.success-check-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f7ff 0%, #f0fdf4 100%);
    border: 2px solid #00A3E0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: softGlow 1.2s ease 0.6s 2;
}

.success-check-circle svg {
    width: 36px;
    height: 36px;
}

.success-check-circle .check-path {
    stroke: #00A3E0;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck 0.6s var(--ease-enterprise) 0.3s forwards;
}

.success-message-container {
    text-align: center;
    padding: 3rem 2rem;
}

.success-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeInUp 0.5s var(--ease-enterprise) 0.7s forwards;
}

.success-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.5s var(--ease-enterprise) 0.9s forwards;
}

/* ---- Mobile Navigation Overlay ---- */

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-fast) ease,
        visibility var(--duration-fast) ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---- Accessibility: Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .animate-on-scroll,
    .product-image-reveal,
    .fade-in-only,
    .cert-badge-animate {
        opacity: 1 !important;
        transform: none !important;
    }

    .hover-lift:hover,
    .hover-btn:hover {
        transform: none !important;
    }

    .success-title,
    .success-subtitle {
        opacity: 1 !important;
    }
}