/* Animations CSS */

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.75), 0 0 0 8px rgba(37,211,102,0.12); }
}
@keyframes accentGlow {
    0%, 100% { box-shadow: 0 4px 24px rgba(201,168,76,0.2); }
    50%       { box-shadow: 0 4px 36px rgba(201,168,76,0.45); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   SCROLL REVEAL — elements get .chb-visible when in viewport
   ============================================================ */
.chb-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.chb-reveal.chb-visible {
    opacity: 1;
    transform: translateY(0);
}
.chb-reveal-delay-1 { transition-delay: 0.1s; }
.chb-reveal-delay-2 { transition-delay: 0.2s; }
.chb-reveal-delay-3 { transition-delay: 0.3s; }
.chb-reveal-delay-4 { transition-delay: 0.4s; }
.chb-reveal-delay-5 { transition-delay: 0.5s; }

/* Hero entrance animation */
.hero-content > * {
    animation: fadeInUp 0.7s ease both;
}
.hero-tag         { animation-delay: 0.1s; }
.hero-headline    { animation-delay: 0.2s; }
.hero-sub         { animation-delay: 0.3s; }
.hero-actions     { animation-delay: 0.4s; }
.hero-microcopy   { animation-delay: 0.45s; }
.hero-badges      { animation-delay: 0.5s; }
.hero-image-wrap  { animation: slideInRight 0.8s 0.3s ease both; }

/* Accent glow on primary button */
.btn-primary { animation: accentGlow 3s ease-in-out infinite; }
.btn-primary:hover { animation: none; }

/* Service card hover glow */
.service-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.2); }

/* Number counter animation */
.stat-value {
    display: inline-block;
    font-size: clamp(32px,4vw,52px);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}
.stat-label { font-size: 14px; color: var(--color-muted); margin-top: 6px; }
.stats-row {
    display: flex; gap: 48px; margin-top: 48px;
    padding-top: 32px; border-top: 1px solid var(--color-border);
}
.stat-item { display: flex; flex-direction: column; }

/* Smooth anchor scroll offset for fixed nav */
:target { scroll-margin-top: 88px; }

/* Page transition overlay */
.page-transition {
    position: fixed; inset: 0;
    background: var(--color-bg);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Loading spinner */
.chb-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(201,168,76,0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .chb-reveal { opacity: 1; transform: none; }
}
