/* tokens.css — اکانتینو (Acantino) Design Tokens — v2 (P1-5b UI polish)
   Single source of truth for type, colour, shape, space, elevation and motion.
   Storefront and Account pages use ONLY these tokens. See docs/DESIGN.md §4–§6. */
:root {
  /* ---------- Type ---------- */
  --font-sans: 'Vazirmatn', Tahoma, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, Consolas, 'Courier New', monospace; /* credentials & codes only */

  /* One compact scale (px at 390 → 1440 viewport). Every page uses the same steps. */
  --step-xs:      0.75rem;                                   /* 12     badges, counters          */
  --step-small:   0.8125rem;                                 /* 13     meta, help, captions      */
  --step-body:    clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);   /* 15–16  running text, inputs      */
  --step-lead:    clamp(1rem, 0.96rem + 0.25vw, 1.125rem);   /* 16–18  intro lines, card titles  */
  --step-h3:      clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);   /* 17–20  sub-headings              */
  --step-head:    clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);  /* 20–26  section headings (h2)     */
  --step-title:   clamp(1.5rem, 1.3rem + 0.9vw, 2rem);       /* 24–32  page titles (h1)          */
  --step-display: clamp(1.75rem, 1.4rem + 1.6vw, 2.625rem);  /* 28–42  home hero only            */

  /* Persian leading (DESIGN.md §3) */
  --leading-body: 1.85;
  --leading-lead: 1.7;
  --leading-head: 1.45;
  --leading-tight: 1.35;

  /* ---------- Colour ---------- */
  --bg: #ffffff;
  --surface: #f6f8fa;          /* quiet panels, inputs on tinted bands */
  --surface-alt: #eef2f6;      /* table heads, hovered rows             */
  --surface-dark: #0f172a;     /* credential box, CTA band              */
  --ink: #0f172a;
  --ink-soft: #334155;         /* secondary headings                    */
  --muted: #5b6b7f;            /* help text, meta (4.9:1 on white)      */
  --accent: #0f766e;           /* brand teal (Site:PrimaryColor)        */
  --accent-hover: #115e59;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ef;      /* selected states, chips                */
  --accent-wash: #f1f8f6;      /* page-head bands                       */
  --accent-line: #b9ded7;      /* borders on teal-tinted surfaces       */
  --border: #e3e8ee;
  --border-dark: #cfd8e3;

  /* Status */
  --ok: #166534;     --ok-bg: #effaf3;     --ok-border: #c6ecd3;
  --warn: #854d0e;   --warn-bg: #fdf8e7;   --warn-border: #f3e2a6;
  --danger: #b42318; --danger-bg: #fef3f2; --danger-border: #fbd5d1;
  --info: #0f766e;   --info-bg: #effaf8;   --info-border: #c3e9e2;

  /* Admin charts (owner round 7, validated: lightness band, chroma, CVD all-pairs, 3:1 contrast on white).
     Fixed meaning per measure: 1 = sales/online/mobile, 2 = orders/wallet/desktop, 3 = visits/tablet. */
  --chart-1: #0d9488;  --chart-1-hover: #0f766e;
  --chart-2: #d95926;  --chart-2-hover: #b8481c;
  --chart-3: #2a78d6;  --chart-3-hover: #1c5cab;
  /* Heat map (one hue, light -> dark, validated as an ordinal ramp: step 1 >= 2:1 on white; 0 = empty cell) */
  --heat-0: #eef2f6; --heat-1: #6fc5b9; --heat-2: #2fa395; --heat-3: #0d8a7e; --heat-4: #0b6f66; --heat-5: #0a4f49;

  /* ---------- Shape ---------- */
  --radius-sm: 6px;    /* badges, chips, small controls */
  --radius: 10px;      /* inputs, buttons               */
  --radius-lg: 14px;   /* cards, panels                 */
  --radius-full: 9999px;

  /* ---------- Elevation (only for floating or interactive layers) ---------- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.22);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, 0.35);

  /* Background pattern for page-head bands (dot grid, very low contrast) */
  --pattern-dots: radial-gradient(rgba(15, 118, 110, 0.13) 1px, transparent 1.2px);
  --pattern-size: 22px 22px;

  /* ---------- Layout ---------- */
  --container-max: 1240px;
  --container-narrow: 820px;
  --margin: clamp(1rem, 3vw, 2rem);
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --section-y: clamp(2.5rem, 5vw, 4rem);    /* vertical rhythm between sections */
  --stack: 1rem;                             /* default gap inside a block       */
  --header-h: 4rem;

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms;
  --t-hover: 160ms;
  --t-ui: 220ms;

  /* Legacy alias (kept so older markup keeps working) */
  --section: var(--section-y);
}
