@keyframes astroclap-enter {
    from { opacity: .6; translate: 0 var(--enter-distance, 14px); }
    to { opacity: 1; translate: 0 0; }
}

@keyframes astroclap-portrait {
    from { opacity: .65; scale: .975; }
    to { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: no-preference) {
    .home-hero .hero-grid > div:first-child > *,
    .page-hero > *,
    .detail-hero > div:first-child > * {
        animation: astroclap-enter 560ms cubic-bezier(.2, .65, .3, 1) var(--enter-delay, 0ms) backwards;
    }

    .home-hero .hero-grid > div:first-child > :nth-child(2),
    .page-hero > :nth-child(2),
    .detail-hero > div:first-child > :nth-child(2) { --enter-delay: 75ms; }

    .home-hero .hero-grid > div:first-child > :nth-child(n+3),
    .page-hero > :nth-child(n+3),
    .detail-hero > div:first-child > :nth-child(n+3) { --enter-delay: 145ms; }

    .hero-visual, .detail-hero > img {
        animation: astroclap-portrait 720ms cubic-bezier(.2, .65, .3, 1) 110ms backwards;
    }

    .motion-enter {
        animation: astroclap-enter 520ms cubic-bezier(.2, .65, .3, 1) var(--enter-delay, 0ms) backwards;
    }

    .motion-enter:focus-within { animation: none; }

    .nav-group.open > .nav-menu,
    .faq-accordion details[open] > :not(summary),
    .enquiry-details[open] > :not(summary),
    .booking-review:not([hidden]),
    .astro-results:not([hidden]),
    .blog-admin .admin-main > section:not([hidden]) {
        --enter-distance: 6px;
        animation: astroclap-enter 240ms ease-out;
    }

    .lightbox[open] { animation: astroclap-portrait 260ms ease-out; }
    .lightbox[open]::backdrop { animation: astroclap-enter 220ms ease-out; }
    .faq-accordion summary > span { transition: transform 200ms ease; }
    .nav-trigger > span { transition: rotate 200ms ease; }
    .nav-trigger[aria-expanded="true"] > span { rotate: 180deg; }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
    header nav.open {
        --enter-distance: 5px;
        animation: astroclap-enter 230ms ease-out;
    }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    :is(.post-card, .industry-page-grid .industry-card) {
        transition: box-shadow 220ms ease, border-color 220ms ease;
    }
    :is(.post-card, .industry-page-grid .industry-card):focus-within,
    :is(.post-card, .industry-page-grid .industry-card):hover {
        box-shadow: 0 8px 22px #63401b1a;
        border-color: #ba9866;
    }
    .footer-links a { transition: color 180ms ease, translate 180ms ease; }
    .footer-links a:hover { translate: 3px 0; }
}
