@media (prefers-reduced-motion: no-preference) {
  @keyframes text-entrance {
    from { opacity: .64; translate: 0 .55rem; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes photo-entrance {
    from { opacity: .72; scale: 1.035; }
    to { opacity: 1; scale: 1; }
  }
  @keyframes warm-light {
    0% { filter: brightness(.86); }
    58% { filter: brightness(1.13) drop-shadow(0 0 .45rem #e8ad5e45); }
    100% { filter: none; }
  }
  @keyframes gilded-line {
    0% { opacity: .25; clip-path: inset(0 48%); }
    60% { opacity: 1; filter: brightness(1.38); }
    100% { opacity: 1; clip-path: inset(0); filter: none; }
  }
  @keyframes light-sweep {
    0% { translate: -125% 0; opacity: 0; }
    25%, 65% { opacity: 1; }
    100% { translate: 125% 0; opacity: 0; }
  }

  .masthead::before { animation: gilded-line 780ms ease-out; }
  .site-nav.is-open { animation: text-entrance 220ms ease-out; }
  .footer.is-entering::before, .footer.is-entering::after { animation: gilded-line 760ms ease-out; }
  .footer.is-entering .footer-brand img { animation: warm-light 850ms ease-out; }

  :is(.button-featured, .button-pill, .lunch .button) {
    position: relative;
    overflow: hidden;
  }
  :is(.button-featured, .button-pill, .lunch .button)::after,
  .menu-card::before, .dish-image::after, .events-hero-photo::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(109deg, transparent 34%, #ffe1aa33 49%, #fff5db19 53%, transparent 67%);
    opacity: 0;
    content: "";
    pointer-events: none;
  }
  .menu-card::before { z-index: -1; }
  .dish-image { position: relative; }
  :is(.button-featured, .button-pill, .lunch .button):focus-visible::after,
  .menu-card:focus-visible::before, .dish-card:focus-visible .dish-image::after {
    animation: light-sweep 670ms ease-out;
  }
  :is(.button-featured, .button-pill, .header-booking, .nav-toggle):active { scale: .985; }

  :is(.hero.is-entering .hero-content, .catalog-hero.is-entering .catalog-intro,
    .lunch-heading.is-entering, .events-intro.is-entering) > * {
    animation: text-entrance 660ms cubic-bezier(.2, .7, .25, 1) var(--reveal-delay, 0ms) backwards;
  }
  :where(.hero-content, .catalog-intro, .lunch-heading, .events-intro, .events-benefits,
    .events-gallery, .lunch-items, .catalog-grid) > :nth-child(2) { --reveal-delay: 65ms; }
  :where(.hero-content, .catalog-intro, .events-intro, .events-benefits,
    .events-gallery, .lunch-items, .catalog-grid) > :nth-child(3) { --reveal-delay: 130ms; }
  :where(.hero-content, .events-intro, .lunch-items) > :nth-child(4) { --reveal-delay: 195ms; }
  :where(.hero-content, .lunch-items) > :nth-child(5) { --reveal-delay: 260ms; }

  .hero.is-entering .hero-photo { animation: photo-entrance 1.35s cubic-bezier(.18, .72, .24, 1); }
  .hero.is-entering .hero-content h1 { animation-name: text-entrance, warm-light; animation-duration: 720ms, 1.1s; }
  #menu.is-entering .section-header { animation: text-entrance 600ms ease-out; }
  #menu.is-entering .section-ornament::before, #menu.is-entering .section-ornament::after {
    animation: gilded-line 820ms ease-out;
  }
  .menu-card.is-entering { animation: text-entrance 560ms ease-out; }
  .lunch.is-entering .lunch-photo { animation: photo-entrance 1.05s ease-out; }
  .lunch.is-entering .lunch-copy { animation: text-entrance 690ms ease-out; }
  .lunch.is-entering .cutlery { animation: warm-light 900ms ease-out 160ms backwards; }

  @keyframes confetti-settle {
    from { opacity: .16; translate: -.35rem -.9rem; rotate: -9deg; }
  }
  @keyframes gift-entrance {
    0% { opacity: .62; rotate: -8deg; }
    50% { rotate: 4deg; filter: drop-shadow(0 0 .55rem #ffc77e55); }
    100% { opacity: 1; rotate: 0deg; filter: none; }
  }
  .birthday.is-entering .birthday-picture img { animation: warm-light 1.4s ease-out; }
  .birthday.is-entering .birthday-copy { animation: text-entrance 780ms ease-out; }
  .birthday.is-entering .birthday-gift { animation: gift-entrance 820ms ease-out 110ms backwards; }
  .birthday.is-entering .birthday-confetti { animation: confetti-settle 950ms ease-out var(--confetti-delay, .1s) backwards; }
  .birthday-confetti:nth-child(odd) { --confetti-delay: .25s; }

  @keyframes route-reveal {
    from { clip-path: inset(100% 0 0); }
    to { clip-path: inset(0); }
  }
  .home-contacts.is-entering .home-contacts-copy { animation: text-entrance 680ms ease-out; }
  .home-contacts.is-entering .home-contacts-route { animation: route-reveal 1.15s ease-out 180ms backwards; }
  .home-contacts.is-entering .home-contacts-photo { animation: warm-light 1.15s ease-out; }
  .home-contacts-map-panel.is-entering { animation: warm-light 760ms ease-out; }

  .catalog-hero.is-entering .catalog-hero-photo { animation: warm-light 1.05s ease-out; }
  :is(.catalog-nav, .catalog-controls).is-entering { animation: text-entrance 470ms ease-out; }
  .catalog-nav a[aria-current] .catalog-icon { animation: warm-light 600ms ease-out; }
  .catalog-nav a[aria-current] .catalog-nav-arrow { animation: text-entrance 360ms ease-out; }
  .is-category-entering .catalog-group-header,
  .is-category-entering .catalog-grid > :nth-child(-n+3) {
    animation: text-entrance 485ms ease-out var(--reveal-delay, 0ms) backwards;
  }
  .dish-details[open] { animation: text-entrance 320ms cubic-bezier(.2, .7, .25, 1); }
  .dish-details[open] .details-photo { animation: warm-light 580ms ease-out; }

  .lunch-scene-photo.is-entering img { animation: warm-light 1.25s ease-out; }
  .lunch-summary.is-entering .lunch-menu > .lunch-frame { animation: warm-light 1.05s ease-out; }
  .lunch-summary.is-entering .lunch-menu-heading { animation: text-entrance 580ms ease-out; }
  .lunch-summary.is-entering .lunch-item-icon { animation: warm-light 720ms ease-out var(--reveal-delay, 0ms) backwards; }
  .lunch-summary.is-entering .lunch-price-display { animation: text-entrance 610ms ease-out 210ms backwards; }
  .lunch-summary.is-entering .lunch-price .lunch-frame { animation: warm-light 920ms ease-out 280ms backwards; }
  .lunch-summary.is-entering .actions { animation: text-entrance 570ms ease-out 350ms backwards; }

  .events-hero-photo.is-entering img { animation: photo-entrance 1.1s ease-out; }
  .events-hero-photo.is-entering::after { animation: light-sweep 950ms ease-out 160ms; }
  :is(.events-actions, .events-gallery, .events-benefits).is-entering > * {
    animation: text-entrance 600ms ease-out var(--reveal-delay, 0ms) backwards;
  }
  .events-benefits.is-entering .icon { animation: warm-light 820ms ease-out var(--reveal-delay, 0ms) backwards; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.button-featured, .button-pill, .lunch .button):hover::after,
  .menu-card:hover::before, .dish-card:hover .dish-image::after { animation: light-sweep 670ms ease-out; }
  .header-booking:hover::after { animation: gilded-line 650ms ease-out; }
  .events-gallery img { transition: border-color 300ms ease, box-shadow 300ms ease, filter 450ms ease; }
  .events-gallery img:hover { filter: brightness(1.09) saturate(1.06); }
}
