/*
 * Find Me Matcha — web tokens.
 *
 * Mirrored, value for value, from the shipped app themes:
 *   mobile/src/shared/lib/theme/themes/light-v2.ts  (silver ground, white cards)
 *   mobile/src/shared/lib/theme/themes/dark-v2.ts   (deep pine, the app default)
 *
 * The app stores colours as space-separated RGB triples so NativeWind can
 * apply an alpha to them; here they are the same colours written as hex.
 * If a theme file changes, change these to match — the site and the app
 * looking related is the whole point of copying them.
 *
 * Light is the base because these are documents, read once, often on a
 * bright pavement. Dark follows the reader's system setting and is the
 * palette the app itself opens in.
 */

:root {
  color-scheme: light dark;

  /* Surfaces — a pale matcha ground, white cards.
     The app's light theme grounds itself in silver because it is a canvas for
     PHOTOGRAPHS, and a tinted page competes with a green drink. This site
     shows no drinks. It is the product's face before anyone has installed
     anything, so it takes the colour the product is named after, and keeps
     cards white — six documents of dense legal prose are read, not admired,
     and white is where long text is easiest. */
  --bg: #e9f0e2;
  --bg-2: #dfe9d6;
  --surface: #ffffff;
  --surface-2: #dee9d4;
  --surface-3: #cfddc2;
  --border: #bfd1ae;
  --border-2: #d8e3cd;

  /* Ink — a deep pine rather than pure black. On a green ground a neutral
     black reads as a printing error; the same near-black with the ground's
     own hue in it reads as chosen. Still 15:1 on the page. */
  --ink: #12210d;
  --ink-2: #2a3a22;
  --muted: #59674f;
  --muted-2: #7c8a72;

  /* Accent — matcha, dark enough to read as text on white. */
  --accent-300: #7ca554;
  --accent-400: #5f943c;
  --accent-500: #45712a;
  --accent-600: #2f5620;
  --accent-soft: #ecf4e7;
  --on-accent: #ffffff;

  /* "We think so" is never the brand colour. Keeping provisional claims off
     the accent is what makes the two legible at a glance. */
  --machine: #7b6ea6;
  --machine-soft: #f0eef8;

  /* The room axis. */
  --rose: #a85c6c;
  --rose-soft: #faeef0;

  /* Status. */
  --danger: #a4473c;
  --success: #2f8054;
  --warn: #9c6d27;
  --warn-soft: #fcf3e5;

  /* Quality ramp: culinary → ceremonial. */
  --quality-1: #716f3d;
  --quality-3: #48712c;
  --quality-5: #196c3c;

  /*
   * Chip ink — a web-only step, and only in the light theme.
   *
   * The app's chip colours are cut for 10-11px text sitting on the app's own
   * surfaces. Set at the size this site uses them, three of the four land
   * just under WCAG's 4.5:1 floor against the silver ground's tints
   * (4.47, 3.96, 4.12, 4.46). Same hue, one notch darker, until each clears.
   * The app's theme files are not touched; this is a different medium
   * making its own call about the same colours. Dark clears comfortably and
   * keeps the app's values unchanged.
   */
  --chip-confirmed: #2f5620;
  /* Re-solved against the green ground: the silver-era values fell under
     4.5:1 once the page stopped being neutral. Each is the same hue, darkened
     until it clears on the page, on a card AND on the recessed tint. */
  --chip-think: #6b5e98;
  --chip-disputed: #875e21;
  --chip-unknown: #5e6a57;

  /* Type. Self-hosted, same faces as the app. No third-party font host. */
  --font-display: "Instrument Serif", iowan old style, palatino, georgia, serif;
  --font-ui:
    "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", roboto, sans-serif;
  --font-mono: ui-monospace, sfmono-regular, "SF Mono", menlo, monospace;

  /* Rhythm. */
  --radius: 16px;
  --radius-sm: 10px;
  --container: 44rem;
  --container-wide: 62rem;
  --gutter: clamp(1.15rem, 5vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12160f;
    --bg-2: #1a2018;
    --surface: #1a2018;
    --surface-2: #222a20;
    --surface-3: #2a3327;
    --border: #2e372b;
    --border-2: #262e24;

    --ink: #e9ede4;
    --ink-2: #c3cbbd;
    --muted: #8e9789;
    --muted-2: #6e786a;

    --accent-300: #b4d98a;
    --accent-400: #9cca6c;
    --accent-500: #8cbf54;
    --accent-600: #6e9e3e;
    --accent-soft: #22301a;
    --on-accent: #12160f;

    --machine: #a99bd6;
    --machine-soft: #241f33;

    --rose: #d79aa6;
    --rose-soft: #332327;

    --danger: #db7c70;
    --success: #7cc794;
    --warn: #d8a353;
    --warn-soft: #302718;

    --quality-1: #8a8749;
    --quality-3: #86bc58;
    --quality-5: #56d583;

    --chip-confirmed: #8cbf54;
    --chip-think: #a99bd6;
    --chip-disputed: #d8a353;
    --chip-unknown: #8e9789;
  }
}
