/**
 * Madam — Menu (hamburger button + fullscreen menu)
 * Loaded site-wide. Toggled via body.is-menu-open class.
 */

/* Unified topbar — single source of truth, loaded site-wide via menu.css.
   Both home + detail pages share identical positioning so logo/menu align pixel-perfect. */
.ma-topbar {
  position: fixed;
  top: max(calc(var(--frame-w-h) / 2), calc(env(safe-area-inset-top, 0px) + 1.4rem));
  left: calc(var(--frame-w-h) / 2);
  right: calc(var(--frame-w-h) / 2);
  transform: translateY(-50%);
  z-index: 220;                /* above .ma-menu (200) so logo + close X stay visible when menu is open */
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.ma-topbar > * { pointer-events: auto; }

/* Home page: the big logo lives inside the hero, so the small top-left brand is redundant.
   Keep it visible on detail pages (where there's no hero logo). */
.ma-home .ma-brand { display: none; }
.ma-home .ma-menu-btn { margin-left: auto; }   /* keep hamburger flush right when brand is hidden */

.ma-menu-btn {
  display: inline-grid;
  gap: 6px;
  padding: .55rem;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 210;
  position: relative;
  width: calc(28px + 1.1rem);     /* fixed box so the X aligns with the hamburger */
  height: calc(28px + 1.1rem);
  align-content: center;
  justify-items: center;
}
.ma-menu-btn span {
  display: block;
  width: 26px; height: 1.5px;
  background: var(--ma-text);
  border-radius: 1px;
  transform-origin: center;
  transition: opacity .25s ease, background .3s ease;
}
.ma-menu-btn:hover span { background: var(--ma-accent); }

/* Open state — explicit X via pseudo-elements (clearer than rotating the two thin bars) */
.is-menu-open .ma-menu-btn span { opacity: 0; }
.ma-menu-btn::before,
.ma-menu-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 28px;
  height: 2px;
  background: var(--ma-text);
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
  transition: transform .35s var(--ma-ease-2, ease), opacity .25s ease .05s, background .3s ease;
  pointer-events: none;
}
.ma-menu-btn:hover::before,
.ma-menu-btn:hover::after { background: var(--ma-accent); }
.is-menu-open .ma-menu-btn::before {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(45deg);
}
.is-menu-open .ma-menu-btn::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Fullscreen overlay menu */
.ma-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ma-bg);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;                      /* out of AT tree when closed (JS also sets inert) */
  transition: opacity .55s var(--ma-ease-2, ease), visibility 0s .55s;
  overflow-y: auto;                        /* short viewports can scroll the menu itself */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.is-menu-open .ma-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
/* Lock the page behind fullscreen overlays (menu + chat) */
body.is-menu-open,
body.ma-chat-open { overflow: hidden; }
.ma-menu__inner {
  max-width: 1280px;                       /* match the content max-width of the pages */
  margin: 0 auto;
  padding: clamp(5.5rem, 11vh, 7rem) var(--ma-pad, 2rem) calc(env(safe-area-inset-bottom, 0px) + clamp(2rem, 4vh, 3rem));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  height: auto;                            /* grow past the viewport → .ma-menu scrolls */
  gap: clamp(1.5rem, 3vh, 3rem);
}
@media (max-width: 700px) {
  .ma-menu__inner { padding-inline: 26px; }   /* same gutter as page content */
}
.ma-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(.4rem, 1vh, 1rem);
}
.ma-menu__list a {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-family: var(--ma-font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, min(8vw, 9vh), 5.4rem);
  letter-spacing: -.045em;
  line-height: .95;
  color: var(--ma-text);
  text-decoration: none;
  padding: 0 .15em;
  margin: 0 -.15em;
  /* Use clip-path for slide-in instead of transform (avoids stacking-context conflict with ::before) */
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transition:
    clip-path .65s var(--ma-ease-2, ease),
    opacity .55s var(--ma-ease-2, ease);
}
.ma-menu__list a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ma-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .55s var(--ma-ease-2, ease);
  z-index: -1;
}
.ma-menu__list a:hover { color: #fff; }
.ma-menu__list a:hover::before { transform: scaleX(1); }

/* Stagger reveal */
.is-menu-open .ma-menu__list a { opacity: 1; clip-path: inset(0 0 0 0); }
.is-menu-open .ma-menu__list li:nth-child(1) a { transition-delay: .10s; }
.is-menu-open .ma-menu__list li:nth-child(2) a { transition-delay: .18s; }
.is-menu-open .ma-menu__list li:nth-child(3) a { transition-delay: .26s; }
.is-menu-open .ma-menu__list li:nth-child(4) a { transition-delay: .34s; }
.is-menu-open .ma-menu__list li:nth-child(5) a { transition-delay: .42s; }

/* Sub-items (Groups + Visit) — smaller, subtler */
.ma-menu__list li.is-sub {
  margin-top: .6vh;
}
.ma-menu__list li.is-sub a {
  font-size: clamp(1.6rem, min(5.4vw, 6vh), 3.4rem);
  letter-spacing: -.03em;
  color: var(--ma-text-2);
}
.ma-menu__list li.is-sub a:hover { color: #fff; }
.ma-menu__list li.is-sub:first-of-type {
  margin-top: clamp(.8rem, 2vh, 1.6rem);
  padding-top: clamp(.5rem, 1.5vh, 1rem);
  border-top: 1px solid var(--ma-border);
}
/* Reserve quick-buttons inside the menu — sit ABOVE the foot separator */
.ma-menu__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.6rem, 1vw, 1rem);
  margin-bottom: clamp(1.4rem, 3vh, 2rem);
}
.ma-menu__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 220px;
  flex: 0 1 auto;
  padding: 1rem 1.3rem;
  font-family: var(--ma-font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  letter-spacing: -.005em;
  color: var(--ma-text);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--ma-border);
  border-radius: 0 14px 0 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .3s ease, border-color .3s ease, transform .45s var(--ma-ease-2, ease);
}
.ma-menu__cta::before {
  /* Accent slides in from left on hover */
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ma-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .55s var(--ma-ease-2, ease);
  z-index: -1;
}
.ma-menu__cta:hover {
  color: #fff;
  border-color: var(--ma-accent);
  transform: translate(2px, -2px);
}
.ma-menu__cta:hover::before { transform: scaleX(1); }
.ma-menu__cta .ma-arrow { font-size: 1.1em; }
.ma-menu__cta-icon {
  display: inline-flex;
  width: 1.15em;
  height: 1.15em;
  margin-right: .15rem;
  flex-shrink: 0;
}
.ma-menu__cta-icon svg { width: 100%; height: 100%; }

/* Chat CTA — accent-filled by default so it visually stands out from book/tickets */
.ma-menu__cta--chat {
  background: var(--ma-accent);
  border-color: var(--ma-accent);
  color: #fff;
}
.ma-menu__cta--chat:hover {
  background: var(--ma-text);
  border-color: var(--ma-text);
  color: var(--ma-bg);
}
.ma-menu__cta--chat:hover::before { transform: scaleX(0); }   /* no overlay needed */
@media (max-width: 700px) {
  /* 2×2 chips: op smalle schermen alles op één regel — iconen + pijltjes gaan
     eruit (op desktop blijven ze), tekst gecentreerd en nooit wrappen. */
  .ma-menu__cta {
    min-width: 0;
    flex: 1 1 calc(50% - .5rem);
    padding: .85rem .6rem;
    font-size: .92rem;
    justify-content: center;
    white-space: nowrap;
  }
  .ma-menu__cta .ma-menu__cta-icon,
  .ma-menu__cta .ma-arrow { display: none; }
}

.ma-menu__foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.4rem 2.5rem;
  font-family: var(--ma-font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ma-text-2);
  border-top: 1px solid var(--ma-border);
  padding-top: 1.6rem;
}
.ma-menu__foot .ma-socials { margin-top: .35rem; }
.ma-menu__foot a {
  color: var(--ma-text);
  text-decoration: none;
  display: block;
  margin-bottom: .25rem;
  transition: color .3s ease;
}
.ma-menu__foot a:hover { color: var(--ma-accent); }
.ma-menu__foot p { color: var(--ma-text-3); margin: 0; }
.ma-menu__label {
  font-family: var(--ma-font-body);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ma-accent);
  margin: 0 0 .7rem;
}

/* Short viewport — compress further so it always fits without scrolling */
@media (max-height: 720px) {
  .ma-menu__list { gap: clamp(.2rem, .6vh, .6rem); }
  .ma-menu__foot { font-size: .7rem; padding-top: 1rem; gap: .8rem 1.5rem; }
  .ma-menu__label { margin-bottom: .35rem; }
}

/* =========================================================
   MADAM AI CHAT — own modal around AgentWidget.embed()
   (no floating launcher; opens only via [data-open-chat])
   ========================================================= */
.ma-chat {
  position: fixed;
  inset: 0;
  z-index: 300;                  /* above menu overlay (200) and topbar (220) */
}
.ma-chat[hidden] { display: none; }
.ma-chat__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .68);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  animation: ma-chat-fade .35s ease both;
}
.ma-chat__panel {
  position: absolute;
  right: clamp(.75rem, 2vw, 2rem);
  bottom: clamp(.75rem, 2vw, 2rem);
  width: min(420px, calc(100vw - 2 * clamp(.75rem, 2vw, 2rem)));
  height: min(640px, calc(100dvh - 2 * clamp(.75rem, 2vw, 2rem)));
  background: #fff;              /* the chat UI itself is light */
  border-radius: 0 14px 0 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  animation: ma-chat-in .45s var(--ma-ease-2, ease) both;
}
@keyframes ma-chat-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ma-chat-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ma-chat__close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: #18181b;
  cursor: pointer;
  border: 0;
  transition: background .25s ease, transform .3s ease;
}
.ma-chat__close:hover { background: var(--ma-accent, #ff0048); transform: rotate(90deg); }
.ma-chat__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1.8px;
  border-radius: 1px;
  background: #f3ede2;
}
.ma-chat__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.ma-chat__close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

.ma-chat__embed { width: 100%; height: 100%; }
.ma-chat__embed > *,
.ma-chat__embed [data-momants-embed-host] { width: 100%; height: 100%; }
.ma-chat__embed iframe { width: 100%; height: 100%; border: 0; }

/* Mobile: bottom sheet, full width */
@media (max-width: 700px) {
  .ma-chat__panel {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(88dvh, 700px);
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ma-chat__panel, .ma-chat__backdrop { animation: none; }
  .ma-chat__close:hover { transform: none; }
}

/* =========================================================
   NOTIFICATION BAR — site-wide, dismissible per session
   ========================================================= */
:root { --ma-notice-h: 0px; }
/* Estimate before JS measures the real height — avoids a layout jump on load */
body.ma-has-notice { --ma-notice-h: 3.5rem; }

.ma-notice {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 240;                 /* above topbar (220), below chat modal (300) */
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
  padding: clamp(.85rem, 2vw, 1.15rem) clamp(1rem, 3vw, 1.8rem);
  background: var(--ma-accent);
  color: #fff;
}
.ma-notice__inner {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem clamp(1rem, 2.5vw, 1.6rem);
  text-align: center;
}
.ma-notice__text {
  margin: 0;
  font-family: var(--ma-font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.3;
  letter-spacing: -.01em;
}
.ma-notice__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-family: var(--ma-font-body);
  font-weight: 600;
  font-size: clamp(.78rem, 1vw, .9rem);
  letter-spacing: .04em;
  color: var(--ma-accent);
  background: #fff;
  padding: .5em 1.1em;
  border-radius: 0 10px 0 10px;
  text-decoration: none;
  transition: transform .35s var(--ma-ease-2, ease), background .3s ease;
}
.ma-notice__btn:hover { transform: translate(2px, -2px); background: #f3ede2; }
.ma-notice__close {
  flex: 0 0 auto;
  font-family: var(--ma-font-body);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  color: #fff;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  padding: .5em 1.1em;
  cursor: pointer;
  transition: background .25s ease, transform .2s ease;
}
.ma-notice__close:hover { background: rgba(0, 0, 0, .32); }
.ma-notice__close:active { transform: scale(.95); }

/* --- Make room for the bar (only when active; var defaults to 0 otherwise) --- */
body.ma-has-notice .ma-topbar { margin-top: var(--ma-notice-h, 0px); }
/* Detail pages scroll normally → push the whole document down */
body.ma-has-notice.ma-detail { padding-top: var(--ma-notice-h, 0px); }
/* Home fixed deck → shift deck down + shrink panels so scroll-snap still fits 100dvh */
body.ma-has-notice.ma-home .ma-deck { margin-top: var(--ma-notice-h, 0px); height: calc(100dvh - var(--ma-notice-h, 0px)); }
body.ma-has-notice.ma-home .ma-panel { height: calc(100dvh - var(--ma-notice-h, 0px)); }

@media (max-width: 600px) {
  .ma-notice { flex-wrap: wrap; }
  .ma-notice__close { order: 2; margin-left: auto; }
}
