/* ==========================================================================
   Hamburger menu (all breakpoints) + floating "Book a Class" button
   The footer links live in a slide-down menu behind a burger pinned top-right.
   ≤991px: footer hidden, header collapses to one 60px row, book button
   becomes a floating pill. ≥992px: footer stays, the header book button is
   restyled as a compact pill sitting beside the burger.
   ========================================================================== */

/* ---------- Burger button (all sizes) ---------- */

.fr-burger {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 64px;
  height: 60px;
  padding: 0;
  background: #fff;
  border: 0;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  cursor: pointer;
}

.fr-burger__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: #000;
  transition: transform .3s ease, opacity .2s ease;
}

.fr-burger.is-open .fr-burger__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.fr-burger.is-open .fr-burger__bar:nth-child(2) {
  opacity: 0;
}

.fr-burger.is-open .fr-burger__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Slide-down menu (all sizes) ---------- */

.fr-menu {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  background: #000;
  padding-top: 60px;
  overflow-y: auto;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform .4s cubic-bezier(.16, .84, .44, 1), visibility .4s;
}

.fr-menu.is-open {
  transform: translateY(0);
  visibility: visible;
}

.fr-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid #fff;
}

.fr-menu__item {
  border-bottom: 2px solid #fff;
}

.fr-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-family: Reformasans, sans-serif;
  font-size: 32px;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
}

.fr-menu__link:hover,
.fr-menu__link:active {
  background: #fff;
  color: #000;
}

.fr-menu__link.is-current {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.fr-menu__arrow {
  font-size: 22px;
  opacity: .7;
}

/* Our Studios accordion */
.fr-menu__toggle {
  width: 100%;
  margin: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.fr-menu__chev {
  font-size: 22px;
  opacity: .7;
  transition: transform .25s ease;
}
.fr-menu__item.is-open .fr-menu__chev {
  transform: rotate(180deg);
}
.fr-menu__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.fr-menu__item.is-open .fr-menu__sub {
  max-height: 240px;
}
.fr-menu__subitem {
  border-top: 2px solid #fff;
}
.fr-menu__sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 14px 40px;
  font-family: Reformasans, sans-serif;
  font-size: 26px;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .06);
}
.fr-menu__sublink:hover,
.fr-menu__sublink:active {
  background: #fff;
  color: #000;
}

/* Black book button at the bottom of the list */
.fr-menu__book {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 20px 0;
  padding: 18px 20px;
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  font-family: Reformasans, sans-serif;
  font-size: 30px;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.fr-menu__book:hover,
.fr-menu__book:active {
  background: #000;
  color: #fff;
}

.fr-menu__foot {
  margin: auto 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  font-family: Reformasans, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #fff;
  opacity: .7;
}

body.fr-menu-open {
  overflow: hidden;
}

.fr-fab {
  display: none;
}

/* ==========================================================================
   Mobile + tablet (≤991px)
   ========================================================================== */

@media (max-width: 991px) {

  /* Header: single row, burger on the right */
  .header-wrapper {
    flex-direction: row !important;
    height: 60px !important;
    border-top: 0 !important;
  }

  .first-reform-wrapper {
    border-bottom-width: 0 !important;
    /* keep the sliding wordmark clear of the burger square */
    padding-right: 64px;
  }

  .first-reform-link-block,
  .first-reform-link-block.w--current {
    height: 60px !important;
    align-items: center !important;
  }

  /* Wordmark −20% on mobile/tablet */
  .nav-text.first,
  .nav-text.reform {
    font-size: 32px !important;
  }

  .header .link-block.book-button {
    display: none !important;
  }

  /* Footer lives in the menu now */
  div.footer {
    display: none !important;
  }

  /* Floating "Book a Class" — white border so it reads on dark backgrounds.
     --fab-lift is raised by JS when the marquee scrolls into view, so the
     button stops above the marquee instead of covering it. */
  .fr-fab {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--fab-lift, 0px));
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 26px;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    font-family: Reformasans, sans-serif;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    transition: transform .15s ease, opacity .3s ease, bottom .25s ease;
  }

  .fr-fab:hover {
    background: #fff;
    color: #000;
    border-color: #000;
  }

  .fr-fab:active {
    transform: scale(.96);
  }

  body.fr-menu-open .fr-fab {
    opacity: 0;
    pointer-events: none;
  }
}

/* Phones only: content clears the now-shorter fixed header */
@media (max-width: 767px) {
  .section-home {
    padding-top: 60px !important;
  }
}

/* ==========================================================================
   Desktop (≥992px): compact pill book button beside the burger
   ========================================================================== */

@media (min-width: 992px) {

  .header .link-block.book-button {
    background-color: #fff0;
    border-left: 0;
    flex: 0 0 auto;
    align-self: center;
    width: auto;
    min-width: 0;
    height: auto;
    /* clear the fixed burger square */
    margin-right: 88px;
    overflow: visible;
  }

  .header .link-block.book-button:hover {
    background-color: #fff0;
  }

  .header .nav-text.book {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: 999px;
    width: auto;
    height: auto;
    padding: 12px 30px;
    font-size: 24px;
    line-height: 1;
    transition: background-color .2s ease, color .2s ease;
  }

  .header .link-block.book-button:hover .nav-text.book {
    background: #fff;
    color: #000;
  }

  /* Roomier menu typography on large screens */
  .fr-menu__link {
    padding: 20px 40px;
    font-size: 40px;
  }

  .fr-menu__sublink {
    padding: 16px 40px 16px 64px;
    font-size: 32px;
  }

  .fr-menu__item.is-open .fr-menu__sub {
    max-height: 320px;
  }

  .fr-menu__book {
    width: 420px;
    max-width: calc(100% - 80px);
    margin: 32px auto 0;
  }

  .fr-menu__foot {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* ==========================================================================
   Welcome-offer marquee (replaces the footer, all breakpoints)
   ========================================================================== */

.fr-marquee {
  display: flex;
  overflow: hidden;
  background: #000;
  border-top: 2px solid #000;
}

.fr-marquee__group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 16px 18px 16px 18px;
  flex-shrink: 0;
  min-width: 100%;
  animation: fr-marquee-scroll 32s linear infinite;
}

.fr-marquee:hover .fr-marquee__group {
  animation-play-state: paused;
}

.fr-marquee__item {
  color: #fff;
  font-family: Reformasans, sans-serif;
  font-size: 28px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.fr-marquee__item:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.fr-marquee__dot {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

@keyframes fr-marquee-scroll {
  to {
    transform: translateX(calc(-100% - 36px));
  }
}

@media (max-width: 767px) {
  .fr-marquee__item,
  .fr-marquee__dot {
    font-size: 22px;
  }

  .fr-marquee__group {
    gap: 26px;
    padding-top: 13px;
    padding-bottom: 13px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .fr-menu {
    transition: visibility .2s;
  }

  .fr-burger__bar,
  .fr-fab {
    transition: none;
  }

  .fr-marquee {
    overflow-x: auto;
  }

  .fr-marquee__group {
    animation: none;
  }
}
