/* ===============================
   UI TYPOGRAPHY
   =============================== */

.site-header nav,
.site-header nav a,
.site-footer,
.site-footer a,
.site-footer-year {
  font-family: var(--ui-font);
  font-weight: var(--ui-weight);
  font-style: normal;
}

.site-header h1,
.site-header h1 a {
  font-family: var(--logo-font);
  font-weight: var(--ui-weight);
  font-style: normal;
}

/* ===============================
   HEADER
   =============================== */

.site-header {
  width: 100%;
  max-width: none;
  margin: 0;

  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding: var(--header-pad-y) 0;
}

.site-header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--ui-weight);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.site-header h1 a {
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  margin: 0;
  display: flex;
  gap: 35px;
  white-space: nowrap;
}

/* IMPORTANT:
   Keep the small nav link size ONLY on desktop so it can't override the mobile overlay.
*/
@media (min-width: 641px) {
  .site-header nav a,
  .site-header nav .nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: var(--ui-weight);
    font-size: 0.67rem;
    letter-spacing: 0em;
  }

  .site-header nav a:hover,
  .site-header nav .nav-link:hover {
    color: #888888;
  }
}


/* ===============================
   FOOTER
   =============================== */

.site-footer {
  width: 100%;
  margin: 0;

  border-top: 0.5px solid rgba(0, 0, 0, 0.25);
  padding: var(--footer-pad-top) 0
    calc(var(--footer-pad-bottom) + var(--pad-bottom));

  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 48px;
  align-items: end;

  font-size: 0.67rem;
  font-weight: var(--ui-weight);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.footer-center {
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding-left: 56px;
  color: rgba(0, 0, 0, 0.55);
}

.footer-right {
  justify-self: end;
  max-width: 390px;
}

.footer-blurb {
  margin: 0;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.35;
}

.footer-readmore {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 0.5px;
}

.site-footer a,
.footer-link {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.06em;
}

.site-footer .footer-readmore {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 0.5px;
}

.site-footer a:hover,
.footer-link:hover {
  color: var(--text);
}

/* ===============================
   MOBILE HEADER + FOOTER (layout only)
   =============================== */

@media (max-width: 640px) {
  /* Keep header visible/clickable ABOVE the overlay */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1300;

    background: var(--bg);
    padding: var(--header-pad-y) var(--axis-y);
  }

  /* Make sure logo is clickable above everything */
  .site-header h1,
  .site-header h1 a {
    position: relative;
    z-index: 1301;
  }

  /* Mobile footer stacking */
  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 16px;
    align-items: start;
    gap: 20px;
  }

  .footer-center {
    padding-left: 0;
  }

  .footer-right {
    justify-self: start;
    max-width: 60ch;
  }

  .footer-readmore-wrap {
    display: block;
    margin-top: 6px;
  }
}

