/* Shared landing and donation page header/footer. Keep this as the single source of truth. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100px;
  align-items: center;
  border-bottom: 1px solid var(--border, var(--line));
  background: var(--background, var(--paper));
}

.site-header .site-wrap,
.footer .site-wrap {
  width: min(1500px, 86%);
  margin-inline: auto;
}

.header-inner {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 220px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

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

.nav-link {
  position: relative;
  padding-block: 12px;
  color: var(--foreground, var(--ink));
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.nav-link:hover::after,
.nav-link.active::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--primary, var(--accent));
  content: "";
}

.site-header .button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.site-header .button:hover {
  transform: translateY(-1px);
}

.site-header .button svg {
  width: 17px;
  height: 17px;
}

.site-header .button-donate {
  padding: 0 19px;
  background: var(--primary, var(--accent));
  color: #fff;
}

.site-header .button-donate:hover {
  background: var(--primary-dark, #ca5a24);
}

.mobile-toggle,
.mobile-nav {
  display: none;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--foreground, var(--ink));
  cursor: pointer;
}

.icon-button:hover {
  background: var(--muted);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.site-header .mobile-toggle {
  display: none;
}

.footer {
  padding: 52px 0 24px;
  border-top: 1px solid var(--border, var(--line));
  background: #fff;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.8fr);
  gap: 72px;
  padding-bottom: 36px;
}

.footer-copy {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--muted-foreground, var(--muted));
  font-size: 15px;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-links > div {
  min-width: 0;
}

.footer-links h3 {
  margin: 0 0 16px;
  color: var(--foreground, var(--ink));
  font-size: 15px;
  font-weight: 750;
}

.footer-links a {
  display: block;
  margin-bottom: 12px;
  color: var(--muted-foreground, var(--muted));
  font-size: 14px;
  line-height: 1.55;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border, var(--line));
  color: var(--muted-foreground, var(--muted));
  font-size: 13px;
}

@media (min-width: 801px) and (max-width: 1100px) {
  .site-header .site-wrap,
  .footer .site-wrap {
    width: calc(100% - 64px);
  }

  .desktop-nav {
    gap: 16px;
  }
}

@media (max-width: 800px) {
  .site-header {
    height: 80px;
  }

  .site-header .site-wrap,
  .footer .site-wrap {
    width: calc(100% - 40px);
  }

  .desktop-nav,
  .site-header .header-donate {
    display: none;
  }

  .site-header .mobile-toggle {
    display: grid;
  }

  .mobile-toggle[aria-expanded="true"] .menu-icon,
  .mobile-toggle[aria-expanded="false"] .close-icon {
    display: none;
  }

  .mobile-nav:not([hidden]) {
    position: absolute;
    top: 60px;
    right: -20px;
    left: -20px;
    display: grid;
    max-height: calc(100dvh - 80px);
    gap: 2px;
    overflow-y: auto;
    padding: 16px 24px 22px;
    border-bottom: 1px solid var(--border, var(--line));
    background: var(--background, var(--paper));
    box-shadow: var(--image-shadow, 0 14px 36px rgb(38 33 47 / 8%));
  }

  .mobile-nav .nav-link {
    padding-block: 12px;
    font-size: 14px;
  }

  .mobile-nav .button {
    display: inline-flex;
    margin-top: 6px;
  }

  .footer {
    padding: 44px 0 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .footer-copy {
    font-size: 14px;
  }

  .footer-links h3 {
    font-size: 14px;
  }

  .footer-links a {
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    font-size: 12px;
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .site-header .site-wrap,
  .footer .site-wrap {
    width: calc(100% - 32px);
  }

  .header-inner {
    gap: 8px;
  }
}
