/**
 * EARTD design tokens.
 * Every colour, size and rhythm value in the theme resolves through this file.
 * Nothing below this file should contain a raw hex value.
 */

:root {
  /* --- Ground -------------------------------------------------------- */
  --paper:        #F7F4ED;  /* warm ivory, the default ground           */
  --paper-2:      #EFEADE;  /* sunk panels, alternating sections        */
  --paper-3:      #E5DFD0;  /* image placeholders, hairline fills       */
  --surface:      #FFFFFF;  /* cards that must lift off the paper       */

  /* --- Ink ----------------------------------------------------------- */
  --ink:          #14110D;  /* charcoal with a brown bias               */
  --ink-2:        #3D362B;  /* body copy                                */
  --muted:        #6D6655;  /* metadata, captions — 5.19:1 on paper, AA */
  --line:         #DED8C9;  /* hairlines                                */
  --line-2:       #C6BEAA;  /* stronger rules, input borders            */

  /* --- Accents ------------------------------------------------------- */
  --clay:         #B0512C;  /* terracotta — used once per screen        */
  --clay-soft:    #F0E1D8;
  --olive:        #59663F;  /* food pillar                              */
  --olive-soft:   #E6E8DC;
  --mineral:      #29506A;  /* travel pillar                            */
  --mineral-soft: #DFE7EC;
  --brass:        #9B7C36;  /* craft pillar, restrained metal accent    */
  --brass-soft:   #F2E9D5;

  /* --- Signal -------------------------------------------------------- */
  --ok:           #3E6B4D;
  --notice:       #8A6B18;

  /* --- Type ---------------------------------------------------------- */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:    'Archivo', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Fluid scale. Each step is used, none is decorative. */
  --t-display: clamp(2.75rem, 1.30rem + 6.10vw, 6.25rem);
  --t-h1:      clamp(2.10rem, 1.28rem + 3.45vw, 4.00rem);
  --t-h2:      clamp(1.65rem, 1.22rem + 1.80vw, 2.60rem);
  --t-h3:      clamp(1.20rem, 1.05rem + 0.62vw, 1.55rem);
  --t-lead:    clamp(1.06rem, 0.99rem + 0.30vw, 1.25rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-meta:    0.75rem;
  --t-label:   0.6875rem;

  --lh-tight: 1.02;
  --lh-head:  1.12;
  --lh-body:  1.68;

  /* --- Rhythm -------------------------------------------------------- */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;

  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3.5rem);
  --section-y: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);

  /* --- Layout -------------------------------------------------------- */
  --shell:   100%;    /* full-bleed: sections span the viewport          */
  --shell-2: 100%;    /* standard content band, also full width         */
  --measure: 68ch;    /* reading column                                 */

  --radius: 0px;      /* the design is squared off on purpose           */
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 480ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #131110;
    --paper-2:      #1B1816;
    --paper-3:      #262220;
    --surface:      #1B1816;
    --ink:          #F4EFE4;
    --ink-2:        #D6CFC2;
    --muted:        #9A9184;
    --line:         #2E2A26;
    --line-2:       #453F38;
    --clay:         #D9835F;
    --clay-soft:    #2E1C15;
    --olive:        #9CAA7C;
    --olive-soft:   #1D2117;
    --mineral:      #8AB2CC;
    --mineral-soft: #141E26;
    --brass:        #CFAC64;
    --brass-soft:   #241D10;
    --ok:           #86BC9A;
    --notice:       #D6B25F;
  }
}

:root[data-theme="dark"] {
  --paper:        #131110;
  --paper-2:      #1B1816;
  --paper-3:      #262220;
  --surface:      #1B1816;
  --ink:          #F4EFE4;
  --ink-2:        #D6CFC2;
  --muted:        #9A9184;
  --line:         #2E2A26;
  --line-2:       #453F38;
  --clay:         #D9835F;
  --clay-soft:    #2E1C15;
  --olive:        #9CAA7C;
  --olive-soft:   #1D2117;
  --mineral:      #8AB2CC;
  --mineral-soft: #141E26;
  --brass:        #CFAC64;
  --brass-soft:   #241D10;
  --ok:           #86BC9A;
  --notice:       #D6B25F;
}
