/*
 * eldstad-tokens / core.css
 * Tier 0 (Eldstad CORE identity primitives) + Tier 1 (SEMANTIC token NAMES).
 *
 * ADR 0044 design-system bundle. Client-scoped to Eldstad (Hans-Forsman-AB);
 * NO sharing with the Nosen family (RFC 0029 fence). Do not add per-theme
 * VALUES here; a theme layer under themes/ resolves the Tier 1 names below.
 *
 * Cascade contract: load core.css FIRST, then exactly one Tier 2 theme.
 * Three ship today under ONE version-of-record: themes/low-fi.css (wireframe),
 * themes/hi-fi-pro.css (Eldstad Pro, the installer's trade tool) and
 * themes/hi-fi-se.css (eldstad.se, the consumer storefront). Neither hi-fi
 * layer is "the" hi-fi one; each names its product. See manifest.json for the
 * import map.
 *
 * Design direction: "Tech Utility" (Eldstad Pro is a verktyg, not an affair):
 * a function-first trade tool for Swedish fireplace installers, not e-commerce
 * and not consumer-fintech. Eldstad had no finalized brand palette when this
 * file was written (the Phase-1 design brief marks brand colours "placeholder
 * neutral / dark, refine later"), so the CORE opened with only a neutral,
 * faintly-warm industrial ramp + type + scale. The warm/ember Pro brand seeds
 * arrived in ELD-4; the eldstad.se storefront seeds in ELD-78.
 *
 * Eldstad now has TWO faces, and the core carries the seeds of both. They are
 * not two takes on one palette: Pro is an authored warm-industrial palette for
 * a tool that does not exist yet, and eldstad.se is read off a storefront that
 * is live and selling. Keep the two seed blocks apart and do not cross-wire
 * them; a theme reads one block, never a mix.
 */

:root {
  /* ------------------------------------------------------------------ */
  /* TIER 0: neutral identity ramp (faintly warm, industrial).           */
  /* Raw seeds, NOT semantic roles. Themes read these; consumers do not.  */
  /* The slight warmth nods to the fireplace/wood family without          */
  /* committing a hi-fi brand hue (that is ELD-4's job).                  */
  /* ------------------------------------------------------------------ */
  --eldstad-white: #ffffff;
  --eldstad-gray-50: #f7f6f4; /* lightest paper (warm-neutral) */
  --eldstad-gray-100: #eceae6;
  --eldstad-gray-200: #dcd9d3;
  --eldstad-gray-300: #c2beb6;
  --eldstad-gray-400: #98938a;
  --eldstad-gray-500: #6e6a62;
  --eldstad-gray-600: #4d4a44;
  --eldstad-gray-700: #34322d;
  --eldstad-gray-900: #1b1a17; /* near-black warm ink */

  /* Utility signal seeds. Kept desaturated + structural: this is a trade
     tool, status is carried by glyphs (check / warn / cross) and weight,
     not by loud hue. Hi-fi (ELD-4) may re-seed these warmer/stronger. */
  --eldstad-signal-stop: #8a3a30; /* muted brick, blocking/danger seed */
  --eldstad-signal-go: #3f5d3a; /* muted moss, pass/success seed */

  /* ------------------------------------------------------------------ */
  /* TIER 0: Eldstad-brand hi-fi seeds (added 0.2.0, ELD-4).             */
  /* The warm-industrial fireplace palette: ember flame, soot char, warm  */
  /* ash. The hi-fi theme resolves the semantic roles onto these; the     */
  /* low-fi theme intentionally does NOT use them (it stays grayscale).   */
  /* First authored palette for a brand with no prior shipped source; the */
  /* Phase-1 brief set the direction (Tech Utility, warm/dark), not hex.   */
  /* ------------------------------------------------------------------ */
  --eldstad-ember: #c0561f; /* signature flame: burnt-orange ember (accent) */
  --eldstad-ember-deep: #8f3d13; /* pressed/hover ember */
  --eldstad-ember-soft: #f6e7db; /* pale ember tint (soft accent bg) */
  --eldstad-char: #211d18; /* soot near-black (brand ink) */
  --eldstad-ash: #f4efe8; /* warm ash paper (brand surface) */
  --eldstad-ash-line: #e3dccf; /* warm ash hairline */
  --eldstad-ash-muted: #7a726a; /* warm gray, secondary text on ash */
  --eldstad-brick: #b23a2b; /* hi-fi danger: a real warm red */
  --eldstad-forest: #4a7a3f; /* hi-fi success: a solid warm green */

  /* ------------------------------------------------------------------ */
  /* TIER 0: eldstad.se storefront seeds (added 0.3.0, ELD-78).          */
  /*                                                                     */
  /* MEASURED, not authored. Every value below is read off the live      */
  /* Shopify storefront, so this block has a provenance the Pro block    */
  /* above does not have and must not be "improved" by eye.              */
  /*                                                                     */
  /*   source  eldstad-theme/config/settings_data.json                   */
  /*   commit  d04bc34 (working tree clean at read time)                 */
  /*   read    2026-08-27                                                */
  /*                                                                     */
  /* settings_data.json is written by the Shopify theme editor and can   */
  /* change without a commit. These values are the file as committed at  */
  /* d04bc34; whether the live editor has since diverged from that       */
  /* commit was NOT verified (this ticket is offline by design and has   */
  /* no Shopify admin). Re-read and bump when it matters.                */
  /*                                                                     */
  /* Two seeds are NOT measured and say so on their own line. See        */
  /* DESIGN.md, "Hi-fi / eldstad.se storefront theme", for the full      */
  /* provenance table and the contrast numbers.                          */
  /* ------------------------------------------------------------------ */
  --eldstad-se-copper: #965f2f; /* colors_solid_button_background: the button fill, the storefront's accent */
  --eldstad-se-copper-deep: #7b4e27; /* DERIVED: copper darkened 18% for hover/pressed. The store ships no hover colour */
  --eldstad-se-copper-bright: #bb6c27; /* colors_background_border_section + colors_background_announcement_bar */
  --eldstad-se-ground: #faf7f4; /* colors_background_1: the warm off-white page. Note the store avoids pure white */
  --eldstad-se-ground-alt: #f6ece3; /* colors_background_2: the alternate section ground, a pale copper tint */
  --eldstad-se-panel: #f3efea; /* colors_secondary_element_background: account boxes, pagination, drawers */
  --eldstad-se-ink: #333333; /* colors_text + colors_text_title (the store sets both the same) */
  --eldstad-se-ink-secondary: #888888; /* colors_text_secondary. See DESIGN.md: this one has a contrast cost */
  --eldstad-se-line: #d2d0cd; /* DERIVED: the theme's own hairline, rgba(ink, 0.2) flattened over the ground */
  --eldstad-se-error: #b93131; /* eldstad-theme/assets/base.css:4 --color-error, hard-coded in the theme, not a setting */
  --eldstad-se-go: #3f6b3a; /* INVENTED: the storefront has no success colour anywhere. See DESIGN.md */
  --eldstad-se-flame: #e32522; /* MEASURED off the logo (eldstad.se-logga_210x.png, 2026-09-03, ELD-89): 82.5% of its red pixels. The brand's own red, not a setting. See DESIGN.md */

  /* ------------------------------------------------------------------ */
  /* TIER 0: type pairing (identity).                                    */
  /* A neutral grotesque for UI + a monospace for measured data (chimney  */
  /* diameter, room volume, clearances): the mono reinforces the trade/   */
  /* instrument feel and is shared by both fidelities.                    */
  /* ------------------------------------------------------------------ */
  --eldstad-font-ui: ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --eldstad-font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo,
    Consolas, "Liberation Mono", monospace;

  /* Headings default to the UI grotesque, which is what Pro wants: one face,
     function-first, no display typography. The primitive exists (added 0.3.0,
     ELD-78) because eldstad.se sets headings in a serif and body in a sans, and
     a one-font API cannot express that. Adding it changes nothing for a theme
     that does not override it. */
  --eldstad-font-heading: var(--eldstad-font-ui);

  /* ------------------------------------------------------------------ */
  /* TIER 1: SEMANTIC token NAMES (roles). The stable component API.      */
  /* No brand literals here: every value is a var() onto a Tier 0 seed.   */
  /* Values here are SAFE DEFAULTS; a Tier 2 theme overrides them.        */
  /* The canonical role set (ELD-3 DoD): surface, on-surface, muted,      */
  /* line, accent, accent-strong, danger, success (+ two companions).     */
  /* ------------------------------------------------------------------ */
  --color-surface: var(--eldstad-gray-50); /* page background */
  --color-surface-raised: var(--eldstad-white); /* cards, panels, rows (companion) */
  --color-on-surface: var(--eldstad-gray-900); /* primary text on surface */
  --color-muted: var(--eldstad-gray-500); /* secondary text, captions */
  --color-line: var(--eldstad-gray-200); /* hairline borders, dividers */

  --color-accent: var(--eldstad-gray-700); /* interactive default (theme overrides) */
  --color-accent-strong: var(--eldstad-gray-900); /* pressed/hover accent */
  --color-accent-soft: var(--eldstad-gray-100); /* tinted accent background (companion) */

  --color-danger: var(--eldstad-signal-stop); /* error / blocking / destructive */
  --color-success: var(--eldstad-signal-go); /* pass / confirm / positive */

  /* The ninth role (0.4.0, ELD-89): the one mark that says "here" or "ours",
     such as the current step in a strip. Never an interaction fill; that is
     --color-accent. The default is the heaviest ink, so a theme that ignores
     it still marks by weight. */
  --color-mark: var(--eldstad-gray-900);

  /* ------------------------------------------------------------------ */
  /* TIER 1: spacing + radius scale NAMES. A theme may re-declare these.  */
  /* Default scale is tool-dense (utility, not editorial-airy).          */
  /* ------------------------------------------------------------------ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-sm: 3px; /* low, utilitarian (not consumer-rounded) */
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
}
