/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 var(--gutter);
}
.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--page-max);
  height: var(--header-h);
  margin: 0 auto;
  padding: 16px 48px;
  border-radius: var(--radius);
  background: var(--header-glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
/* Liquid glass layer (js/glass.js) behind the bar's content. Once the engine is mounted
   it replaces the bar's own tint and blur. */
.header__bar { position: relative; }
.header__bar > :not(.header__glass) { position: relative; z-index: 1; }
.header__glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.header.has-liquid .header__bar {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.nav__link:hover { opacity: 0.6; }
.header__actions { display: flex; align-items: center; gap: 14px; }

/* Language switch */
.lang {
  display: inline-flex;
  height: 31px;
  padding: 1px;
  border: 1px solid var(--grey-blue);
  border-radius: var(--r-pill);
  background: var(--white);
  overflow: hidden;
}
.lang__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  min-width: 50px;
  padding: 0 13px;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  letter-spacing: 4px;
  text-indent: 4px; /* balance the trailing letter-spacing */
  color: var(--soft-black);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang__btn:first-child { border-radius: var(--r-pill) 0 0 var(--r-pill); }
.lang__btn:last-child { border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.lang__btn:hover { background: var(--grey-blue); }
.lang__btn[aria-pressed="true"] { background: var(--soft-black); color: var(--white); }

.menu-toggle { display: none; width: 24px; height: 24px; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

/* Full-screen menu under the header bar (the bar stays on top: z-index -1 inside the header's
   stacking context). Open/close animation in motion.css, driven by .is-open from js/ui.js. */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: calc(var(--header-h) + 48px) 24px 40px;
  background: var(--light-beige);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__nav { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.mobile-menu .nav__link {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--modal-scrim);
}
.scrim[hidden] { display: none; }

/* Page column */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Section cards */
.card {
  border-radius: var(--radius);
  padding: var(--section-pad);
  overflow: hidden;
}
.card--beige { background: var(--light-beige); }
.card--blue { background: var(--light-blue); }
.card--dark { background: var(--soft-black); color: var(--white); }

.section-head { display: flex; flex-direction: column; gap: 12px; }
.section-head--center { align-items: center; text-align: center; }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 24px var(--gutter) 41px;
  color: var(--soft-black-70);
}
.site-footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: 14px;
  text-decoration: none;
  opacity: .8;
  transition: opacity .2s ease;
}
.site-footer__credit:hover,
.site-footer__credit:focus-visible { opacity: 1; }
.site-footer__credit img { display: block; height: 24px; width: auto; }

@media (max-width: 767px) {
  .site-footer { flex-direction: column; text-align: center; }
}

@media (max-width: 1100px) {
  .header__bar { padding: 16px 24px; }
  .nav { gap: 18px; }
}

@media (max-width: 960px) {
  .header { padding: 0; }
  .header__bar { padding: 16px; border-radius: 0 0 var(--radius) var(--radius); }
  /* The bar is flush with the top: lift the glass so its rounded top corners stay off-screen. */
  .header__glass { top: calc(-1 * var(--radius)); }
  .header .nav,
  .header__cta { display: none; }
  .header__actions { gap: 20px; }
  .menu-toggle { display: inline-flex; }
}

@media (min-width: 961px) {
  .header { padding-top: 5px; }
  .mobile-menu, .scrim { display: none !important; }
}
