/* CODR landing — Şantiye design tokens (L1)
   Source of truth: docs/design-decisions.md. Light mode only: no dark theme, no RTL.
   Test widths / breakpoints: 390 · 768 · 1024 · 1440 (custom properties cannot be used in @media). */

:root {
  color-scheme: light;

  /* ---- Core palette (DECIDED) ---- */
  --petrol: #0E3B3F;
  --orange: #FF6A13;
  --concrete: #E7EAE8;
  --bg: #F8F9F7;

  /* ---- Derived palette (carried from prototype kit.css) ---- */
  --p9: #07262A;
  --p8: #0A3236;
  --p7: var(--petrol);
  --p6: #17505A;
  --p5: #2B6B6B;
  --paper: #FFFFFF;
  --line: #D3D9D6;          /* decorative divider only (1.36:1 on --bg) */
  --line-soft: #E4E8E5;
  --ink: #12171B;           /* text on light and on Orange (6.29:1) */
  --ink-2: #2A3236;
  --muted: #5A6762;         /* secondary text (5.60:1) */
  --faint: #8A9691;         /* decorative / placeholder only (2.90:1) */
  --orange-d: #C84E00;      /* large text / icons only (4.37:1 on --bg) */
  --orange-text: #B94600;   /* PROPOSED: small Orange text (5.05:1 on --bg) */
  --orange-soft: #FFF1E6;

  /* ---- Technical areas (always paired with a text label) ---- */
  --area-fe: #3C6E8F;
  --area-be: #B8860B;
  --area-db: #2E9E6B;
  --area-ts: #B4445A;

  /* ---- Semantic: fill + soft bg + text (text values PROPOSED, AA-checked in docs §1.6) ---- */
  --ok: #1F8A5B;   --ok-bg: #E3F4EB;   --ok-text: #17714A;
  --warn: #B8860B; --warn-bg: #FBF1D6; --warn-text: #8A640A;
  --bad: #B4445A;  --bad-bg: #F9E4E8;  --bad-text: #9E3449;
  --info: #3C6E8F; --info-bg: #E3EEF4; --info-text: #2F5F7E;

  /* ---- Typography ---- */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, monospace;   /* Arabic glyphs fall through to Plex Arabic */
  --font-arabic: 'IBM Plex Sans Arabic', system-ui, sans-serif;

  /* Letter-spacing breaks Arabic letter joining, so every tracking value is zeroed under :lang(ar) below. */
  --tracking-caps: 0.06em;
  --tracking-wide: 0.14em;
  --tracking-tight: -0.02em;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --leading-tight: 1.1;
  --leading-body: 1.55;

  /* ---- Spacing: 8px 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;           /* 16px mobile page gutter; widened per breakpoint by layout components */
  --section-y: clamp(3rem, 5vw, 4rem);   /* vertical padding of every page section: 48px → 64px (two sections ≈ 96–128px apart) */
  --tap-min: 2.75rem;       /* 44px touch target */

  /* ---- Shape: geometric, radius 0–4px only ---- */
  --radius-0: 0;
  --radius-1: 2px;
  --radius-2: 4px;
  --border: 1px solid var(--petrol);
  --border-soft: 1px solid var(--line);

  /* ---- Flat offset shadows (no blur) ---- */
  --shadow-flat: 10px 10px 0 rgba(14, 59, 63, 0.14);
  --shadow-flat-sm: 5px 5px 0 rgba(14, 59, 63, 0.14);
  --shadow-btn: 4px 4px 0 var(--petrol);

  /* ---- Orange corner-notch motif ---- */
  --notch-size: 12px;
  --notch-weight: 3px;
  --notch-color: var(--orange);

  /* ---- Grid-paper backdrop ---- */
  --grid-size: 32px;
  --grid-line: rgba(14, 59, 63, 0.055);

  /* ---- Focus: Petrol 2px (>=3:1); Orange only as outer accent ---- */
  --focus-width: 2px;
  --focus-offset: 2px;
  --focus-color: var(--petrol);
  --focus-color-on-dark: #FFFFFF;

  /* ---- Motion (PROPOSED values, docs §1.8) ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 240ms;
  --dur-story: 600ms;       /* storytelling reveals only */
}

/* Arabic: font swap only. Direction stays LTR (design-decisions §3). */
:root:lang(ar) {
  --font-display: var(--font-arabic);
  --font-body: var(--font-arabic);
  --font-mono: var(--font-arabic), 'IBM Plex Mono', ui-monospace, monospace;   /* Arabic first, so word spaces are not mono-width */
  --tracking-caps: 0;
  --tracking-wide: 0;
  --tracking-tight: 0;
}
