/* ============================================================
   ANIMATIONS — Micro-interactions & Scroll Reveals
   ============================================================ */

/* ── Scroll Reveal Animations ────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal--right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal--scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) {
    transition-delay: 0ms;
}

.stagger-children .reveal:nth-child(2) {
    transition-delay: 100ms;
}

.stagger-children .reveal:nth-child(3) {
    transition-delay: 200ms;
}

.stagger-children .reveal:nth-child(4) {
    transition-delay: 300ms;
}

.stagger-children .reveal:nth-child(5) {
    transition-delay: 400ms;
}

.stagger-children .reveal:nth-child(6) {
    transition-delay: 500ms;
}

.stagger-children .reveal:nth-child(7) {
    transition-delay: 600ms;
}

.stagger-children .reveal:nth-child(8) {
    transition-delay: 700ms;
}

/* ── Keyframe Animations ─────────────────────────── */
@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ── Hero Animations ─────────────────────────────── */
.hero__label {
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero__title {
    animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.hero__subtitle {
    animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.hero__actions {
    animation: fadeInUp 0.8s var(--ease-out) 0.8s both;
}

/* ── Particle / Decorative ───────────────────────── */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}

.floating-orb--1 {
    width: 300px;
    height: 300px;
    background: var(--color-accent);
    top: 10%;
    right: -5%;
    animation: float 8s ease-in-out infinite;
}

.floating-orb--2 {
    width: 200px;
    height: 200px;
    background: var(--color-primary-light);
    bottom: 15%;
    left: -3%;
    animation: float 10s ease-in-out infinite reverse;
}

/* ── Loading spinner ─────────────────────────────── */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: var(--space-6) auto;
}

/* ── Success checkmark ───────────────────────────── */
.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    animation: scaleIn 0.5s var(--ease-spring) both;
}

.checkmark-circle svg {
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 100;
    animation: checkmark 0.6s var(--ease-out) 0.3s both;
}

/* ── Hover ripple effect ─────────────────────────── */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease-out), height 0.6s var(--ease-out);
}

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* ── Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal--left,
    .reveal--right,
    .reveal--scale {
        opacity: 1;
        transform: none;
    }
}