/* ==========================================================================
   layout.css: site header (template 1480), mobile menu (popup 1907),
   footer B (template 1622). Breakpoints: tablet <= 1024px, mobile <= 767px.
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background-image: linear-gradient(180deg, #000000 0%, rgba(255, 255, 255, 0.17) 100%);
  color: var(--c-white);
}

/* Pages whose first section sits under the header (the old pages used
   negative top margins of about -85px for this). */
.header-overlay .site-header { position: absolute; top: 0; left: 0; right: 0; }

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 33%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  padding: 6px 20px;
}

.site-logo { display: block; justify-self: center; width: 100%; max-width: 380px; }
.site-logo img {
  width: 100%;
  /* The logo artwork is black; a soft light glow keeps it legible on the
     dark header gradient. Remove if the live screenshots show otherwise. */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.55));
}

.main-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0; padding: 0;
  list-style: none;
}
.main-nav__list a {
  display: block;
  padding: 15px;
  color: var(--c-white);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav__list a:hover { color: var(--c-accent); }
.main-nav__list a[aria-current="page"] { color: var(--c-gold); }

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0; padding: 0;
  list-style: none;
}
.social a { display: block; padding: 5px 7px; }
.social img { width: 25px; height: 25px; }

.menu-toggle {
  display: none;
  justify-self: end;
  width: 48px; height: 48px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
}
.menu-toggle svg { width: 30px; height: 30px; fill: currentColor; }

@media (max-width: 1024px) {
  .site-header__inner { grid-template-columns: minmax(0, 1fr) auto; padding-block: 10px 0; }
  .site-logo { grid-column: 1 / -1; max-width: 340px; }
  .main-nav__list { justify-content: flex-start; }
  .main-nav__list a { padding: 12px 10px; font-size: 0.9375rem; }
}

@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: 75% 25%; padding: 10px 16px; }
  .site-logo { grid-column: auto; justify-self: start; max-width: 260px; }
  .main-nav, .site-header .social { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Mobile menu (native <dialog>; Escape closes it) ---------- */
.mobile-menu {
  width: min(380px, 100%);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 20px 24px;
  border: 0;
  background: var(--c-white);
  color: var(--c-ink);
  overflow-y: auto;
}
.mobile-menu::backdrop { background: rgba(0, 0, 0, 0.8); }
.mobile-menu[open] { animation: menu-in 0.35s ease-out; }
@keyframes menu-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mobile-menu__top .mobile-menu__logo { width: 75%; }
.mobile-menu__close {
  width: 48px; height: 48px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  cursor: pointer;
}
.mobile-menu__close svg { width: 32px; height: 32px; fill: currentColor; }

.mobile-menu nav ul { margin: 5px 0 10px; padding: 0; list-style: none; }
.mobile-menu nav li { margin: 0 0 35px; }
.mobile-menu nav li:first-child { margin-top: 30px; }
.mobile-menu nav a {
  color: var(--c-ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-menu nav a:hover, .mobile-menu nav a:focus-visible { color: var(--c-muted); }
.mobile-menu nav a[aria-current="page"] { color: var(--c-black); text-decoration: underline; }

.mobile-menu__social {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 50px 0 0; padding: 0;
  list-style: none;
}
.mobile-menu__social a { display: flex; justify-content: center; padding: 6px; }
.mobile-menu__social img { height: 40px; width: auto; }
/* No dark Twitter/X artwork survived in the backup: the blue bird is turned
   black so it matches the other dark icons in this menu. */
.mobile-menu__social .icon-dark { height: 30px; margin-block: 5px; filter: brightness(0); }
.mobile-menu__copy { margin-top: 10px; text-align: center; font-size: 0.875rem; color: var(--c-ink); }

/* ---------- Footer (footer B, template 1622) ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-ink);
  padding: 10px 0 20px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  max-width: 1140px;
  margin-inline: auto;
  padding: 10px 20px;
}
.site-footer__copy { margin: 0; padding: 10px 0; font-family: var(--font-ui); font-size: 0.8125rem; }
.site-footer__logo { justify-self: center; }
.site-footer__logo img { width: 200px; }

@media (max-width: 1024px) {
  .site-footer { padding: 20px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__copy { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .site-footer { padding: 10px; }
  .site-footer__inner { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .site-footer__spacer { display: none; }
}
