/* ============================================================
   LINK SISTEMI – MOTION SYSTEM
   Apple-grade "quiet luxury" animation language
   ============================================================ */

/* ── 1. PAGE ENTER ─────────────────────────────────────────── */
@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content,
.login-card,
.profile-content {
    animation: page-enter 500ms var(--ease-out) both;
}

/* ── 2. SECTION REVEAL (scroll-triggered) ──────────────────── */
@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
}

.reveal.is-visible {
    animation: reveal-up var(--duration-section) var(--ease-out) both;
}

/* Stagger */
.reveal.is-visible>*:nth-child(1) {
    animation-delay: 0ms;
}

.reveal.is-visible>*:nth-child(2) {
    animation-delay: 100ms;
}

.reveal.is-visible>*:nth-child(3) {
    animation-delay: 200ms;
}

.reveal.is-visible>*:nth-child(4) {
    animation-delay: 300ms;
}

.reveal.is-visible>*:nth-child(5) {
    animation-delay: 400ms;
}

.reveal.is-visible>*:nth-child(6) {
    animation-delay: 500ms;
}

.reveal-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--duration-section) var(--ease-out),
        transform var(--duration-section) var(--ease-out);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: none;
}

/* ── 3. HOVER MICRO ────────────────────────────────────────── */
.stat-card,
.feature-card,
.card-plan,
.pricing-card {
    transition: transform var(--duration-micro) var(--ease-default),
        border-color var(--duration-micro) var(--ease-default),
        box-shadow var(--duration-micro) var(--ease-default);
}

.nav-link {
    transition: background var(--duration-micro) var(--ease-default),
        color var(--duration-micro) var(--ease-default);
}

/* ── 4. WOW ZONE – Plan card pulse ─────────────────────────── */
.card-plan.is-current {
    animation: plan-glow 3s ease-in-out infinite alternate;
}

@keyframes plan-glow {
    from {
        box-shadow: 0 0 0 1px var(--brand), 0 4px 20px rgba(var(--brand-rgb), 0.12);
    }

    to {
        box-shadow: 0 0 0 1px var(--brand), 0 4px 30px rgba(var(--brand-rgb), 0.22);
    }
}

/* ── 5. BUTTON TRANSITIONS ─────────────────────────────────── */
.btn-primary {
    transition: transform var(--duration-micro) var(--ease-out),
        filter var(--duration-micro) var(--ease-out),
        box-shadow var(--duration-micro) var(--ease-out);
}

.btn-hero-primary {
    transition: transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out);
}

/* ── REDUCED MOTION OVERRIDE ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .page-content,
    .login-card,
    .profile-content {
        animation: none;
        opacity: 1;
    }

    .reveal {
        opacity: 1;
    }

    .reveal-item {
        opacity: 1;
        transform: none;
    }

    .card-plan.is-current {
        animation: none;
    }
}