/* Plus Jakarta Sans, self-hosted (SIL OFL, see fonts/OFL.txt). Latin subset, variable weight. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Italic-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

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

:root {
  --bg: #f7f5ef;
  --ink: #141612;
  --muted: #5b5f57;
  --rule: #d9d5ca;
  --accent: #1f4d3a;
  --accent-ink: #fff;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111311;
    --ink: #ecebe5;
    --muted: #a3a69d;
    --rule: #2c302b;
    --accent: #7fbf9c;
    --accent-ink: #0d1a13;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

main, .site-header, .site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* Type */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.lede {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 56rem;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

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

/* Skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover { text-decoration: underline; }

#site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

#site-nav a:not(.button) {
  color: var(--ink);
  text-decoration: none;
}

#site-nav a:not(.button):hover { text-decoration: underline; }
#site-nav a:not(.button)[aria-current="page"] { text-decoration: underline; }

.menu-toggle {
  display: none;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

/* Sections */

section, article { margin: 0; }

.band {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.band:last-child { border-bottom: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.hero { padding-top: clamp(3rem, 8vw, 5.5rem); }
.hero .lede { margin-bottom: 1.75rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-head { max-width: 52rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

/* Cards */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.cards > li {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.cards h3 a { color: var(--ink); text-decoration: none; }
.cards h3 a:hover { text-decoration: underline; }
.cards p { color: var(--muted); font-size: 0.98rem; }

/* Numbered steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.steps > li {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.button:hover { text-decoration: underline; }

.button.ghost {
  background: transparent;
  color: var(--accent);
}

#site-nav .button { padding: 0.5rem 1rem; }

/* Status pill */

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* Post list */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.post-list h2, .post-list h3 { font-size: 1.5rem; }
.post-list h2 a, .post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover, .post-list h3 a:hover { text-decoration: underline; }
.post-list time, .post-meta time { color: var(--muted); font-size: 0.95rem; }
.post-list p { color: var(--muted); margin: 0.5rem 0 0; }

.post { max-width: 44rem; }
.post-meta { color: var(--muted); margin-bottom: 2rem; }

/* Environments page */

.jump { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.jump a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }

.env { display: grid; gap: 1.5rem 3rem; scroll-margin-top: 1rem; }
@media (min-width: 900px) {
  .env { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
}
.env h2 { margin-bottom: 0.5rem; }
.env-summary { color: var(--muted); margin-bottom: 1.5rem; }
.env-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li { font-size: 0.88rem; padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }

.env-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: env; }
.env-steps li { counter-increment: env; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem;
  padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.env-steps li:last-child { border-bottom: 1px solid var(--rule); }
.env-steps li::before { content: counter(env, decimal-leading-zero); font-family: var(--display); font-weight: 600; color: var(--accent); }
.env-hard { color: var(--muted); font-size: 0.95rem; margin: 0; }
.env-hard strong { display: block; color: var(--ink); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.3rem; }

/* Definition rows (decisions) */

.decisions {
  border-top: 1px solid var(--rule);
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  font-size: 0.98rem;
}
.decisions strong { font-weight: 600; }

/* CTA band */

.cta-band p { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.3; max-width: 40rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-bottom: 1rem; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 0.4rem; }

/* Mobile nav: hiding is scoped to .js so content works without JS */

@media (max-width: 759px) {
  .menu-toggle { display: block; }

  .js .site-header { flex-wrap: wrap; }
  .js #site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.5rem;
  }
  .js #site-nav a { padding: 0.6rem 0; }
  .js .site-header.open #site-nav { display: flex; }
  .js .site-header.open #site-nav .button { margin-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; }
}

.note { margin-top: 2rem; color: var(--muted); max-width: 44rem; }

main section > p, main article > p, main section > div > p { max-width: 52rem; }
