/* La Gourmandine — motion v1, 03/10/2026.
   Additive enhancement: original typography, layout, colours and assets retained.
   No content is hidden while waiting for JavaScript or IntersectionObserver. */

/* Neutralise the older reveal layer, including when JavaScript is unavailable.
   New reveals run once through the Web Animations API, not through hidden states. */
html .reveal,
html .reveal.visible {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Native anchor navigation: no interception of links, reservations or languages. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
main [id] { scroll-margin-top: 100px; }
@media (max-width: 1120px) {
  main [id] { scroll-margin-top: 88px; }
}
@media (max-width: 390px) {
  main [id] { scroll-margin-top: 84px; }
}

/* Existing controls retain exactly their resting appearance. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  html .button,
  html .book-button,
  html .pdf-button,
  html .mobile-book a {
    transition: transform 220ms cubic-bezier(.22, .61, .36, 1),
                box-shadow 220ms ease, background-color 220ms ease, color 180ms ease;
  }
  html .button:hover,
  html .book-button:hover,
  html .pdf-button:hover {
    transform: translateY(-1px) scale(1.015);
    box-shadow: 0 7px 18px rgba(25, 18, 15, .10);
  }
  html .button:active,
  html .book-button:active,
  html .pdf-button:active { transform: none; }
  html .nav a::after { transition: right 240ms ease; }
  html .arrow-link b {
    transition: transform 220ms cubic-bezier(.22, .61, .36, 1);
  }
  html .arrow-link:hover b { transform: translate(2px, -2px); }
  html .footer a,
  html .contact-grid a { transition: opacity 180ms ease; }
  html .footer a:hover,
  html .contact-grid a:hover { opacity: .86; }

  html .food-card,
  html .moment,
  html .venue-gallery-trigger {
    transition: transform 260ms cubic-bezier(.22, .61, .36, 1), box-shadow 260ms ease;
  }
  html .food-card:hover,
  html .moment:hover,
  html .venue-gallery-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(25, 18, 15, .10);
  }
  html .food-card img,
  html .venue-gallery-trigger img {
    transition: transform 420ms cubic-bezier(.22, .61, .36, 1);
  }
  html .food-card:hover img,
  html .venue-gallery-trigger:hover img { transform: scale(1.02); }
}

/* Real touch devices: never retain a sticky, synthetic hover movement. */
@media (hover: none), (pointer: coarse) {
  html .button:hover,
  html .book-button:hover,
  html .pdf-button:hover,
  html .food-card:hover,
  html .moment:hover,
  html .venue-gallery-trigger:hover,
  html .food-card:hover img,
  html .venue-gallery-trigger:hover img,
  html .food-card-link:hover .food-caption {
    transform: none;
  }
}

/* Same mobile menu, same geometry. Only its entry/exit is animated.
   The enhancement class is added only if the original menu script initialises. */
@media (max-width: 1120px) {
  html.gm-motion-ui .mobile-nav {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 240ms cubic-bezier(.22, .61, .36, 1),
                visibility 0s linear 240ms;
  }
  html.gm-motion-ui .mobile-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 200ms ease, transform 240ms cubic-bezier(.22, .61, .36, 1),
                visibility 0s linear 0s;
  }
  html.gm-motion-ui .menu-toggle span {
    transition: transform 220ms ease;
  }
  html.gm-motion-ui .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }
  html.gm-motion-ui .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
}

/* Parallax is restricted to an already clipped, already overscaled hero image.
   The script caps movement inside the existing 1% overscan. Nothing is resized. */
html.gm-parallax .hero-image {
  transform: translate3d(0, var(--gm-hero-y, 0px), 0) scale(1.01);
}

/* A keyboard outline changes no size or layout and is never suppressed. */
.menu-toggle:focus-visible,
.mobile-nav a:focus-visible,
.button:focus-visible,
.book-button:focus-visible,
.pdf-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Also switch off the legacy site's own motion (popup, card zoom, assistant).
   Do not reset all transforms: some original transforms are positional layout. */
@media (prefers-reduced-motion: reduce) {
  html, html:focus-within { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html .reveal, html .reveal.visible { opacity: 1 !important; transform: none !important; }
  html.gm-motion-ui .mobile-nav { transform: none !important; }
  html.gm-parallax .hero-image { transform: scale(1.01) !important; }
  html .button:hover,
  html .book-button:hover,
  html .pdf-button:hover,
  html .food-card:hover,
  html .moment:hover,
  html .venue-gallery-trigger:hover,
  html .food-card:hover img,
  html .venue-gallery-trigger:hover img,
  html .food-card-link:hover .food-caption,
  html #season-popup .season-popup-close:hover,
  html #season-popup .season-popup-action a:hover {
    transform: none !important;
  }
}

@media print {
  html .reveal, html .reveal.visible { opacity: 1 !important; transform: none !important; }
  html.gm-motion-ui .mobile-nav { display: none !important; }
  html.gm-parallax .hero-image { transform: scale(1.01) !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
