/* Nusu family design system — source of truth (see ../DESIGN.md).
 * Vendored into each site as assets/shared/tokens.css by bin/sync-shared.sh.
 * Per-site accent/highlight values live in each site's assets/site.css —
 * that file is the only place they're defined.
 * Changing the family look = edit here + re-run bin/sync-shared.sh.
 */

/* ── Fonts (self-hosted, OFL) ─────────────────────────────────────────── */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  /* neutrals (family-wide) */
  --paper: #faf9f6;
  --ink: #131c2e;
  --muted: #5a6478;
  --hairline: #e3e0d8;
  --surface-dark: #111827;
  --paper-dark-text: #e8e6e1;

  /* per-site (overridden in site.css) */
  --accent: #10326c;
  --highlight: #b08d3e;

  /* semantic */
  --error: #a32d2d;
  --success: #0f6e56;

  /* type */
  --font-display: "Fraunces", georgia, serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* scale */
  --text-hero: clamp(2.5rem, 5.5vw, 4.25rem);
  --text-h2: clamp(1.65rem, 3vw, 2.1rem);
  --text-h3: 1.25rem;
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-label: 0.8125rem;

  /* spacing (8px base, spacious) */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4.5rem;
  --s7: 7rem;

  --max-width: 1120px;
  --prose-width: 68ch;
  --radius: 2px;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 560; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.3; }
p { max-width: var(--prose-width); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--paper); }

/* ── Shared components ────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  font-size: var(--text-small);
}
.skip-link:focus { left: 0; color: var(--paper); }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.mono-num {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent); /* AA contrast; --highlight is decorative-only (rules, markers) */
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--paper); }

.rule { border: 0; border-top: 1px solid var(--hairline); }

/* header/nav */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; padding-top: var(--s3); padding-bottom: var(--s3); gap: var(--s3); flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.site-nav { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.site-nav a { font-size: var(--text-small); font-weight: 500; color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: var(--paper); text-decoration: none; }

/* sections */
.section { padding: var(--s6) 0; }
.section-head { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: var(--s4); }
.section-head .mono-num { font-size: var(--text-label); }

/* stat band */
.stats { display: flex; gap: var(--s5); flex-wrap: wrap; padding: var(--s4) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stat b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 1.9rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--text-small); color: var(--muted); }

/* numbered editorial rows (services/engagements) */
.rows { display: grid; gap: 0; }
.row { display: grid; grid-template-columns: 4rem 1fr; gap: var(--s3); padding: var(--s4) 0; border-top: 1px solid var(--hairline); }
.row:last-child { border-bottom: 1px solid var(--hairline); }
.row h3 { margin-bottom: var(--s1); }
.row p { color: var(--muted); }

/* cards used sparingly (case studies) */
.case { border-top: 2px solid var(--accent); padding: var(--s3) 0; }
.case h3 { margin-bottom: var(--s1); }
.case p { color: var(--muted); font-size: var(--text-small); }

/* dark band (footer / bridge strips) */
.band-dark { background: var(--surface-dark); color: var(--paper-dark-text); }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p { color: var(--paper-dark-text); }
.band-dark a { color: #fff; }

.band-dark .eyebrow { color: var(--highlight); }

/* footer */
.site-footer { background: var(--surface-dark); color: var(--paper-dark-text); margin-top: var(--s7); }
.site-footer .wrap { padding-top: var(--s5); padding-bottom: var(--s5); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.site-footer a { color: #fff; }
.site-footer .fine { font-size: var(--text-label); color: #9aa3b5; }

/* forms */
input, textarea {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
label { font-size: var(--text-small); font-weight: 600; }

/* about + contact + case layouts (shared across sites; accents come from site.css) */
.about-note { border-left: 2px solid var(--highlight); padding-left: var(--s3); margin: var(--s4) 0; }
.headshot-ph { width: 180px; height: 200px; background: var(--hairline); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--font-mono); font-size: var(--text-label); }
.founder-grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--s5); align-items: start; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
.contact-grid iframe { width: 100%; min-height: 640px; border: 1px solid var(--hairline); border-radius: var(--radius); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.case-list .case { max-width: var(--prose-width); }
.case-list .case p { font-size: var(--text-body); }
.wordmark-mark { color: var(--highlight); }

/* awaiting-materials placeholder (visible in review, must be gone at ship) */
.awaiting {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--error);
  border: 1px dashed var(--error);
  border-radius: var(--radius);
  padding: var(--s2);
  margin: var(--s2) 0;
}

@media (max-width: 820px) {
  .founder-grid, .contact-grid, .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: var(--s1); }
  .stats { gap: var(--s3); }
}
