/* Largo ai Giovani — Design Tokens
   Manifesto paperback. Jet-black surface, chalk-white type, signal-red accent.
   The book cover is the brand: condensed bold caps, stark photography, black field.

   Type system:
     — Archivo Narrow (700/800) for display — condensed, loud, cover-matched.
     — Söhne / Inter Tight for UI & body — neutral grotesk, tight tracking.
     — JetBrains Mono for metadata, numerals, editorial tags.
*/

@import url('https://fonts.googleapis.com/css2?family=Archivo+Narrow:wght@500;600;700&family=Archivo+Black&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ───── Color — black field, chalk, signal ───── */
  --black:        #000000;     /* true black, like cover */
  --ink:          #0B0B0B;     /* body field, near-true */
  --ink-2:        #141414;     /* panel, card */
  --ink-3:        #1E1E1E;     /* raised card */
  --ink-4:        #2A2A2A;     /* hairline, divider */

  --chalk:        #F5F4F0;     /* primary foreground, a hair off-white */
  --chalk-2:      #D8D6CF;     /* secondary text */
  --chalk-3:      #8A8780;     /* muted metadata */
  --chalk-4:      #52504A;     /* faint, captions on black */

  --rule:         #2A2A2A;     /* hairlines on black */
  --rule-bright:  #F5F4F0;     /* bold rules on black */

  /* Inverted (rare — the one "paper" page per design for contrast) */
  --paper:        #F5F4F0;
  --paper-2:      #E8E5DB;
  --ink-on-paper: #0B0B0B;

  /* ───── Signal — hot red (not terracotta, not warm) ───── */
  --signal:       #E63224;     /* post-it red, agit-prop */
  --signal-deep:  #B71F14;     /* hover / pressed */
  --signal-soft:  rgba(230, 50, 36, 0.15);

  /* Secondary accent — cold yellow, used for single highlight/marker only */
  --marker:       #F3E600;     /* fluorescent highlighter */

  /* ───── Semantic ───── */
  --bg:           var(--black);
  --fg:           var(--chalk);
  --fg-2:         var(--chalk-2);
  --fg-3:         var(--chalk-3);
  --fg-4:         var(--chalk-4);
  --accent:       var(--signal);
  --accent-deep:  var(--signal-deep);
  --accent-soft:  var(--signal-soft);
  --accent-wash:  var(--signal-soft);

  /* Legacy token aliases — previously warm, now remapped to new system so we don't
     have to rewrite every page. */
  --paper-deep:   var(--ink-2);
  --paper-soft:   var(--ink-2);
  --paper-on-ink: var(--chalk);
  --paper-on-ink-muted: var(--chalk-3);
  --ink-bg:       var(--black);
  --ink-bg-soft:  var(--ink-2);
  --ink-soft:     var(--chalk-2);
  --ink-muted:    var(--chalk-3);
  --ink-faint:    var(--chalk-4);
  --rule-soft:    var(--ink-4);
  --rule-on-ink:  var(--ink-4);

  /* ───── Type families ───── */
  --font-display: 'Archivo Narrow', 'Oswald', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
  --font-sans:    'Inter Tight', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
  /* Backwards compat: serif token now maps to display grotesk — no Fraunces anywhere. */
  --font-serif:   var(--font-display);

  /* ───── Scale ───── */
  --fs-display:   clamp(64px, 10vw, 160px);    /* poster-size */
  --fs-h1:        clamp(44px, 6.5vw, 96px);
  --fs-h2:        clamp(32px, 4.2vw, 60px);
  --fs-h3:        clamp(22px, 2.4vw, 32px);
  --fs-h4:        18px;
  --fs-lede:      clamp(18px, 1.5vw, 22px);
  --fs-body:      17px;
  --fs-body-sm:   15px;
  --fs-ui:        14px;
  --fs-caption:   12px;
  --fs-eyebrow:   11px;
  --fs-micro:     10px;

  /* ───── Line height + tracking ───── */
  --lh-display:   0.88;
  --lh-title:     0.94;
  --lh-h:         1.05;
  --lh-lede:      1.4;
  --lh-body:      1.6;
  --lh-ui:        1.35;

  --tracking-display: -0.02em;
  --tracking-title:   -0.015em;
  --tracking-body:    0;
  --tracking-eyebrow: 0.22em;
  --tracking-mono:    0.04em;

  /* ───── Spacing (8pt) ───── */
  --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;
  --s-11: 160px;

  /* ───── Layout ───── */
  --page-max:     1280px;
  --reading-max:  680px;
  --gutter:       clamp(20px, 5vw, 48px);

  /* ───── Radii — zero. this is paperback, not app. ───── */
  --r-0: 0;
  --r-1: 0;
  --r-2: 0;
  --r-pill: 0;

  /* ───── Shadows — basically none. ───── */
  --shadow-book: 0 0 0 1px rgba(255,255,255,0.04), 0 30px 80px rgba(0,0,0,0.6);
  --shadow-card: 0 0 0 1px var(--ink-4);
  --shadow-lift: 0 0 0 1px var(--chalk);

  /* ───── Motion ───── */
  --ease-out:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:     120ms;
  --dur:          200ms;
  --dur-slow:     360ms;
}

/* ───── Base ───── */
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--signal); color: var(--chalk); }

/* ───── Headings — condensed grotesk, ALL-CAPS by default for display tiers ───── */
.h-display, h1.display, .display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  color: var(--fg);
  text-transform: uppercase;
  margin: 0;
}

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: var(--lh-title);
  letter-spacing: var(--tracking-title);
  color: var(--fg);
  text-transform: uppercase;
  margin: 0;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-h);
  letter-spacing: -0.012em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 0;
}

.h3, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.008em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 0;
}

.h4, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--fg);
  margin: 0;
}

.lede {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  letter-spacing: -0.005em;
  color: var(--fg-2);
  text-transform: none;
}

.body, p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  color: var(--fg-2);
}

.body-serif {
  /* No serif in this system — render as quality sans body copy at reading size */
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  letter-spacing: -0.005em;
}

.caption {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1.55;
  color: var(--fg-3);
  letter-spacing: var(--tracking-mono);
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  line-height: 1;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-3);
}

.eyebrow-accent, .eyebrow.accent { color: var(--signal); }

.pullquote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.05;
  color: var(--fg);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* No drop caps — this isn't that kind of book */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.6em;
  line-height: 0.86;
  float: left;
  padding: 0.06em 0.1em 0 0;
  color: var(--signal);
  text-transform: uppercase;
}

.num, .tabular { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ───── Rules & hairlines ───── */
.rule       { border: 0; border-top: 1px solid var(--rule); height: 0; }
.rule-thick { border: 0; border-top: 3px solid var(--chalk); height: 0; }
.rule-accent{ border: 0; border-top: 3px solid var(--signal); width: 56px; height: 0; }

/* ───── Links ───── */
a { color: var(--fg); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--signal); }
.link-accent { color: var(--signal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link-accent:hover { color: var(--signal-deep); }

/* ───── Utility — marker (highlighter effect on a word/phrase) ───── */
.marker {
  background: linear-gradient(0deg, var(--signal) 0%, var(--signal) 100%);
  background-size: 100% 0.35em;
  background-repeat: no-repeat;
  background-position: 0 88%;
  padding: 0 0.05em;
  color: var(--chalk);
}
.marker-yellow {
  background: var(--marker);
  color: var(--black);
  padding: 0 0.12em;
}

/* Number/numeral big-block utility */
.numeral-block {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 11vw, 180px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--signal);
  font-feature-settings: "tnum";
}
