/*
 * ZMS design tokens: the ONLY place colours, fonts, sizes, spacing, radii and shadows are defined.
 * To reskin the store, edit this file. app.css uses these variables and nothing else.
 *
 * Brand: Zagros green, approved 2026-10-08. Source of every value: brand/TOKENS-PROPOSAL.md.
 */

/* Fonts are self-hosted (OFL, licences in /fonts). Hanken is `optional`: it never swaps in late.
 * Vazirmatn is `swap`: Windows' Arabic fallback lacks Sorani letters (ڵ ێ ۆ), which breaks joining. */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* Arabic-script only: English pages never download it. */
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn-arabic-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  /* Raw palette */
  --ink: #1b1a18;
  --graphite: #67625b;
  --stone: #8c8780; /* borders, icons, dots. Never text */
  --mist: #e4e2de;
  --paper: #f4f3f1;
  --white: #ffffff;
  --zagros: #2c4230;
  --zagros-pressed: #3a5540;
  --zagros-tint: #e8eee9;
  --roj: #b98a2e; /* the 21-ray sun only */
  --brick: #9a3b2e; /* form errors only */
  --brick-tint: #f8ebe8;

  /* Roles: app.css uses these */
  --color-ground: var(--white);
  --color-surface: var(--white);
  --color-surface-sunken: var(--paper);
  --color-ink: var(--ink);
  --color-ink-muted: var(--graphite);
  --color-line: var(--mist);
  --color-line-strong: var(--stone);
  --color-action: var(--zagros);
  --color-action-hover: var(--zagros-pressed);
  --color-on-action: var(--white);
  --color-action-soft: var(--zagros-tint);
  --color-accent-ink: var(--zagros);
  --color-call: var(--ink);
  --color-on-call: var(--white);
  --color-sun: var(--roj);
  --color-ok: var(--zagros);
  --color-danger: var(--brick);
  --color-danger-soft: var(--brick-tint);
  --color-focus: var(--ink);
  --color-focus-field: var(--zagros);
  --color-selection-bg: var(--zagros-tint);
  --color-selection-ink: var(--ink);

  /* Type */
  --font-latin: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Hanken after Vazirmatn: prices and model names match the English site. */
  --font-ckb: 'Vazirmatn', 'Hanken Grotesk', 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600; /* headings, buttons, prices */

  /* Type scale, phone first. Size, then line height. Desktop values from 64rem below. */
  --text-display: 1.75rem; /* 28 */
  --lh-display: 2.125rem; /* 34 */
  --text-title: 1.5rem; /* 24 */
  --lh-title: 1.875rem; /* 30 */
  --text-section: 1.25rem; /* 20 */
  --lh-section: 1.625rem; /* 26 */
  --text-product: 1rem; /* 16 */
  --lh-product: 1.375rem; /* 22 */
  --text-body: 1rem; /* 16 */
  --lh-body: 1.5rem; /* 24 */
  --text-small: 0.875rem; /* 14 */
  --lh-small: 1.25rem; /* 20 */
  --text-caption: 0.8125rem; /* 13 */
  --lh-caption: 1.125rem; /* 18 */
  --text-price: 1.0625rem; /* 17, cards */
  --lh-price: 1.375rem;
  --text-price-pdp: 1.5rem; /* 24, product page */
  --lh-price-pdp: 1.875rem;
  --text-button: 1rem; /* 16 */
  --lh-button: 1.25rem; /* 20 */
  --text-field: 1rem; /* 16px stops iOS zooming into fields */
  --text-signature: 0.8125rem; /* 13, both languages: the signature's size never changes */
  --price-unit: 0.76em; /* "IQD" after a card price */
  --price-unit-pdp: 0.6em;

  /* Latin heading tracking. Kurdish sets these to 0 below. */
  --tracking-display: -0.022em;
  --tracking-title: -0.015em;
  --tracking-section: -0.01em;

  /* Space (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --gutter: 1rem;
  --page-max: 70rem;
  --tap: 3rem; /* 48px: touch targets, buttons and fields */
  --links-max: 28rem; /* links page column (phase 19) */
  --links-contact-min: 12rem; /* Call and Save our number side by side from here */
  --qr-preview: 10rem; /* QR preview in admin Links */

  /* Shape and depth */
  --radius-s: 6px; /* tags */
  --radius-m: 12px; /* buttons, inputs, photos */
  --radius-l: 16px; /* panels */
  --radius-pill: 999px; /* Call only */
  --border: 1px solid var(--color-line);
  --border-field: 1px solid var(--color-line-strong);
  --underline-current: 2px; /* current tab or category */
  --dot: 0.5rem; /* stock dot */
  --dot-ring: 2px; /* hollow "few left" dot */
  --shadow-float: 0 1px 2px rgb(27 26 24 / 0.08), 0 6px 16px rgb(27 26 24 / 0.08); /* Call pill, bottom bar, menus */

  /* Logo */
  --logo-h: 1.75rem; /* 28 */
  --logo-h-large: 2.5rem; /* links page (phase 19) */

  /* Photo frame */
  --photo-ground: var(--paper);
  --photo-inset: 8%;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-press: 120ms;
  --dur-fast: 150ms;
  --dur: 220ms;
}

/* Kurdish: same sizes, taller lines, no letter-spacing ever. */
html[lang='ckb'] {
  --lh-display: 2.625rem; /* 42 */
  --lh-title: 2.25rem; /* 36 */
  --lh-section: 1.875rem; /* 30 */
  --lh-product: 1.75rem; /* 28 */
  --lh-body: 1.875rem; /* 30 */
  --lh-small: 1.625rem; /* 26 */
  --text-caption: 0.875rem; /* 14 */
  --lh-caption: 1.625rem; /* 26 */
  --lh-price: 1.75rem; /* 28 */
  --lh-price-pdp: 2.25rem; /* 36 */
  --lh-button: 1.5rem; /* 24 */
  --tracking-display: 0;
  --tracking-title: 0;
  --tracking-section: 0;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
  }
}

@media (min-width: 64rem) {
  :root {
    --text-display: 2.75rem; /* 44 */
    --lh-display: 3.125rem; /* 50 */
    --text-title: 2rem; /* 32 */
    --lh-title: 2.5rem; /* 40 */
    --text-section: 1.5rem; /* 24 */
    --lh-section: 1.875rem; /* 30 */
    --text-product: 1.0625rem; /* 17 */
    --lh-product: 1.5rem; /* 24 */
    --text-body: 1.0625rem; /* 17 */
    --lh-body: 1.625rem; /* 26 */
    --text-price: 1.125rem; /* 18 */
    --lh-price: 1.5rem;
    --text-price-pdp: 1.75rem; /* 28 */
    --lh-price-pdp: 2.125rem;
    --logo-h: 2rem; /* 32 */
  }
  html[lang='ckb'] {
    --lh-display: 4rem; /* 64 */
    --lh-title: 3rem; /* 48 */
    --lh-section: 2.25rem; /* 36 */
    --lh-product: 1.875rem; /* 30 */
    --lh-body: 2rem; /* 32 */
    --lh-price: 1.875rem; /* 30 */
    --lh-price-pdp: 2.5rem; /* 40 */
  }
}
