/* Magic's Theater: what replaced the old jQuery plugins, on top of the
 * untouched legacy style.css. Behaviour lives in assets/legacy/js/site.js. */

html, body { overflow-x: clip; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* In-page links (#about, #reviews, #contact): was jQuery animate, 500 ms. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------------------------------------------------------------------
 * Parallax photos (was parallax.js, speed 0.2, which fell back to a still
 * photo on iOS and Android). The photo is the section's inline background.
 * Fixed attachment is not motion — the photo stays put while the page
 * scrolls over it — so it holds under reduced motion too. Touch screens get
 * the still photo, as before (iOS ignores fixed backgrounds anyway).
 * ------------------------------------------------------------------- */
[data-parallax] {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  [data-parallax] { background-attachment: fixed; }
}

/* ---------------------------------------------------------------------
 * Homepage intro crossfade (was slick fade: 300 ms linear). The slides keep
 * slick's class names, so style.css still sizes them (.page-intro-slide.
 * slick-slide is 100vh tall). Stacked in one grid cell so the box keeps
 * their height.
 * ------------------------------------------------------------------- */
.intro-fader { display: grid; }
.intro-fader > .slick-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms linear, visibility 0s linear 300ms;
}
.intro-fader > .slick-slide.is-current {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity 300ms linear;
}

/* ---------------------------------------------------------------------
 * Reviews carousel (was slick, 4 / 3 / 2 / 1 per view). A scroll-snap row.
 * The cards keep their markup, so `.car-item div .car-item__div` still
 * styles them; the dots reuse slick's `.slick-dots` look from style.css,
 * which hangs them 45px below the row, so the wrapper keeps slick's
 * positioning and bottom margin.
 * ------------------------------------------------------------------- */
.reviews-carousel { position: relative; margin-bottom: 30px; }
.reviews-carousel .car-item {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.reviews-carousel .car-item::-webkit-scrollbar { display: none; }
.reviews-carousel .car-item > div {
  flex: 0 0 25%;
  min-width: 0;
  scroll-snap-align: start;
}
@media (max-width: 1499.98px) { .reviews-carousel .car-item > div { flex-basis: 33.3333%; } }
@media (max-width: 1099.98px) { .reviews-carousel .car-item > div { flex-basis: 50%; } }
@media (max-width: 749.98px)  { .reviews-carousel .car-item > div { flex-basis: 100%; } }
.reviews-carousel .car-item:focus-visible { outline: 2px solid #ff0000; outline-offset: 4px; }
.reviews-carousel .slick-dots[hidden] { display: none; }
.reviews-carousel .slick-dots li button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------------------------------------------------------------------
 * Phone menu: slide-over drawer (was the drop-down under the header), the
 * restaurant-template pattern (ramerino-prime's mobile-menu). Under 989px
 * only, the width where style.css hides the inline nav. Full width on
 * phones, a 24rem sheet from 640px. Black like the header, whose bar it
 * repeats at the top, the theatre's red for the ticket button and the page
 * you're on.
 *
 * Transitions keyed to `.is-open`, not animations: site.js adds the class a
 * frame after showModal() and removes it before close(), so nothing can
 * restart mid-close and snap back.
 * ------------------------------------------------------------------- */
.page-nav-button {
  font: inherit;
  color: #fff;
}
.page-nav-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Reserve the scrollbar's space so locking the page (html.menu-open) never
   shifts it sideways on a window with a classic scrollbar. Drawer widths
   only, so desktop layout is untouched. */
@media (max-width: 988.98px) {
  html { scrollbar-gutter: stable; }
}
html.menu-open { overflow: hidden; }

.mobile-menu {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: transparent;
  /* clip, not hidden: a hidden box can still be scrolled by focus(), which
     is what threw the panel sideways before. */
  overflow: clip;
}

.mobile-menu::backdrop {
  background: rgba(0, 0, 0, 0.6);
  animation: mobile-menu-backdrop-in 300ms ease;
  opacity: 1;
  transition: opacity 300ms ease;
}
.mobile-menu:not(.is-open)::backdrop { animation: none; opacity: 0; }
@keyframes mobile-menu-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
  transform: translateX(100%);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
@media (min-width: 640px) {
  .mobile-menu__panel {
    max-width: 24rem;
    box-shadow: -20px 0 60px -16px rgba(0, 0, 0, 0.6);
  }
}

/* The header bar again: 99px, the logo at left 15px / top -10px and 200px
   wide, the round button at right 15px / top 27px (style.css .page-header--
   fixed, .page-logo img, .page-nav-button). The logo hangs below the bar,
   as it does on the page. */
.mobile-menu__top {
  position: relative;
  flex: none;
  height: 99px;
  background: #000;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  z-index: 1;
}
.mobile-menu__logo img {
  position: absolute;
  left: 15px;
  top: -10px;
  display: block;
  width: 200px;
  max-width: calc(100% - 85px);
  height: auto;
}
.mobile-menu__close {
  position: absolute;
  right: 15px;
  top: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 200ms ease;
}
.mobile-menu__close:hover { background-color: #0956aa; }
.mobile-menu__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mobile-menu__close svg { width: 24px; height: 24px; }

/* Links: large, centred, a menu screen rather than a shrunk desktop bar.
   Top padding clears the logo where it hangs below the bar. */
.mobile-menu__nav { flex: 1 0 auto; padding: 44px 24px 16px; }
.mobile-menu__list { list-style: none; margin: 0; padding: 0; text-align: center; }
.mobile-menu__link {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-family: 'PT Serif', Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 200ms ease, background-color 200ms ease;
}
.mobile-menu__link:hover { color: #fff; background-color: rgba(255, 255, 255, 0.08); }
.mobile-menu__link[aria-current="page"] { color: #ff0000; }
.mobile-menu__link:focus-visible { outline: 2px solid #fff; outline-offset: 0; }

.mobile-menu__footer {
  margin: 0 24px;
  padding: 24px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-family: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
}
.mobile-menu__cta {
  display: block;
  width: 100%;
  padding-top: 14px;
  padding-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.mobile-menu__contact { margin: 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__contact a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.mobile-menu__contact a:hover { color: #fff; }

/* Contents: in one after another behind the slide, out together ahead of it,
   so the panel leaves clean instead of carrying full-strength links. */
.mobile-menu__top > *,
.mobile-menu__item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.mobile-menu.is-open .mobile-menu__top > *,
.mobile-menu.is-open .mobile-menu__item {
  opacity: 1;
  transform: none;
  transition-duration: 400ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(60ms + var(--i, 0) * 50ms);
}
/* The close button keeps its hover colour change once it's in. */
.mobile-menu.is-open .mobile-menu__close {
  transition-property: opacity, transform, background-color;
}

/* Reduced motion: nothing moves. The panel and its contents fade in place,
   which the owner's browser (reduce: on) still shows as a transition. */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu__panel,
  .mobile-menu.is-open .mobile-menu__panel {
    transform: none;
    will-change: auto;
  }
  .mobile-menu__panel { opacity: 0; transition: opacity 220ms ease; }
  .mobile-menu.is-open .mobile-menu__panel { opacity: 1; }
  .mobile-menu__top > *,
  .mobile-menu__item,
  .mobile-menu.is-open .mobile-menu__top > *,
  .mobile-menu.is-open .mobile-menu__item { transform: none; }
}
