/* ==========================================================================
   Hayah Scope — Design tokens
   Colors & typography mirror tokens.json (the official Design System).
   Spacing, radii, motion and the CTA gradient are project rules layered on top.
   ========================================================================== */

:root {
  /* ---- Brand colors (tokens.json → Global Tokens/light) ---- */
  --color-primary-100: #afe4e7;
  --color-primary-200: #87d6da;
  --color-primary-300: #5fc9ce;
  --color-primary-400: #3ab9bf;
  --color-primary: #2e9297;
  --color-primary-600: #21686b;
  --color-primary-700: #133d3f;
  --color-primary-alpha-10: #2e92971a;
  --color-primary-alpha-25: #2e929740;

  --color-secondary-100: #dde7ce;
  --color-secondary: #9ab86d;

  --color-neutral-100: #ffffff;
  --color-neutral-200: #e8e8e8;
  --color-neutral-300: #d2d2d2;
  --color-neutral-900: #4a4a4a;
  --color-neutral-1000: #333333;

  --color-tertiary-100: #b0c7de;

  /* Feedback (tokens.json → Colors/Red) — validation & submission errors only */
  --color-error: #d00416;          /* Red/200 */
  --color-error-alpha-10: #fb37481a; /* Red/Alpha/10 */

  /* ---- Semantic colors ---- */
  --color-page: #ffffff;
  /* Very light gray: Neutral-200 mixed 50/50 with white (#f4f4f4) */
  --color-pill: color-mix(in srgb, var(--color-neutral-200) 50%, var(--color-neutral-100));
  --color-pill-hover: color-mix(in srgb, var(--color-primary-alpha-10), var(--color-pill));
  --color-pill-active: var(--color-primary-100);
  --color-text: var(--color-primary-700);
  --color-text-on-brand: #ffffff;
  --color-indicator: var(--color-primary);
  --color-focus: var(--color-primary);
  --color-scrim: rgb(19 61 63 / 0.32); /* Primary-700 @ 32% */

  /* CTA: horizontal, dark teal under the label (RTL right side),
     resolving through primary teal into secondary green at the icon end. */
  --gradient-cta: linear-gradient(
    270deg,
    var(--color-primary-700) 0%,
    var(--color-primary) 68%,
    var(--color-secondary) 100%
  );

  /* Hero surface: palette tints mixed toward white (aqua → icy blue → near white) */
  --color-hero-aqua: color-mix(in srgb, var(--color-primary-100) 28%, #ffffff);
  --color-hero-ice: color-mix(in srgb, var(--color-tertiary-100) 25%, #ffffff);
  --color-hero-mist: color-mix(in srgb, var(--color-primary-100) 12%, #ffffff);
  --gradient-hero: linear-gradient(
    120deg,
    var(--color-hero-aqua) 0%,
    var(--color-hero-ice) 52%,
    var(--color-hero-mist) 100%
  );

  /* ---- Typography (tokens.json → global) ----
     Sizes b1 and up are scaled ~15% below tokens.json — the full scale read
     oversized on laptop screens. Line heights keep the 1.5 ratio. */
  --font-family: "Noto Kufi Arabic", system-ui, sans-serif;
  --font-weight-bold: 700;
  --font-weight-medium: 500;
  --font-weight-regular: 400;
  --font-size-b3: 14px;   /* fontSize.2 */
  --line-height-b3: 21px; /* lineHeights.9 */
  --font-size-b2: 16px;   /* fontSize.3 */
  --line-height-b2: 24px; /* lineHeights.8 */
  --font-size-b1: 17px;   /* fontSize.4 */
  --line-height-b1: 26px; /* lineHeights.7 */
  --font-size-h7: 20px;   /* fontSize.5 */
  --line-height-h7: 30px; /* lineHeights.6 */
  --font-size-h6: 24px;   /* fontSize.6 */
  --line-height-h6: 36px; /* lineHeights.5 */
  --font-size-h5: 28px;   /* fontSize.7 */
  --line-height-h5: 42px; /* lineHeights.4 */
  --font-size-h4: 32px;   /* fontSize.8 */
  --line-height-h4: 48px; /* lineHeights.3 */
  --font-size-h3: 38px;   /* fontSize.9 */
  --line-height-h3: 57px; /* lineHeights.2 */

  /* ---- Spacing: strict 8-point grid (4px for fine adjustments only).
     The two largest steps are tightened one notch to shorten the page. */
  --space-0-5: 4px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 48px;
  --space-8: 56px;

  /* ---- Radii ---- */
  --radius-pill: 999px;
  --radius-circle: 50%;
  --radius-panel: 32px;
  --radius-xl: 48px;

  /* ---- Elevation (soft, brand-tinted) ---- */
  --shadow-soft: 0 1px 2px rgb(19 61 63 / 0.06), 0 4px 16px rgb(19 61 63 / 0.08);
  --shadow-cta-hover: 0 8px 24px var(--color-primary-alpha-25);
  --shadow-panel: 0 16px 48px rgb(19 61 63 / 0.16);

  /* ---- Motion ---- */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 200ms;
  --duration-base: 250ms;
  --duration-slow: 300ms;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
}
