/* ==========================================================================
   layout.css — page container, site header, section rhythm, footer
   Structural only. Anything that is a reusable piece of UI lives in
   components.css instead.
   ========================================================================== */

/* --- Container ----------------------------------------------------------- */
.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}


/* --- Site header --------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(19, 17, 16, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}

/* Added by nav.js once the page has scrolled */
.site-header.is-stuck { border-bottom-color: var(--line-soft); }

.site-header__bar {
  position: relative;
  max-width: var(--measure);
  margin-inline: auto;
  padding: .85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__mark {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header__mark span { color: var(--gold); }

.site-nav { display: flex; gap: 1.4rem; }

.site-nav a {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-dim);
  text-decoration: none;
  transition: color .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--text); }

/* Reading-progress hairline, width set by nav.js */
.site-header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--gold);
}

/* The nav labels don't fit on small screens. The page is short enough to
   scroll, so they're hidden rather than replaced with a burger menu. */
@media (max-width: 640px) {
  .site-nav { display: none; }
}


/* --- Section rhythm ------------------------------------------------------
   One rule sets vertical spacing for every section. Do not add
   padding-block to individual sections — change it here instead. */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.section--ruled { border-top: 1px solid var(--line-soft); }


/* --- Footer -------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-block: 4.5rem 3rem;
}

.site-footer__colophon {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--muted-dim);
}
