:root {
  --site-header-height: 72px;
  --site-edge: 24px;
}

html { scrollbar-gutter: stable; }

.site-header,
.site-footer,
.mobile-menu {
  font-family: var(--sans);
  line-height: 1.5;
}

.site-header {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  height: var(--site-header-height);
  color: var(--ink);
  background: rgba(244, 239, 229, .94);
  backdrop-filter: blur(20px);
  transition: box-shadow .25s var(--ease);
}

.site-header.scrolled { box-shadow: 0 10px 30px rgba(58, 45, 20, .10); }

.site-header .nav-shell,
.site-footer .container {
  width: min(1140px, calc(100% - 2 * var(--site-edge)));
  margin-inline: auto;
}

.nav-shell {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand strong { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.brand small { display: block; margin-top: 3px; color: #70695e; font-size: 10px; letter-spacing: .02em; white-space: nowrap; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.65vw, 24px);
  margin-left: auto;
}

.desktop-nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.desktop-nav > a:not(.nav-cta) { color: var(--ink-2); }
.desktop-nav > a:not(.nav-cta):hover,
.desktop-nav > a[aria-current] { color: var(--ink); }
.desktop-nav > a[aria-current] { box-shadow: inset 0 -2px var(--gold); }
.desktop-nav > a.nav-cta[aria-current] { color: #241b08; }
.desktop-nav > .nav-cta { padding-inline: 20px; border-radius: 12px; }

.menu-toggle {
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  display: none;
  place-items: center;
  color: var(--ink);
  background: rgba(33, 31, 28, .07);
}

.mobile-menu { display: none; }
.menu-fallback { display: none; }

.site-footer { color: #c9c6bf; background: #0e0f12; }
.footer-main { padding: 44px 0 32px; display: flex; align-items: flex-start; gap: 20px 32px; flex-wrap: wrap; }
.footer-main .brand { margin-right: auto; }
.footer-main .brand strong { color: var(--dark-ink); }
.footer-main .brand small { color: #a4a29d; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-links a,
.footer-record a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.footer-links a { font-size: 13px; }
.footer-links a:hover,
.footer-record a:hover { color: var(--gold); text-decoration-color: currentColor; }

.footer-record {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 22px;
  padding: 6px 0 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #c9c6bf;
  font-size: 13px;
}
.footer-record a { gap: 7px; }
.footer-record img { width: 18px; height: 20px; flex: none; }

.skip-link {
  position: fixed;
  z-index: 200;
  top: -80px;
  left: 16px;
  padding: 10px 16px;
  color: #241b08;
  background: var(--gold);
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

@media (min-width: 761px) and (max-width: 900px) {
  .nav-shell { gap: 16px; }
  .desktop-nav { gap: 12px; }
}

@media (max-width: 760px) {
  :root { --site-header-height: 64px; --site-edge: 20px; }

  .brand small { display: none; }
  .desktop-nav { display: none; }
  .nav-ready .menu-toggle { display: grid; }
  html:not(.nav-ready) .menu-fallback {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: auto;
    padding-inline: 12px;
    border-radius: 9px;
    color: var(--ink);
    background: rgba(33, 31, 28, .07);
    font-size: 14px;
  }
  .mobile-menu {
    position: fixed;
    z-index: 85;
    inset: var(--site-header-height) 0 auto;
    max-height: calc(100dvh - var(--site-header-height));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px var(--site-edge) max(16px, env(safe-area-inset-bottom));
    background: #f4efe5;
    box-shadow: 0 24px 44px rgba(58, 45, 20, .14);
  }
  .mobile-menu.open { display: grid; gap: 3px; }
  .mobile-menu a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding-inline: 14px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-menu a:hover { background: rgba(33, 31, 28, .06); }
  .mobile-menu a[aria-current] { color: var(--gold-deep); background: var(--gold-wash); }
  .mobile-menu .nav-cta { justify-content: center; margin-top: 6px; color: #241b08; background: var(--gold); }
  .mobile-menu .nav-cta:hover { background: #dca742; }
  .footer-main { flex-direction: column; align-items: stretch; padding: 32px 0 20px; }
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
    gap: 4px 12px;
  }
  .footer-links a {
    padding-inline: 10px;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
  }
  .footer-links a:active { background: rgba(255, 255, 255, .09); }
}
