/* ============================================================
   THE UNFINISHED WORK — Foundations: space, radius, shadow,
   borders, motion, and a handful of base components.
   Load AFTER colors_and_type.css.
   ============================================================ */

:root {
  /* ---------- Spacing (8pt base, civic-generous) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ---------- Radii — restrained. Civic, not bubbly. ---------- */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;   /* default control radius */
  --radius-lg: 10px;
  --radius-pill: 999px;
  --radius-0: 0px;    /* "stamp" mode: hard square corners */

  /* ---------- Borders ---------- */
  --border-hair: 1px solid var(--border);
  --border-rule: 2px solid var(--ink);
  --border-keyline: 3px solid var(--brick-600);

  /* ---------- Shadows — low, warm, paper-on-paper.
     Tinted with navy rather than neutral grey. ---------- */
  --shadow-xs: 0 1px 0 rgba(18,48,63,0.06);
  --shadow-sm: 0 1px 2px rgba(18,48,63,0.10), 0 1px 1px rgba(18,48,63,0.06);
  --shadow-md: 0 4px 14px rgba(18,48,63,0.10), 0 2px 4px rgba(18,48,63,0.06);
  --shadow-lg: 0 16px 40px rgba(18,48,63,0.14), 0 4px 10px rgba(18,48,63,0.08);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.5);

  /* ---------- Motion — deliberate, civic, no bounce ---------- */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);  /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);    /* @kind other */
  --dur-fast: 120ms;   /* @kind other */
  --dur-base: 200ms;   /* @kind other */
  --dur-slow: 360ms;   /* @kind other */

  /* ---------- Containers ---------- */
  --container-prose: 68ch;
  --container-page: 1200px;
}

/* ---------- Base reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 13px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--cream);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--primary-hover); }
.btn:active { background: var(--primary-press); transform: translateY(1px); box-shadow: var(--shadow-xs); }
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--accent:active { background: var(--accent-press); }

.btn--outline {
  background: transparent;
  color: var(--navy-700);
  border-color: var(--navy-700);
  box-shadow: none;
}
.btn--outline:hover { background: var(--navy-700); color: var(--cream); }

.btn--ghost {
  background: transparent; color: var(--ink); border-color: transparent; box-shadow: none;
}
.btn--ghost:hover { background: rgba(18,48,63,0.06); }

.btn--lg { font-size: var(--text-base); padding: 16px 30px; }
.btn--sm { font-size: var(--text-xs); padding: 9px 14px; }

/* "Stamp" CTA — hard corners, uppercase, the poster voice */
.btn--stamp {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 800;
  background: var(--accent);
  color: var(--cream);
  border-color: var(--barn-900);
}

/* ============================================================
   CARDS / SURFACES
   ============================================================ */
.card {
  background: var(--bg-elevated);
  border: var(--border-hair);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}
.card--flat { box-shadow: none; }
.card--field {           /* red poster field card */
  background: var(--bg-field);
  color: var(--fg-on-red);
  border: none;
}
/* document card — top keyline, square, ledger feel */
.card--document {
  border-radius: var(--radius-xs);
  border: var(--border-hair);
  border-top: var(--border-keyline);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   BADGES / CHIPS / PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--navy-700);
  color: var(--cream);
}
.badge--outline { background: transparent; color: var(--navy-700); box-shadow: inset 0 0 0 1.5px var(--navy-700); }
.badge--red { background: var(--brick-600); }
.badge--steel { background: var(--steel-400); color: var(--navy-900); }
.badge--head { background: var(--head); color: #fff; }
.badge--heart { background: var(--heart); color: var(--ink); }
.badge--hands { background: var(--hands); color: #fff; }
.badge--renew { background: var(--renew); color: #fff; }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.field {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--paper-white);
  border: 1.5px solid var(--stone-300);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field::placeholder { color: var(--ink-faint); }
.field:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(124,155,171,0.4); }

/* ============================================================
   DIVIDERS / FLOURISH
   ============================================================ */
.rule { border: none; border-top: 2px solid var(--ink); }
.rule--hair { border-top: 1px solid var(--border); }
.rule--stars {            /* three-star civic divider */
  border: none; text-align: center; color: var(--brick-600);
  font-size: var(--text-sm); letter-spacing: 0.5em;
}
.rule--stars::before { content: "★ ★ ★"; }
