/* Blissful Escapes - interactive behaviours, hand-authored.
   Covers the FAQ accordion and the overlay navigation menu. Pairs with
   interactions.js. Everything degrades gracefully without JS (answers are present
   in the HTML; the menu overlay is only built when JS runs). */

/* ===== FAQ accordion ===== */
[data-be-faq] {
  cursor: pointer;
}
[data-be-faq] svg {
  transition: transform 0.3s ease;
}
.be-faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
.be-faq-answer p {
  margin: 0;
  padding: 0 24px 22px;
  color: rgba(18, 18, 18, 0.7);
  font-size: 15px;
  line-height: 1.55;
}
/* open height (max-height) is set inline by interactions.js to the answer's real
   scrollHeight, so the slide is smooth and collapses cleanly to 0 */
[data-be-faq].be-open .be-faq-answer {
  opacity: 1;
}
/* chevron flips up when open */
[data-be-faq].be-open svg {
  transform: rotate(180deg) !important;
}

/* ===== Overlay navigation menu (hamburger) ===== */
#be-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}
html.be-menu-open {
  overflow: hidden; /* lock background scroll while menu is open */
}
html.be-menu-open #be-menu {
  opacity: 1;
  visibility: visible;
}
#be-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
#be-menu li {
  margin: 16px 0;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
html.be-menu-open #be-menu li {
  opacity: 1;
  transform: none;
}
html.be-menu-open #be-menu li:nth-child(1) { transition-delay: 0.06s; }
html.be-menu-open #be-menu li:nth-child(2) { transition-delay: 0.12s; }
html.be-menu-open #be-menu li:nth-child(3) { transition-delay: 0.18s; }
html.be-menu-open #be-menu li:nth-child(4) { transition-delay: 0.24s; }
html.be-menu-open #be-menu li:nth-child(5) { transition-delay: 0.30s; }
html.be-menu-open #be-menu li:nth-child(6) { transition-delay: 0.36s; }
#be-menu a {
  font-family: inherit;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-dim);
  text-decoration: none;
}
#be-menu a[aria-current="page"] {
  color: var(--c-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
#be-menu a:hover {
  opacity: 0.55;
}
#be-menu .be-menu-close {
  position: absolute;
  top: 12px;
  right: var(--gutter);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--c-text);
}
#be-menu .be-menu-close svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  #be-menu,
  #be-menu li,
  .be-faq-answer,
  [data-be-faq] svg {
    transition: none;
  }
}
