/* Givework — shared chrome. Loaded by every page (index, volunteers, nonprofits).
   Design tokens + the bits that are identical site-wide: header, footer, buttons,
   the marquee strip, section heads, and the numbered Bauhaus step badges. Page-
   specific layout lives inline in each page (and in persona.css for the two
   persona landing pages). Values here are authoritative — match the homepage. */

:root {
  --paper: #f4f1e6;
  --ink:   #161310;
  --red:   #e1342b;
  --blue:  #21449c;
  --yellow:#f3c20a;
  --line: 3px solid var(--ink);
  --gut: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* belt-and-suspenders against any stray horizontal scroll */
}
h1, h2, h3, h4 { overflow-wrap: break-word; }
a { color: inherit; }
.mono { font-family: 'Space Mono', ui-monospace, monospace; }

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

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- header ---------- */
header { border-bottom: var(--line); }
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gut);
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand .glyph { display: block; }
.brand .name {
  font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; text-transform: uppercase;
}
nav { display: flex; gap: 1.6rem; align-items: center; }
nav a {
  text-decoration: none; font-family: 'Space Mono', monospace;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
nav a:hover { border-color: var(--red); }
nav .cta {
  background: var(--ink); color: var(--paper); border: var(--line);
  padding: .55rem .9rem; letter-spacing: .1em;
}
nav .cta:hover { background: var(--yellow); color: var(--ink); border-color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'Space Mono', monospace; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .85rem 1.2rem; text-decoration: none; border: var(--line); font-weight: 700;
  transition: transform .04s ease;
}
.btn:active { transform: translate(2px, 2px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--paper); color: var(--ink); }
.btn--red  { background: var(--red); color: #fff; }
.btn--red:hover  { background: var(--paper); color: var(--ink); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- marquee strip ---------- */
.strip {
  background: var(--ink); color: var(--paper);
  font-family: 'Space Mono', monospace; text-transform: uppercase;
  letter-spacing: .2em; font-size: .76rem;
  border-bottom: var(--line);
  overflow: hidden; white-space: nowrap;
}
.strip .run { display: inline-block; padding: .7rem 0; animation: slide 26s linear infinite; }
.strip .run span { padding: 0 1.4rem; }
.strip .run b { color: var(--yellow); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- section heads ---------- */
.section-head { display:flex; align-items:baseline; gap:1rem; margin-bottom: 2.5rem; }
.section-head h3 { font-size: clamp(1.6rem,3vw,2.4rem); text-transform: uppercase; letter-spacing:-.02em; margin:0; font-weight:700; }

/* ---------- numbered step badges (Bauhaus: red circle / blue square / yellow triangle) ---------- */
.step { display:grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid rgba(22,19,16,.18); align-items:start; }
.step:last-child { border-bottom: none; }
.step .n { width:54px; height:54px; display:grid; place-items:center; border: var(--line); font-family:'Space Mono',monospace; font-weight:700; font-size:1.1rem; }
.step .n--circle, .step .n--square, .step .n--tri { border: none; }
.n--circle { background: var(--red);    color:#fff; border-radius:50%; }
.n--square { background: var(--blue);   color:#fff; }
.n--tri    { background: var(--yellow); color: var(--ink);
             clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.step .n--tri { align-items: end; padding-bottom: 7px; }
.step h4 { margin:.1rem 0 .3rem; font-size:1.15rem; text-transform:uppercase; letter-spacing:-.01em; font-weight:600; }
.step p { margin:0; font-weight:300; font-size:.98rem; }

/* ---------- footer ---------- */
footer { border-top: var(--line); }
footer .wrap { display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; padding: 1.6rem var(--gut); align-items:center; }
footer .mono { font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; }
footer a { text-decoration:none; }
footer a.mail { border-bottom:2px solid var(--red); }

/* ---------- CLI code block (shared by the homepage dev card + volunteer quickstart) ---------- */
/* Common look lives here; each page sets only its own font-size/padding inline,
   since the homepage card sits in a narrower column than the quickstart. */
pre.cli {
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
  font-family: 'Space Mono', ui-monospace, monospace; line-height: 1.7;
  margin: 0; overflow-x: auto; white-space: pre;
}
pre.cli .cli-c { color: var(--yellow); }

/* ---------- responsive: tablet ---------- */
@media (max-width: 820px) {
  nav .navlink { display: none; }
  /* Wrap CLI lines on narrow screens so a fixed `white-space: pre` line can't
     push <body> past the viewport. */
  pre.cli { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* ---------- responsive: phone ---------- */
@media (max-width: 560px) {
  :root { --gut: 1.15rem; }
  .bar { padding-top: .9rem; padding-bottom: .9rem; }
  .brand .name { font-size: 1.2rem; }
  .brand .glyph { width: 32px; height: 32px; }
  nav { gap: .6rem; }
  nav .cta { font-size: .6rem; padding: .45rem .6rem; letter-spacing: .04em; }
  .section-head { flex-direction: column; align-items: flex-start; gap: .5rem; margin-bottom: 1.8rem; }
  .step { grid-template-columns: 46px 1fr; gap: .8rem; }
  .step .n { width: 44px; height: 44px; font-size: .95rem; }
  footer .wrap { flex-direction: column; align-items: flex-start; gap: .8rem; }
}
