/* OwnRoute shared design tokens: seller portal (app/) and, later, the marketing site (site/).
   Every value is taken from ../ownroute-brand/logo/brand-tokens.css (brand palette, fonts, tracking)
   or ../ownroute-site/public/assets/style.css (UI tokens and sizes already live on ownroute.co.uk).
   Nothing here is invented. Variable names match style.css so its components port unchanged.

   Fonts: self-hosted, never a third-party font service. Builder: copy
     ../ownroute-site/public/assets/fonts/FunnelSans-wght.woff2
     ../ownroute-site/public/assets/fonts/Outfit-wght.woff2
     ../ownroute-site/public/assets/fonts/OFL-FunnelSans.txt
     ../ownroute-site/public/assets/fonts/OFL-Outfit.txt   (the OFL licence must ship with the fonts)
   into shared/fonts/. The url()s below are relative to this file, so they resolve to shared/fonts/. */

@font-face {
  font-family: "Funnel Sans";
  src: url("./fonts/FunnelSans-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("./fonts/Outfit-wght.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Brand palette (brand-tokens.css, brand guide Part B section 4). Fixed: do not add colours. */
  --brand-ink:     #0E3B45;
  --brand-teal:    #2A8C87;
  --brand-clay:    #E0A458;  /* accent: once per screen, the dot OR the primary button, never both */
  --brand-surface: #F4F1EA;  /* never pure white as a page background */

  /* UI colour roles, light theme (style.css). Contrast against --bg / --surface checked:
     text 10.8:1, muted 5.2:1, accent 5.3:1, warn-ink on warn-bg 8.5:1, ink on clay 5.6:1. */
  --bg:          #F4F1EA;
  --surface:     #FBFAF6;
  --surface-2:   #ECE8DE;
  --text:        #0E3B45;
  --muted:       #4A6A70;   /* also the 2px input border: 5.2:1, passes 3:1 for UI components */
  --accent:      #1F6E6A;   /* links, focus ring, default button */
  --accent-ink:  #ffffff;   /* text on --accent (a button fill, not a page background) */
  --accent-soft: #E1EEEC;
  --warn-bg:     #fff4d6;   /* the brand has no red: errors and "needs action" use warn + ink + words */
  --warn-ink:    #5c4300;
  --border:      #DDD8CC;   /* decorative dividers only; never the only edge of a control */

  /* Primary action and graphics */
  --clay:        var(--brand-clay);
  --clay-ink:    #0E3B45;   /* stays ink in both themes: 5.6:1 on clay */
  --graphic:     var(--brand-teal);  /* non-text graphics (progress lines, spinner): 3.6:1 on --bg */

  /* Portal v2 only (spec 19, docs/designs/portal-v2/SPEC.md). Light values; the v2 screens never use the dark block. */
  --tint: #E4ECE8;   /* the demo's teal at 10%, solid: pills, selected rows, their bubbles */
  --line: #D5D9D2;   /* the demo's ink at 14%: dividers and skeleton fills only */
  --edge: #6F888C;   /* 3.3:1 on --bg, 3.6:1 on cards: the edge of anything you operate */
  --teal: #2A8C87;   /* same value as --graphic */

  /* Type (style.css + brand-tokens.css) */
  --font:         "Funnel Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Outfit", "Funnel Sans", system-ui, sans-serif;
  --font-mono:    ui-monospace, Menlo, monospace;  /* audit-log JSON only */
  --tracking-display: -0.02em;
  --weight-regular: 400;
  --weight-display: 500;   /* h1-h3 */
  --weight-strong:  600;   /* labels, buttons, tags */
  --line-body: 1.6;
  --line-heading: 1.15;
  --text-xs:   .8rem;      /* tags and badges */
  --text-sm:   .875rem;    /* banner, small print */
  --text-base: 1rem;       /* body, inputs (never below 16px on inputs: stops iOS zoom) */
  --text-h3:   1.05rem;
  --text-lead: 1.15rem;
  --text-h2:   1.45rem;
  --text-h1:   clamp(1.9rem, 5vw, 2.8rem);

  /* Spacing (the steps style.css already uses) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --gutter: 16px;          /* page side padding at 360px */
  --measure: 960px;        /* .wrap max width */

  /* Radius (style.css) */
  --radius:       14px;    /* cards, callouts, tables */
  --radius-btn:   10px;
  --radius-input: 8px;
  --radius-pill:  999px;

  /* Focus and targets (style.css; WCAG 2.2 AA) */
  --focus-ring:   3px solid var(--accent);
  --focus-offset: 2px;
  --target-min:   44px;    /* links, icon buttons */
  --control-h:    48px;    /* inputs, buttons, choice rows */
}

/* No dark theme (decided 1 Dec): every page is light whatever the device setting. */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
