/* =========================================================================
   CRO Orgs — Colors & Type
   A subtle Risograph aesthetic: warm paper, muted ink, tactile textures.
   ========================================================================= */

/* ---- Webfonts (Google Fonts substitutes — see README/Type) ---- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Archivo:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ============================================================
     COLOR — Risograph palette pulled from logos & infographics
     ============================================================ */

  /* Paper / neutrals (warm, low-saturation) */
  --paper:        #f7f5f0;   /* primary background — Substack */
  --paper-deep:   #efebe1;   /* a slightly aged paper layer */
  --paper-edge:   #e4ddcd;   /* torn-edge / kraft border */
  --ink-faint:    #d6cfbe;   /* ghost lines, very subtle dividers */

  /* Risograph inks — these are THE 4 brand colors */
  --riso-red:     #c2563e;   /* primary accent — Substack accent */
  --riso-red-deep:#a8472f;   /* hover / pressed */
  --riso-navy:    #2d4a6b;   /* secondary structural ink */
  --riso-navy-deep:#1f3550;
  --riso-ochre:   #c9a24a;   /* tertiary highlight (warm yellow-brown) */
  --riso-teal:    #6a9aa3;   /* quaternary cool note */

  /* Dark ink for type */
  --ink:          #2a2622;   /* near-black, warm-shifted */
  --ink-soft:     #4a4540;
  --ink-mute:     #6b655d;
  --ink-ghost:    #968f83;

  /* ---- Semantic foreground / background ---- */
  --bg:           var(--paper);
  --bg-card:      #fbf9f4;
  --bg-deep:      var(--paper-deep);
  --bg-ink:       var(--riso-navy);          /* dark sections */

  --fg-1:         var(--ink);                /* primary text */
  --fg-2:         var(--ink-soft);           /* body */
  --fg-3:         var(--ink-mute);           /* secondary / meta */
  --fg-4:         var(--ink-ghost);          /* hint / placeholder */
  --fg-on-dark:   var(--paper);

  --accent:       var(--riso-red);
  --accent-deep:  var(--riso-red-deep);
  --accent-fg:    #fbf9f4;                   /* text on accent */

  /* Semantic status (kept Riso, not stoplight bright) */
  --success:      #5e8a5a;
  --warning:      var(--riso-ochre);
  --danger:       var(--riso-red);
  --info:         var(--riso-teal);

  /* Borders */
  --border-1:     #d8d0bd;                   /* default hairline */
  --border-2:     #c8bfa9;                   /* stronger / cards */
  --border-ink:   var(--ink);                /* hand-stamped black */

  /* ============================================================
     TYPE
     - Display: DM Serif Display (substitute for tactile slab/serif headers)
     - Headline / UI: Archivo (bold geometric sans — close to logo "CRO/Orgs")
     - Body: Inter
     - Mono: JetBrains Mono
     ============================================================ */
  --font-display: 'DM Serif Display', 'Times New Roman', Georgia, serif;
  --font-sans:    'Archivo', 'Inter', -apple-system, system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Modular scale — 1.250 (major third) */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --fs-72: 4.5rem;

  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-normal:  1.45;
  --lh-loose:   1.7;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.12em;   /* eyebrow / label CAPS */

  /* ============================================================
     SPACING + RADII + SHADOWS
     ============================================================ */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-8: 48px;
  --sp-10: 64px;
  --sp-12: 96px;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-xl: 14px;
  --r-pill: 999px;

  /* Risograph "ink" shadows — tinted, soft, never bluish-gray */
  --shadow-1: 0 1px 0 rgba(42, 38, 34, 0.06);
  --shadow-2: 0 2px 0 rgba(42, 38, 34, 0.08), 0 1px 2px rgba(42, 38, 34, 0.05);
  --shadow-3: 3px 3px 0 rgba(42, 38, 34, 0.10);   /* hand-stamped offset */
  --shadow-card: 0 1px 0 rgba(42,38,34,0.04), 0 8px 24px -12px rgba(42,38,34,0.18);

  /* "Riso misregister" — for accent layering */
  --riso-misreg-red:  2px 2px 0 rgba(194, 86, 62, 0.35);
  --riso-misreg-navy: -2px 2px 0 rgba(45, 74, 107, 0.30);
}

/* ===========================================================================
   SEMANTIC TYPOGRAPHY
   =========================================================================== */

html, body {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: var(--fs-60);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  margin: 0;
}
h2, .h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: var(--fs-36);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  margin: 0;
}
h3, .h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-20);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-72);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--riso-navy);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--accent);
}

p, .body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin: 0 0 1em;
  text-wrap: pretty;
}
.lede {
  font-family: var(--font-body);
  font-size: var(--fs-20);
  line-height: 1.55;
  color: var(--fg-1);
}
small, .small {
  font-size: var(--fs-14);
  color: var(--fg-3);
}
.meta {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-3);
}

code, kbd, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code {
  background: var(--paper-deep);
  padding: 0.12em 0.4em;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-1);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(194, 86, 62, 0.4);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover {
  color: var(--accent-deep);
  text-decoration-color: var(--accent-deep);
}

hr {
  border: 0;
  border-top: 1px solid var(--border-1);
  margin: var(--sp-6) 0;
}
