/* ==========================================================================
   ZENNTAC — Design tokens
   Source: Design System v1.0 (palette, type, spacing, radius, motion)
           Handoff v1.2 §13–14 (brand token names + semantic accessibility mapping,
           per Design System Accessibility Reconciliation v1.2 — authoritative)
   Brand tokens are NOT to be altered here without a governed decision.
   ========================================================================== */

/* ---- Self-hosted fonts (no third-party font requests; see README §Legal/data) ---- */
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: "Manrope";
  src: url("../assets/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); }

:root {
  /* ---- Brand palette (Handoff §13 — LOCKED) ---- */
  --color-obsidian: #0B0B10;
  --color-surface-dark: #14141C;
  --color-light: #F5F5F2;
  --color-white: #FFFFFF;
  --color-dark-text: #111116;
  --color-muted-text: #73737D;
  --color-electric-violet: #8B5CF6;
  --color-light-violet: #A78BFA;
  --color-dark-violet: #6D28D9;

  /* ---- Semantic mapping (Handoff §14 — Reconciliation v1.2) ---- */
  --text-primary-on-light: var(--color-dark-text);
  --text-primary-on-dark: var(--color-white);
  --text-secondary-on-light: var(--color-dark-text);
  --text-muted-on-white: var(--color-muted-text);   /* White surfaces ONLY */
  --text-secondary-on-dark: var(--color-light-violet);

  --link-on-light: var(--color-dark-violet);
  --link-on-dark: var(--color-light-violet);

  --cta-primary-bg: var(--color-dark-violet);
  --cta-primary-text: var(--color-white);
  --cta-border-on-dark: var(--color-white);
  --cta-primary-hover-bg: var(--color-dark-violet);      /* unchanged on hover */
  --cta-primary-hover-border: var(--color-white);
  --cta-primary-hover-cue: var(--color-light-violet);    /* v1.2 rev. item 4: 2px inset cue */

  --focus-ring-on-dark: var(--color-white);
  --focus-ring-on-light: var(--color-dark-text);

  /* Electric Violet: accent only (decorative strokes/glows). Never body text on
     Light/White; never the CTA background. */
  --accent: var(--color-electric-violet);

  /* ---- Borders (Design System v1.0) ---- */
  --border-on-dark: rgba(255, 255, 255, 0.10);
  --border-on-light: rgba(0, 0, 0, 0.08);

  /* ---- Typography ---- */
  --font-latin: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Manrope", system-ui, sans-serif;
  --font-body: var(--font-latin);

  /* Desktop scale (DS v1.0) — fluid down to mobile scale */
  --fs-display: clamp(3rem, 2.1rem + 3.6vw, 4.5rem);   /* 48 → 72 */
  --fs-h2: clamp(2rem, 1.6rem + 1.6vw, 2.625rem);      /* 32 → 42 */
  --fs-h3: clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem);    /* 24 → 28 */
  --fs-h4: 1.375rem;                                   /* 22 */
  --fs-body-lg: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem); /* 17 → 20 */
  --fs-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem); /* 16 → 17 */
  --fs-small: 0.875rem;                                /* 14 */
  --lh-tight: 1.05;
  --lh-heading: 1.15;
  --lh-body: 1.6;
  --tracking-eyebrow: 0.12em;

  /* ---- Spacing (8px system) ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 80px;
  --space-9: 96px; --space-10: 120px; --space-11: 160px;

  /* ---- Layout ---- */
  --container-max: 1280px;
  --gutter: 24px;
  --grid-gap: 24px;
  --section-pad: clamp(var(--space-8), 6vw + 2rem, var(--space-10));

  /* ---- Radius ---- */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 28px;
  --radius-button: 12px;

  /* ---- Motion (Quiet Motion) ---- */
  --dur-1: 150ms; --dur-2: 250ms; --dur-3: 400ms; --dur-4: 600ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- Interaction geometry ---- */
  --focus-width: 3px;
  --focus-offset: 3px;
  --touch-min: 44px;
  --header-h: 72px;
}

/* Arabic typography (applied when an AR locale is released; harness-testable) */
:root:lang(ar) {
  --font-body: var(--font-arabic);
  --lh-body: 1.8;
  --fs-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem); /* 17–18px per DS */
  --tracking-eyebrow: 0;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; --dur-4: 0ms; }
}
