/* Inelio motion layer. Static layout and native controls remain unchanged. */
:root {
    --motion-ease: cubic-bezier(.22, 1, .36, 1);
    --motion-fast: 240ms;
    --motion-reveal-duration: 850ms;
    --motion-reveal-distance: 32px;
    --motion-hero-distance: 24px;
    --motion-stagger: 90ms;
    --motion-hero-stagger: 100ms;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes inelio-reveal {
        from { opacity: 0; translate: 0 var(--motion-reveal-distance); }
        to { opacity: 1; translate: 0 0; }
    }
    @keyframes inelio-menu {
        from { opacity: 0; translate: 0 -7px; }
        to { opacity: 1; translate: 0 0; }
    }
    @keyframes inelio-module {
        from { opacity: .35; translate: 0 5px; }
        to { opacity: 1; translate: 0 0; }
    }
    @keyframes inelio-float {
        0%, 100% { translate: 0 0; }
        50% { translate: 0 -4px; }
    }
    .motion-reveal { animation: inelio-reveal var(--motion-reveal-duration) var(--motion-ease) backwards; animation-delay: calc(var(--motion-index, 0) * var(--motion-stagger)); }
    .site .mega:not([hidden]) { animation: inelio-menu 220ms var(--motion-ease) both; }
    .site .module-panel { animation: inelio-module 280ms var(--motion-ease) both; }
    .site .faq-item[open] .faq-answer { animation: inelio-module 240ms var(--motion-ease) both; }
    .site .button, .site .module-tab, .site .text-link {
        transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, translate var(--motion-fast) var(--motion-ease);
    }
    .site .audience-card img, .site .industry-card img { transition: scale 420ms var(--motion-ease); }
    .site .audience-card, .site .industry-card, .site .sub-benefit, .site .sub-related > a, .site .plan, .site .flow-step {
        transition: translate 280ms var(--motion-ease), box-shadow 280ms ease;
    }
    @media (hover: hover) and (pointer: fine) {
        .site .button:hover { translate: 0 -2px; }
        .site .audience-card:hover, .site .industry-card:hover, .site .sub-benefit:hover, .site .sub-related > a:hover, .site .plan:hover, .site .flow-step:hover { translate: 0 -3px; }
        .site .audience-card:hover img, .site .industry-card:hover img { scale: 1.035; }
    }
    @media (min-width: 901px) {
        .site #top .hero-task, .site .sub-hero-badge { animation: inelio-float 6s ease-in-out infinite; }
    }
    @media (max-width: 900px) {
        .site .nav-shell nav.is-open { animation: inelio-menu 240ms var(--motion-ease) both; }
    }
    /* Progressive enhancement for same-origin multi-page navigation. */
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation-duration: 160ms; }
    ::view-transition-new(root) { animation-duration: 230ms; }
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    html, body, .site { scroll-behavior: auto !important; }
    .site *, .site *::before, .site *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* More perceptible entrance and scroll motion; no layout changes. */
@media (prefers-reduced-motion: no-preference) {
    @keyframes inelio-hero-enter {
        from { opacity: 0; translate: 0 var(--motion-hero-distance); }
        to { opacity: 1; translate: 0 0; }
    }
    .site .hero-copy-column > *, .site .sub-hero-copy > * {
        animation: inelio-hero-enter var(--motion-reveal-duration) var(--motion-ease) backwards;
    }
    .site .hero-copy-column > :nth-child(2), .site .sub-hero-copy > :nth-child(2) { animation-delay: var(--motion-hero-stagger); }
    .site .hero-copy-column > :nth-child(3), .site .sub-hero-copy > :nth-child(3) { animation-delay: calc(2 * var(--motion-hero-stagger)); }
    .site .hero-copy-column > :nth-child(n+4), .site .sub-hero-copy > :nth-child(n+4) { animation-delay: calc(3 * var(--motion-hero-stagger)); }
    @keyframes inelio-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
    @media (hover: hover) and (pointer: fine) {
        .site .audience-card:hover, .site .industry-card:hover, .site .sub-benefit:hover, .site .plan:hover { translate: 0 -6px; }
        .site .audience-card:hover img, .site .industry-card:hover img { scale: 1.06; }
    }
}

/* Compact motion for narrow screens and touch-first devices. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    :root {
        --motion-reveal-duration: 450ms;
        --motion-reveal-distance: 12px;
        --motion-hero-distance: 12px;
        --motion-stagger: 35ms;
        --motion-hero-stagger: 45ms;
    }
    @media (prefers-reduced-motion: no-preference) {
        .site #top .hero-task, .site .sub-hero-badge { animation: none; }
        .site .nav-shell nav.is-open { animation-duration: 200ms; }
        ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
    }
}
