/* ============================================================
   GeoTrack — Animations (Premium v3 — Enhanced Micro-interactions)
   ============================================================ */

/* ── Hero entrance ──────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fade-up-blur {
    from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

.hero__eyebrow.animate-in  { animation: fade-up-blur 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s  both; }
.hero__title.animate-in    { animation: fade-up-blur 0.7s cubic-bezier(0.16,1,0.3,1) 0.22s both; }
.hero__subtitle.animate-in { animation: fade-up-blur 0.7s cubic-bezier(0.16,1,0.3,1) 0.38s both; }
.hero__actions.animate-in  { animation: fade-up-blur 0.65s cubic-bezier(0.16,1,0.3,1) 0.52s both; }
.hero__social-proof.animate-in { animation: fade-up 0.55s cubic-bezier(0.16,1,0.3,1) 0.65s both; }
.hero__metrics.animate-in  { animation: fade-up 0.55s cubic-bezier(0.16,1,0.3,1) 0.78s both; }

/* ── Float ──────────────────────────────────────────────────── */
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
.float      { animation: float 6s ease-in-out infinite; }
.float--slow{ animation: float 8s ease-in-out infinite; }

/* ── Shimmer ────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

/* ── Spin ───────────────────────────────────────────────────── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Ripple expand ──────────────────────────────────────────── */
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ── Ping expand ────────────────────────────────────────────── */
@keyframes ping-expand {
    0%   { transform: translate(-50%,-50%) scale(0.5); opacity: 0.8; }
    100% { transform: translate(-50%,-50%) scale(3);   opacity: 0; }
}

/* ── Timeline dot pulse ─────────────────────────────────────── */
@keyframes dot-ring-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(11,44,92,0.35); }
    70%  { box-shadow: 0 0 0 8px rgba(11,44,92,0); }
    100% { box-shadow: 0 0 0 0 rgba(11,44,92,0); }
}
.timeline__dot { animation: dot-ring-pulse 2.5s ease-out infinite; }

/* ── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity  0.65s cubic-bezier(0.16,1,0.3,1),
        transform 0.65s cubic-bezier(0.16,1,0.3,1),
        filter 0.65s cubic-bezier(0.16,1,0.3,1);
    filter: blur(2px);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal--from-left            { opacity: 0; transform: translateX(-28px); }
.reveal--from-left.is-visible { opacity: 1; transform: translateX(0); }
.reveal--from-right            { opacity: 0; transform: translateX(28px); }
.reveal--from-right.is-visible { opacity: 1; transform: translateX(0); }
.reveal--scale                 { opacity: 0; transform: scale(0.93); }
.reveal--scale.is-visible      { opacity: 1; transform: scale(1); }

.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }
.reveal--delay-5 { transition-delay: 0.40s; }
.reveal--delay-6 { transition-delay: 0.48s; }

/* ── Page transition ────────────────────────────────────────── */
.page-transition-enter { animation: fade-in 0.35s ease; }

/* ── Focus glow ─────────────────────────────────────────────── */
@keyframes focus-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(11,44,92,0.3); }
    100% { box-shadow: 0 0 0 4px rgba(11,44,92,0.1); }
}

/* ── Tilt card effect ───────────────────────────────────────── */
.tilt-card {
    transition: transform 0.4s var(--ease-out);
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ── Hover glow on cards ────────────────────────────────────── */
.glow-on-hover {
    position: relative;
}
.glow-on-hover::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(11,44,92,0.1), rgba(22,163,74,0.08));
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    z-index: -1;
}
.glow-on-hover:hover::after { opacity: 1; }

/* ── Smooth underline link ──────────────────────────────────── */
.hover-underline {
    position: relative;
}
.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: width 0.3s var(--ease-out);
}
.hover-underline:hover::after { width: 100%; }

/* ── Number count-up flash ──────────────────────────────────── */
@keyframes counter-flash {
    0%   { color: var(--accent); }
    100% { color: var(--text-primary); }
}
.counter-done { animation: counter-flash 0.8s ease-out; }

/* ── Parallax layers ────────────────────────────────────────── */
.parallax-layer {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; filter: none; }
    .hero__eyebrow, .hero__title, .hero__subtitle,
    .hero__actions, .hero__social-proof, .hero__metrics,
    .hero__visual { opacity: 1; transform: none; }
}
