/* Netless design tokens.
   The one place color, type, space, shape and motion are defined. site.css and brand/ read from here.
   Reference: /DESIGN_SYSTEM.md. Change a value here, never in a component.
   Mixed colors are written out as hex (with the recipe beside them) so browsers without color-mix() still get them.
   If a brand color changes, recompute the mixes that use it. */

:root {
  /* ── Brand colors ─────────────────────────────────────────── */
  --forest-black: #192820;   /* dark ground, primary text */
  --field-olive:  #56634B;   /* the case color in shadow; secondary text */
  --paper:        #F2F0E6;   /* default ground */
  --graphite:     #252825;   /* ink on the device screen */
  --sage:         #D8DDCF;   /* second ground, quiet bands */
  --signal-orange:#D97738;   /* preorder only, plus one live marker per diagram */
  --steel:        #8A938C;   /* rules, annotation lines, placeholder text */

  /* ── Supporting values, each derived from or matched to a real material ── */
  --sheet:        #FCFAF2;   /* lifted paper: inputs, plates on a sage ground */
  --eink-paper:   #C7C8C2;   /* the screen ground in the site mock-ups */
  --studio:       #D6D5CF;   /* the studio backdrop in product photos */
  --olive-light:  #87917D; /* 62% field-olive, 38% sage */  /* the case in light */
  --signal-deep:  #90592F; /* 62% signal-orange, 38% forest-black */ /* orange that passes as text */
  --signal-lift:  #DD8A54; /* 84% signal-orange, 16% paper */        /* button hover */
  --shadow: 25 40 32;        /* forest black as channels, for contact shadows */
  --shadow-deep: 0 0 0;      /* contact shadows on a dark ground */

  /* ── On-device palette (--eink-* names kept): four levels, no color ─────── */
  --eink-ink:   var(--graphite);
  --eink-ink-2: #494B48; /* 78% graphite, 22% eink-paper */
  --eink-rule:  #898B86; /* 38% graphite, 62% eink-paper */
  --eink-tint:  #B8BAB4; /* 9% graphite, 91% eink-paper */

  /* ── Type ─────────────────────────────────────────────────── */
  --font-display: BarlowCond, "Arial Narrow", sans-serif;      /* headlines, names, buttons */
  --font-body:    Barlow, Arial, sans-serif;                    /* reading text */
  --font-mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace; /* labels, specs, figures */
  --font-serif:   "Source Serif 4", Georgia, serif;             /* reference articles only */
  --display: var(--font-display); /* legacy alias */

  --fs-hero:    clamp(54px, 9.4vw, 172px);
  --fs-h1:      clamp(48px, 6.2vw, 104px);
  --fs-h2:      clamp(42px, 5.4vw, 84px);
  --fs-h2-sm:   clamp(38px, 4.4vw, 68px);
  --fs-h3:      clamp(25px, 2.3vw, 34px);
  --fs-h4:      22px;
  --fs-lede:    clamp(18px, 1.45vw, 21px);
  --fs-body:    18px;
  --fs-small:   15px;
  --fs-caption: 13px;
  --fs-label:   12px;

  --lh-display: .92;
  --lh-heading: 1.05;
  --lh-body:    1.5;
  --tr-display: -.035em;
  --tr-heading: -.02em;
  --tr-label:   .08em;

  /* ── Space: a 4 px base ───────────────────────────────────── */
  --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;
  --pad: clamp(20px, 5.2vw, 88px);               /* page gutter */
  --gap: clamp(16px, 2vw, 32px);                 /* grid gap */
  --section: clamp(56px, 7vw, 112px);            /* space above and below a section */
  --shell: 1512px;                               /* widest content */
  --mast: 64px;

  /* ── Shape ────────────────────────────────────────────────── */
  --hair: 1px;
  --radius: 2px;          /* every control and plate */
  --radius-photo: 14px;   /* photos and the panels that sit on them */
  --radius-device: 9px;   /* only where the page draws the handheld itself */
  --shadow-product: drop-shadow(0 30px 24px rgb(var(--shadow) / .2));  /* under cut-out product images only */

  /* ── Motion ───────────────────────────────────────────────── */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-1: .15s;   /* press, hover */
  --dur-2: .25s;   /* small moves */
  --dur-3: .7s;    /* a section arriving */
}

/* ── Semantic themes ─────────────────────────────────────────
   Components use these, not the brand colors above. Each ground declares the full set,
   so nesting a .dark block inside a light page (or the reverse) just works. */
:root, .on-paper {
  color-scheme: light;
  --bg: var(--paper);
  --bg-2: var(--sage);
  --surface: var(--sheet);
  --text: var(--forest-black);
  --text-2: #3C4840; /* 84% forest-black, 16% paper */
  --text-3: var(--field-olive);
  --rule: #BCC0B7; /* 52% steel, 48% paper */
  --rule-2: var(--steel);
  --rule-strong: var(--forest-black);
  --wash: rgb(25 40 32 / .06);   /* pressed or hovered row */
  --accent: var(--signal-orange);
  --accent-hover: var(--signal-lift);
  --on-accent: var(--forest-black);
  --focus: var(--signal-deep);
  --error: var(--signal-deep);
}
.on-sage {
  --bg: var(--sage);
  --bg-2: var(--paper);
  --surface: var(--paper);
  --text: var(--forest-black);
  --text-2: #344139; /* 86% forest-black, 14% sage */
  --text-3: #4F5C46; /* 88% field-olive, 12% forest-black */
  --rule: #A0A89F; /* 72% steel, 28% sage */
  --rule-2: #737E76; /* 80% steel, 20% forest-black */
  --rule-strong: var(--forest-black);
  --wash: rgb(25 40 32 / .06);
  --accent: var(--signal-orange);
  --accent-hover: var(--signal-lift);
  --on-accent: var(--forest-black);
  --focus: var(--signal-deep);
  --error: #79502C; /* 50% signal-orange, 50% forest-black */
}
.dark {
  color-scheme: dark;
  --bg: var(--forest-black);
  --bg-2: #2C3A32; /* 90% forest-black, 10% sage */
  --surface: #2C3A32; /* 90% forest-black, 10% sage */
  --text: var(--paper);
  --text-2: #D4D4CA; /* 86% paper, 14% forest-black */
  --text-3: #AAB2A5; /* 76% sage, 24% forest-black */
  --rule: #4F5B54; /* 48% steel, 52% forest-black */
  --rule-2: #7C867F; /* 88% steel, 12% forest-black */
  --rule-strong: var(--paper);
  --wash: rgb(242 240 230 / .07);
  --accent: var(--signal-orange);
  --accent-hover: var(--signal-lift);
  --on-accent: var(--forest-black);
  --focus: var(--signal-orange);
  --error: #E4AD86; /* 55% signal-orange, 45% paper */
}
