/* ============================================================
   Triangulator — Colors & Type foundation
   High-contrast ink on cream, one bold accent.
   Editorial serif + grotesque sans + mono metadata.
   ============================================================ */

/* --- Local font files (self-hosted) --- */
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces.ttf') format('truetype-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-Italic.ttf') format('truetype-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/Newsreader.ttf') format('truetype-variations'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/Newsreader-Italic.ttf') format('truetype-variations'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('fonts/InterTight.ttf') format('truetype-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('fonts/InterTight-Italic.ttf') format('truetype-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/JetBrainsMono.ttf') format('truetype-variations'); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/JetBrainsMono-Italic.ttf') format('truetype-variations'); font-weight: 100 800; font-style: italic; font-display: swap; }
/* Instrument Serif — still via Google; not provided as file */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* ====== COLOR — Ink & Paper =================================== */
  /* Paper — NEWSPRINT, not cream. Real newsprint is a cool-warm grey,
     faintly green-grey under light. Cream is what people imagine
     newsprint looks like; this is what it actually looks like. The
     distinction is most of the difference between "designed" and
     "generated". */
  --paper:         #F2F1EC;   /* primary bg — newsprint grey-white */
  --paper-2:       #FFFEFB;   /* card stock — pops FORWARD off the ground */
  --paper-3:       #E6E4DC;   /* tonal fill, chip bg, quiet blocks */
  --paper-deep:    #D3D0C5;   /* deep tone, rare */

  /* Ink — near-black with a green-grey cast, like real black ink dried
     on absorbent stock. Never pure #000, never warm brown. */
  --ink:           #16150F;   /* body + headline ink */
  --ink-2:         #3A382E;   /* secondary fg */
  --ink-3:         #6B6758;   /* tertiary, metadata */
  --ink-4:         #9A9584;   /* hint / placeholder */
  --ink-line:      #CFCBBC;   /* hairline rules */

  /* ====== COLOR — The press (three inks, and that's the whole shop) ==
     A risograph shop runs a handful of drums. Fluorescent pink is the
     signature riso ink — it is what zines and alt-weeklies actually
     printed with, and it is friendly without being cute. Blue is the
     second drum. Black is the third. There is no fourth. */

  /* Drum 1 — fluoro pink. THE accent. */
  --pink:          #FF3D8B;
  --pink-ink:      #D6206C;   /* pressed / hover-deep */
  --pink-soft:     #FFD6E6;   /* tint */
  --pink-wash:     #FFEDF4;   /* very light tint */

  /* Drum 2 — riso blue. Links, day trips, cool counterweight. */
  --blue:          #2B4FD8;
  --blue-ink:      #1D39A8;
  --blue-soft:     #D6DEFC;
  --blue-wash:     #EBEFFE;

  /* Overprint — where pink and blue overlap on press. Use for the rare
     third state (a selected+featured chip, a two-ink duotone). */
  --overprint:     #8B2FA8;

  /* --- Deprecated aliases (old tomato/category ramp). Kept so nothing
         breaks; do NOT reach for these in new work. --- */
  --tomato:        var(--pink);
  --tomato-ink:    var(--pink-ink);
  --tomato-soft:   var(--pink-soft);
  --tomato-wash:   var(--pink-wash);

  /* ====== COLOR — Semantic ====================================== */
  --fg-1:          var(--ink);
  --fg-2:          var(--ink-2);
  --fg-3:          var(--ink-3);
  --fg-4:          var(--ink-4);
  --bg-1:          var(--paper);
  --bg-2:          var(--paper-2);
  --bg-3:          var(--paper-3);
  --accent:        var(--pink);
  --accent-ink:    var(--pink-ink);
  --accent-soft:   var(--pink-soft);
  --accent-wash:   var(--pink-wash);
  --line:          var(--ink-line);
  --rule:          var(--ink);             /* heavy editorial rule */
  --focus-ring:    var(--blue);

  --success:       #2F7D4F;
  --warning:       #B07A12;
  --danger:        var(--pink-ink);

  /* ====== TYPE — Families ======================================= */
  /* Editorial serif display — Fraunces (warm, a little wonky) */
  --font-display:  'Fraunces', 'Times New Roman', Georgia, serif;
  /* Editorial text serif — Newsreader (for body long-form, quotes) */
  --font-serif:    'Newsreader', 'Times New Roman', Georgia, serif;
  /* Body/UI grotesque — Inter Tight as Söhne/GT America substitute */
  --font-sans:     'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  /* Mono — JetBrains Mono for metadata, datelines, tickers */
  --font-mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* Italic display — Instrument Serif for pull-quote flourishes */
  --font-flourish: 'Instrument Serif', Georgia, serif;

  /* ====== TYPE — Scale (editorial; big swings) ================== */
  --step--2: clamp(0.72rem, 0.70rem + 0.1vw, 0.78rem); /* @kind other */
  --step--1: clamp(0.82rem, 0.80rem + 0.1vw, 0.88rem); /* @kind other */
  --step-0:  clamp(0.95rem, 0.93rem + 0.1vw, 1.02rem); /* @kind other */
  --step-1:  clamp(1.10rem, 1.06rem + 0.2vw, 1.22rem); /* @kind other */
  --step-2:  clamp(1.30rem, 1.24rem + 0.3vw, 1.48rem); /* @kind other */
  --step-3:  clamp(1.60rem, 1.50rem + 0.5vw, 1.88rem); /* @kind other */
  --step-4:  clamp(2.00rem, 1.80rem + 1.0vw, 2.50rem); /* @kind other */
  --step-5:  clamp(2.60rem, 2.20rem + 2.0vw, 3.60rem); /* @kind other */
  --step-6:  clamp(3.40rem, 2.80rem + 3.0vw, 5.20rem); /* @kind other */
  --step-7:  clamp(4.40rem, 3.40rem + 5.0vw, 7.40rem); /* @kind other */

  /* ====== SPACE ================================================= */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* ====== RADIUS (mostly sharp — this is print-inspired) ======== */
  --r-0: 0px;       /* default — we prefer hard corners */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;       /* soft affordances (buttons, chips) */
  --r-4: 14px;
  --r-pill: 999px;

  /* ====== BORDERS =============================================== */
  --bw-hair: 1px; /* @kind other */
  --bw-rule: 2px; /* @kind other */
  --bw-heavy: 3px; /* @kind other */
  --bw-slab: 6px; /* @kind other */

  /* ====== SHADOWS ==============================================
     Offset shadows are a garnish, not a system. Applied to every card
     they read as a template. Reserve --shadow-1 for the ONE element
     on a page that needs to lift; leave everything else flat. */
  --shadow-1: 3px 3px 0 0 var(--ink);                   /* riso offset */
  --shadow-2: 5px 5px 0 0 var(--ink);
  --shadow-soft: 0 1px 2px rgba(22, 21, 15, 0.08), 0 2px 8px rgba(22, 21, 15, 0.06);

  /* ====== MOTION ================================================ */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.5, 0, 0.2, 1); /* @kind other */
  --dur-1: 120ms; /* @kind other */
  --dur-2: 200ms; /* @kind other */
  --dur-3: 320ms; /* @kind other */

  /* ====== Z-INDEX =============================================== */
  --z-sticky: 10; /* @kind other */
  --z-nav: 20; /* @kind other */
  --z-overlay: 40; /* @kind other */
  --z-modal: 50; /* @kind other */
  --z-toast: 60; /* @kind other */
}

/* ============================================================
   Base / reset-ish
   ============================================================ */
html {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  line-height: 1.5;
  /* A fine dot screen — what actually sits under printed matter.
     Replaces the soft radial "warmth" washes, which are a tell. */
  background-color: var(--bg-1);
  background-image: radial-gradient(var(--ink-line) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

/* ============================================================
   Semantic text styles — use these classes OR element tags
   ============================================================ */

/* — Hero / masthead — Fraunces, optical size cranked, tight tracking */
.t-masthead, .t-hero {
  font-family: var(--font-display);
  font-size: var(--step-7);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.028em;
  /* SOFT/WONK deliberately at 0 — the wonk axes are what make this face
     read as generated "warmth". Set straight, it's just a good serif. */
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  color: var(--ink);
  text-wrap: balance;
}

h1, .t-h1 {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  margin: 0 0 var(--s-4);
  color: var(--ink);
  text-wrap: balance;
}

h2, .t-h2 {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.016em;
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
  margin: 0 0 var(--s-3);
  color: var(--ink);
  text-wrap: balance;
}

h3, .t-h3 {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  margin: 0 0 var(--s-3);
  color: var(--ink);
}

h4, .t-h4 {
  font-family: var(--font-sans);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-2);
  color: var(--ink);
}

/* — Long-form reading — Newsreader, generous leading */
.t-prose, .t-read {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
  font-variation-settings: "opsz" 18;
}

.t-prose p { margin: 0 0 var(--s-4); }
.t-prose em { font-family: var(--font-flourish); font-size: 1.05em; }

/* — Body — default sans */
p, .t-body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 var(--s-3);
}

.t-lede {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--ink);
  font-variation-settings: "opsz" 24;
  font-weight: 400;
}

/* — Metadata: dateline, venue, tags — mono caps */
.t-dateline, .t-meta {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.t-kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pink-ink);
}

.t-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* — Small print — classifieds footer */
.t-small, small {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  line-height: 1.35;
  color: var(--ink-3);
}

/* — Labels */
.t-label {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-2);
}

/* — Pull-quote */
.t-quote {
  font-family: var(--font-flourish);
  font-style: italic;
  font-size: var(--step-4);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* — Code / data */
code, .t-code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-3);
  padding: 1px 4px;
  border-radius: var(--r-2);
  color: var(--ink);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}
a:hover {
  color: var(--blue);
}

hr {
  border: 0;
  border-top: var(--bw-rule) solid var(--ink);
  margin: var(--s-6) 0;
}

::selection {
  background: var(--pink);
  color: var(--paper-2);
}
