@keyframes udacha-page-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes udacha-header-enter {
    from {
        opacity: 0;
        transform: translate(-50%, -18px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

main {
    animation: udacha-page-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-header {
    animation: udacha-header-enter 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.button {
    overflow: hidden;
    position: relative;
    isolation: isolate;
    box-shadow: 0 10px 24px rgba(59, 38, 25, 0.12);
    transition:
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms ease,
        background-color 220ms ease,
        color 220ms ease;
}

.button::after {
    position: absolute;
    inset: -40% -25%;
    z-index: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.28) 48%,
        transparent 61%
    );
    transform: translateX(-115%) rotate(4deg);
    transition: transform 520ms ease;
}

.button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 32px rgba(59, 38, 25, 0.2);
}

.button:hover::after {
    transform: translateX(115%) rotate(4deg);
}

.button:active {
    transform: translateY(-1px) scale(0.985);
}

:is(
    .text-button,
    .text-link,
    .article-card__link,
    .routes-hero__intro a,
    .home-explore__links a
) :is(span, i) {
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
    .text-button,
    .text-link,
    .article-card__link,
    .routes-hero__intro a,
    .home-explore__links a
):hover :is(span, i) {
    transform: translateX(5px);
}

:is(
    .home-house,
    .article-card__image,
    .review-card,
    .contact-card,
    .routes-location__map,
    .booking-widget-shell
) {
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 320ms ease,
        border-color 320ms ease;
}

:is(
    .home-house,
    .article-card__image,
    .review-card,
    .contact-card
):hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(34, 46, 42, 0.14);
}

.motion-ready .reveal-item {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .reveal-item.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

body main,
body .site-footer {
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

body.page-is-leaving main,
body.page-is-leaving .site-footer {
    opacity: 0;
    transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
    main,
    .site-header {
        animation: none;
    }

    .motion-ready .reveal-item,
    .motion-ready .reveal-item.is-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .button::after {
        display: none;
    }
}
