*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  width: 90%;
  max-width: var(--content-width);
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p {
  margin: 0 0 var(--space-3);
}

/* Site header / nav */
.site-header {
  padding: 32px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-hero-band);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
  transition: box-shadow 180ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header__mascot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.logo-lockup__quills {
  height: 22px;
  width: auto;
}

.logo-lockup__wordmark {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--color-charcoal);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-small);
}

.site-nav a {
  text-decoration: none;
}

/* Site footer */
.site-footer {
  margin-top: var(--space-5);
  padding: var(--space-5) 0 var(--space-6);
  border-top: 1px solid var(--color-charcoal-faint);
  background: var(--color-hero-band);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  row-gap: 12px;
  column-gap: var(--space-3);
  align-items: center;
}

.site-footer__social {
  display: flex;
  gap: var(--space-2);
  justify-self: end;
}

.site-footer__tagline {
  font-size: var(--fs-small);
  color: var(--color-charcoal-muted);
  white-space: nowrap;
  margin: 0;
  justify-self: end;
}

.site-footer__copyright {
  font-size: var(--fs-micro);
  color: var(--color-charcoal-muted);
  margin: 0;
}

@media (max-width: 599px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__social,
  .site-footer__tagline {
    justify-self: start;
  }

  .site-footer__tagline {
    white-space: normal;
  }

  /* Scale down the stacked main/footer spacing so the pre-footer gap
     doesn't read as disproportionate on a narrow column (.section's own
     mobile override lives in components.css, next to its base rule) */
  main {
    padding-bottom: var(--space-4);
  }

  .site-footer {
    margin-top: var(--space-4);
  }
}

