/* Site chrome: top bar, header, phone menu, footer and breadcrumbs. */

/* --- Top bar --- */

.topbar {
  background-color: var(--accent);
  color: var(--paper);
  font-size: var(--fs-small);
  line-height: 1.3;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding-block: 6px;
}

.topbar__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.topbar__group--end {
  gap: 10px;
  flex-shrink: 0;
}

.topbar__link,
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  text-decoration: none;
}

.topbar__link:hover,
.topbar__phone:hover {
  color: var(--tint-2);
}

.topbar svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.topbar__short {
  display: inline;
}

.topbar__long,
.topbar__email,
.topbar__address,
.topbar__divider {
  display: none;
}

.topbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--paper);
}

.topbar__icon svg {
  width: 18px;
  height: 18px;
}

/* --- Language switch --- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 44px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--tint-2);
  font-weight: 600;
  text-decoration: none;
}

.lang-switch__link:hover {
  color: var(--paper);
}

.lang-switch__link.is-current {
  border-color: var(--paper);
  color: var(--paper);
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.site-header__bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: var(--header-h);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  color: var(--ink);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-toggle__icon--close,
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon--close {
  display: inline-flex;
}

/* --- Wordmark --- */

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark__knot {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
}

.wordmark__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1;
}

.wordmark__name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.wordmark__tag {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

/* The smallest phones keep only the knot and the name. */
@media (max-width: 399px) {
  .wordmark__tag {
    display: none;
  }

  .wordmark__name {
    font-size: 19px;
  }
}

/* --- Book button in the header --- */

.site-header__book {
  justify-self: end;
  min-height: 44px;
  padding: 11px 14px;
  font-size: 14px;
}

.site-header__book-long {
  display: none;
}

.site-header__book-short {
  display: inline;
}

/* --- Desktop navigation --- */

.site-nav--desktop {
  display: none;
}

/* --- Phone menu --- */

.site-nav--phone {
  background-color: var(--paper);
  border-top: 1px solid var(--line);
  padding-block: 8px 20px;
}

.site-nav__link--phone {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}

.site-nav__link--phone[aria-current="page"] {
  color: var(--accent);
}

html.nav-open {
  overflow: hidden;
}

/* --- Footer --- */

.site-footer {
  background-color: var(--night);
  color: var(--paper);
  padding: 64px 0 32px;
}

.site-footer a {
  color: var(--paper);
}

.site-footer a:hover {
  color: var(--tint-2);
}

.site-footer__grid {
  display: grid;
  gap: 32px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

.site-footer__tag {
  font-family: var(--script);
  font-size: 22px;
  font-weight: 500;
  color: var(--tint-2);
}

.site-footer__logo {
  display: block;
  width: 200px;
  height: auto;
  margin-bottom: 12px;
}

.site-footer__title {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tint-2);
}

.site-footer__text {
  margin-bottom: 6px;
  font-size: var(--fs-small);
  color: var(--tint-2);
}

.site-footer__text a {
  color: var(--paper);
}

.site-footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}

/* Hours read as two columns: the day on the left, the times on the right, one day per line. */
.site-footer .hours__list {
  font-size: 13px;
}

.site-footer .hours__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 12px;
}

.site-footer .hours__row dt {
  color: var(--tint-2);
}

.site-footer .hours__row dd {
  margin: 0;
  color: var(--paper);
  text-align: right;
  white-space: nowrap;
}

.site-footer .hours__row.is-today dt,
.site-footer .hours__row.is-today dd {
  color: var(--paper);
}

@media (max-width: 399px) {
  .site-footer .hours__list {
    font-size: 12px;
  }

  /* On the smallest phones the day goes above its times, so nothing is cut off. */
  .site-footer .hours__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .site-footer .hours__row dd {
    text-align: left;
  }
}

.site-footer__button {
  padding: 0;
  color: var(--paper);
  font-size: var(--fs-small);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer__legal {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--tint-2);
}

/* --- Breadcrumbs --- */

.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background-color: var(--paper);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-block: 12px;
  margin: 0 auto;
  list-style: none;
  font-size: var(--fs-small);
  color: var(--soft);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "\203A";
  color: var(--soft);
}

.breadcrumbs__item a {
  color: var(--soft);
}

.breadcrumbs__item a:hover {
  color: var(--accent);
}

/* --- Anchors clear the sticky header --- */

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* --- Tablet --- */

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  /* The hours need the full width at tablet size to keep every time on one line. */
  .site-footer__col--hours {
    grid-column: 1 / -1;
  }
}

/* --- Desktop --- */

@media (min-width: 1024px) {
  .topbar__inner {
    gap: 24px;
    padding-block: 8px;
  }

  .topbar__long {
    display: inline;
  }

  .topbar__short {
    display: none;
  }

  .topbar__email {
    display: inline-flex;
  }

  .topbar__address {
    display: inline;
  }

  .topbar__divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.45);
  }

  .lang-switch__link {
    min-height: 28px;
    min-width: 30px;
  }

  .site-header__bar {
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav--desktop {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .site-nav--desktop .site-nav__link {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
  }

  .site-nav--desktop .site-nav__link:hover {
    color: var(--accent);
  }

  .site-nav--desktop .site-nav__link[aria-current="page"] {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent);
    text-underline-offset: 8px;
  }

  .site-header__book {
    min-height: 48px;
    padding: 14px 24px;
    font-size: 16px;
  }

  .site-header__book-long {
    display: inline;
  }

  .site-header__book-short {
    display: none;
  }

  .wordmark__knot {
    width: 46px;
    height: 46px;
  }

  .wordmark__name {
    font-size: 26px;
  }

  .site-footer {
    padding-top: 64px;
  }

  .site-footer__grid {
    grid-template-columns: 1.1fr 1fr 2.2fr 1fr;
    gap: 32px;
  }

  .site-footer__col--hours {
    grid-column: auto;
  }
}

/* Wider screens: the four menu links get more room. */
@media (min-width: 1280px) {
  .site-nav--desktop {
    gap: 28px;
  }

  .site-nav--desktop .site-nav__link {
    font-size: 15px;
  }
}

/* Back to top: hidden until JavaScript shows it, then fades in after scrolling. */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.back-to-top .icon {
  width: 22px;
  height: 22px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (hover: hover) {
  .back-to-top:hover {
    background: var(--accent-dk);
  }
}

/* On the class page the phone booking bar sits at the bottom, so the button
   moves above it. From 1024 px that bar is gone. */
@media (max-width: 1023px) {
  .theme-class .back-to-top {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 1024px) {
  .back-to-top {
    right: 24px;
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

html.booking-open .back-to-top {
  display: none;
}
