/* ==========================================================================
   Layout — page gutters, header, main navigation (with the mobile menu
   toggle), and footer.
   ========================================================================== */

/* Page gutters ------------------------------------------------------------ */

/* Backgrounds run edge to edge; content is capped at 1032px and centred,
   with at least 24px either side. */
.section-shell {
  padding-right: max(24px, calc((100% - 1032px) / 2));
  padding-left: max(24px, calc((100% - 1032px) / 2));
}

.section-space {
  padding-top: 110px;
  padding-bottom: 110px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
}

.brand img {
  width: auto;
  height: 46px;
}

/* Navigation -------------------------------------------------------------- */

nav {
  display: flex;
  gap: 32px;
}

nav a {
  color: var(--navy);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 200ms;
}

nav a:hover {
  color: var(--gold);
}

/* Shown only below 760px, where the nav collapses into a drop-down.
   nav-menu.js keeps aria-expanded in sync with the open state. */
.menu-toggle {
  display: none;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 40px;
  padding-bottom: 26px;
  background: var(--navy);
  color: var(--on-dark-muted);
  font-size: 0.82rem;
}

.footer-brand img {
  width: auto;
  height: 42px;
}

.footer-brand:focus-visible,
.footer-bottom a:focus-visible {
  outline-color: var(--focus-on-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 205, 216, 0.25);
  font-size: 0.75rem;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom a:hover {
  color: var(--cream);
}

.footer-bottom .arrow {
  font-size: 0.875rem;
}

/* Responsive -------------------------------------------------------------- */

/* Below this width the nav becomes a drop-down behind the menu toggle. */
@media (max-width: 760px) {
  .section-space {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .brand img {
    height: 36px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--navy);
  }

  .menu-toggle span {
    width: 100%;
    height: 1px;
    background: currentColor;
  }

  /* The two bars cross into an "×" while the menu is open. */
  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  nav {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    box-shadow: 0 8px 10px rgba(28, 42, 74, 0.05);
  }

  nav.is-open {
    display: flex;
  }

  nav a {
    padding: 12px 0;
    font-size: 0.9rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  nav a {
    transition: none;
  }
}
