/* ============================================================
   FFSBD — Base layout, typography, header, footer
   ============================================================ */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 39px,
    var(--rule) 39px,
    var(--rule) 40px
  );
  background-attachment: local;
}

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

a { color: var(--stamp); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: var(--step-h1); font-weight: 800; }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

p { margin: 0 0 1.1em; max-width: 40em; }
.lede { font-size: var(--step-lede); color: var(--ink-soft); max-width: 34em; }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--stamp-deep);
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--stamp-deep);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 5rem 0; }
section.tight { padding: 3rem 0; }
.border-top { border-top: 1px solid var(--rule-strong); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6em 1em;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
  display: none;
}
@media (min-width: 640px) { .brand-tag { display: inline; } }

.nav-toggle {
  font-family: var(--font-mono);
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.5em 0.8em;
  cursor: pointer;
  display: none;
}
@media (max-width: 900px) { .nav-toggle { display: inline-block; } }

.site-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a { color: var(--ink); position: relative; padding: 0.2em 0; }
.site-nav a:hover { color: var(--stamp); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--stamp); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--stamp);
}
@media (max-width: 900px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding: 1rem var(--gutter) 1.4rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.9rem; font-size: 0.95rem; }
}

.nav-cta {
  border: 1px solid var(--ink) !important;
  padding: 0.45em 0.9em;
  background: var(--ink);
  color: var(--paper) !important;
}
.nav-cta:hover { background: var(--stamp); border-color: var(--stamp) !important; color: var(--paper) !important; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  background-image: none;
}
.site-footer a { color: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0 2.5rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ochre);
  text-transform: uppercase;
  margin-bottom: 1em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.6em; font-size: 0.92rem; }
.footer-grid a { text-decoration: none; opacity: 0.9; }
.footer-grid a:hover { text-decoration: underline; opacity: 1; }
.footer-brand .brand-mark { color: var(--paper); font-size: 1.9rem; }
.footer-note { font-family: var(--font-mono); font-size: 0.82rem; color: var(--line-on-dark); max-width: 30em; margin-top: 1em; }
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--line-on-dark);
}
