/* ============================================================
   The Josaphine Collective — Color & Type Tokens
   ------------------------------------------------------------
   Sampled directly from the brand mark. The palette is warm,
   paper-based, and deliberately quiet — colors are used as
   tones, never as accents-for-attention.
   ============================================================ */

/* -------- Webfonts (with Google Fonts fallbacks) -------------
   The brand wordmark is a wide, classical, slightly humanist
   serif with high stroke contrast — closest open-source match
   is Cormorant Garamond (display) paired with EB Garamond
   (body). For UI labels & data we use Inter, kept understated.
   FLAGGED: these are substitutions. If the Collective owns a
   licensed face (e.g. Trajan, Adobe Garamond, Sangbleu, GT
   Sectra), please supply the .woff2 files in /fonts.
   ----------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,300;8..60,400;8..60,500;8..60,600&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* ---------- Paper & ink (neutrals) ---------- */
  --paper:        #FBF7ED;   /* primary background — warm cream  */
  --paper-2:      #F5EFE0;   /* secondary surfaces, callouts     */
  --paper-3:      #ECE4D1;   /* deep cream — section dividers    */
  --paper-edge:   #DDD3BC;   /* hairline borders on paper        */

  --ink:          #2A2724;   /* primary body text                */
  --ink-2:        #4A4640;   /* secondary text                   */
  --ink-3:        #6B665E;   /* tertiary, captions               */
  --ink-4:        #96928B;   /* wordmark grey, muted labels      */
  --ink-5:        #BFBAB0;   /* placeholder, disabled            */

  /* ---------- Rose (signature) ---------- */
  --rose:         #D6A09E;   /* primary mark color               */
  --rose-deep:    #B87773;   /* hover / pressed                  */
  --rose-2:       #DAACA8;   /* tree-leaf tone                   */
  --rose-3:       #E8C5C2;   /* tints, soft fills                */
  --rose-4:       #F4E2DF;   /* lantern-light tint, callouts     */
  --rose-shadow:  #8E5854;   /* deepest accent, rare use         */

  /* ---------- Supporting (used sparingly) ---------- */
  --moss:         #7C8470;   /* citation, tags                   */
  --moss-tint:    #DCE0D2;
  --ochre:        #C39A5C;   /* highlight, footnote marker       */
  --ochre-tint:   #EFE2C8;
  --slate:        #4F5B66;   /* data viz                         */

  /* ---------- Semantic ---------- */
  --bg:           var(--paper);
  --bg-elev:      #FFFCF4;   /* cards, raised surfaces           */
  --bg-sunken:    var(--paper-2);
  --fg1:          var(--ink);
  --fg2:          var(--ink-2);
  --fg3:          var(--ink-3);
  --fg4:          var(--ink-4);
  --fg-muted:     var(--ink-4);
  --link:         var(--rose-deep);
  --link-hover:   var(--rose-shadow);
  --border:       var(--paper-edge);
  --border-strong:#C4B89C;
  --rule:         #C9BFA8;   /* horizontal rules, table dividers */
  --selection-bg: var(--rose-3);
  --selection-fg: var(--ink);

  --success:      #6B8466;
  --warning:      var(--ochre);
  --danger:       #A45448;

  /* ---------- Typography stacks ---------- */
  --serif-display: "GT Sectra", "Tiempos Headline", "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --serif-text:    "Tiempos Text", "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans-ui:       "Söhne", "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono:          "JetBrains Mono", "SF Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* ---------- Type scale (modular, ratio ≈ 1.25) ---------- */
  --fs-xxs:   12px;
  --fs-xs:    13px;
  --fs-sm:    15px;
  --fs-base:  17px;   /* body — generous for serif reading      */
  --fs-md:    19px;
  --fs-lg:    22px;
  --fs-xl:    28px;
  --fs-2xl:   36px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   84px;
  --fs-6xl:   112px;

  --lh-tight:  1.1;
  --lh-snug:   1.25;
  --lh-normal: 1.45;
  --lh-relaxed:1.65;
  --lh-loose:  1.8;

  --tracking-display:  -0.01em;   /* slight tighten for headlines */
  --tracking-body:      0em;
  --tracking-eyebrow:   0.18em;   /* small caps eyebrows          */
  --tracking-wordmark:  0.06em;   /* THE JOSAPHINE COLLECTIVE     */

  /* ---------- Spacing (8pt + half-steps) ---------- */
  --s-0:   0;
  --s-px:  1px;
  --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:  192px;

  /* ---------- Radii — almost-square, gentle ---------- */
  --r-0:   0;
  --r-1:   2px;
  --r-2:   4px;
  --r-3:   6px;     /* default for cards, inputs */
  --r-4:   10px;
  --r-pill: 999px;

  /* ---------- Shadows — paper, never glossy ---------- */
  --shadow-0: none;
  --shadow-1: 0 1px 0 rgba(74, 70, 64, 0.04), 0 1px 2px rgba(74, 70, 64, 0.06);
  --shadow-2: 0 1px 0 rgba(74, 70, 64, 0.05), 0 4px 12px -2px rgba(74, 70, 64, 0.08);
  --shadow-3: 0 2px 0 rgba(74, 70, 64, 0.04), 0 12px 32px -6px rgba(74, 70, 64, 0.12);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(74, 70, 64, 0.06);

  /* ---------- Motion ---------- */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94); /* gentle */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:    140ms;
  --dur:         220ms;
  --dur-slow:    420ms;
  --dur-page:    640ms;

  /* ---------- Layout ---------- */
  --measure:     68ch;        /* reading column                 */
  --measure-narrow: 52ch;
  --container:   1200px;
  --gutter:      var(--s-7);
}

/* ============================================================
   Element styles
   ============================================================ */

html, body {
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--serif-text);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

h1, h2, h3, h4, h5 {
  font-family: var(--serif-display);
  color: var(--fg1);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); font-weight: 400; }
h2 { font-size: var(--fs-3xl); font-weight: 400; }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }

.display {
  font-family: var(--serif-display);
  font-size: var(--fs-5xl);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -0.015em;
}

.wordmark {
  font-family: var(--serif-display);
  font-weight: 500;
  letter-spacing: var(--tracking-wordmark);
  text-transform: uppercase;
  color: var(--ink-4);
}

.eyebrow {
  font-family: var(--sans-ui);
  font-size: var(--fs-xxs);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg3);
}

.lede {
  font-family: var(--serif-text);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--fg2);
  font-style: italic;
}

p {
  font-family: var(--serif-text);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg1);
  max-width: var(--measure);
  margin: 0 0 1em 0;
  text-wrap: pretty;
  hyphens: auto;
}

small, .caption {
  font-family: var(--sans-ui);
  font-size: var(--fs-xs);
  color: var(--fg3);
  line-height: var(--lh-normal);
}

a {
  color: var(--link);
  text-decoration-color: color-mix(in oklab, var(--link) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

blockquote {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg2);
  border-left: 1px solid var(--rose);
  padding-left: var(--s-5);
  margin: var(--s-6) 0;
}

code, pre, kbd, samp {
  font-family: var(--mono);
  font-size: 0.92em;
}
code {
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: var(--r-2);
  border: 1px solid var(--paper-edge);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-7) 0;
}

/* Drop-cap helper for editorial articles */
.dropcap::first-letter {
  font-family: var(--serif-display);
  float: left;
  font-size: 4.6em;
  line-height: 0.82;
  padding: 0.08em 0.08em 0 0;
  color: var(--rose-deep);
  font-weight: 400;
}
