/* ZAYD Design System Foundation
   -----------------------------
   One shared vocabulary for every ZAYD surface. Product-specific styles may
   choose different density and composition, but colour, type, geometry,
   elevation, motion and focus must resolve through these primitives.

   Naming rule:
   - palette tokens describe colour only;
   - semantic tokens describe purpose;
   - component aliases stay inside their owning stylesheet.

   This file intentionally introduces no element selectors, so loading it is
   visually neutral until a surface opts into a token. */

:root {
  /* Brand navy family */
  --z-navy-950: #061436;
  --z-navy-900: #081c4a;
  --z-navy-850: #0b214d;
  --z-navy-825: #0c2358;
  --z-navy-800: #0c285f;
  --z-navy-700: #123072;
  --z-navy-600: #1a3d82;

  /* Action and optical highlight family */
  --z-blue-600: #3565c8;
  --z-blue-500: #3e70d4;
  --z-blue-400: #6599ef;
  --z-ice-300: #9fc3ff;
  --z-ice-100: #edf5ff;

  /* Light surfaces and text */
  --z-white: #ffffff;
  --z-paper: #f6f8fc;
  --z-paper-strong: #f4f7fb;
  --z-line: #dce4ef;
  --z-line-soft: #e9eef5;
  --z-ink: #0b1d48;
  --z-ink-strong: #0f1b33;
  --z-ink-muted: #637087;
  /* Quiet metadata must still clear WCAG AA at the smallest product sizes. */
  --z-ink-faint: #667389;

  /* Readable text roles for navy workspaces and neutral reading surfaces. */
  --z-text-on-dark: #f7f9ff;
  --z-text-on-dark-muted: #b6c2d9;
  --z-text-on-dark-faint: #a9b8d0;
  --z-ink-secondary: #495970;

  /* Semantic status family */
  --z-success: #1e7a57;
  --z-success-bright: #2e9e6e;
  --z-success-tint: #e7f6ef;
  --z-warning: #8a5a1b;
  --z-warning-bright: #e0a34f;
  --z-warning-tint: #fdf4ea;
  --z-danger: #b13f3b;
  --z-danger-bright: #d46f68;
  --z-danger-tint: #fcecea;

  /* Semantic surface roles */
  --z-color-brand-canvas: var(--z-navy-950);
  --z-color-product-canvas: var(--z-navy-900);
  --z-color-product-canvas-soft: var(--z-navy-850);
  --z-color-product-surface: var(--z-navy-800);
  --z-color-action: var(--z-blue-500);
  --z-color-action-strong: var(--z-blue-600);
  --z-color-focus: var(--z-ice-300);
  --z-color-paper: var(--z-paper);
  --z-color-card: var(--z-white);
  --z-color-text: var(--z-ink);
  --z-color-text-strong: var(--z-ink-strong);
  --z-color-text-muted: var(--z-ink-muted);
  --z-color-border: var(--z-line);

  /* Typography: native SF on Apple, self-hosted Inter everywhere else. */
  --z-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "ZAYD Inter", "Inter", "Segoe UI", sans-serif;
  --z-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --z-type-display: clamp(2.375rem, 5vw, 4.5rem);
  --z-type-page: 1.875rem;
  --z-type-section: 1.375rem;
  --z-type-card: 1.0625rem;
  --z-type-body: 0.9375rem;
  --z-type-compact: 0.84375rem;
  --z-type-label: 0.75rem;
  --z-type-meta: 0.71875rem;
  --z-leading-tight: 1.16;
  --z-leading-heading: 1.22;
  --z-leading-body: 1.55;

  /* Four-point spacing grid */
  --z-space-1: 0.25rem;
  --z-space-2: 0.5rem;
  --z-space-3: 0.75rem;
  --z-space-4: 1rem;
  --z-space-5: 1.25rem;
  --z-space-6: 1.5rem;
  --z-space-8: 2rem;
  --z-space-10: 2.5rem;
  --z-space-12: 3rem;
  --z-space-16: 4rem;

  /* One geometry vocabulary. Circular media is the only free exception. */
  --z-radius-compact: 0.5rem;
  --z-radius-control: 0.75rem;
  --z-radius-card: 1rem;
  --z-radius-feature: 1.5rem;
  --z-radius-pill: 999px;

  /* Controls */
  --z-control-compact: 2.5rem;
  --z-control-default: 3rem;
  --z-control-comfortable: 3.5rem;
  --z-target-min: 2.75rem;

  /* Elevation */
  --z-shadow-1: 0 1px 2px rgb(8 28 74 / 5%), 0 6px 18px rgb(8 28 74 / 6%);
  --z-shadow-2: 0 2px 6px rgb(8 28 74 / 7%), 0 16px 40px rgb(8 28 74 / 12%);
  --z-shadow-3: 0 24px 70px rgb(2 10 29 / 28%);
  --z-dark-edge: inset 0 1px 0 rgb(247 249 255 / 10%), 0 1px 0 rgb(2 10 29 / 18%);

  /* Motion */
  --z-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --z-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --z-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --z-duration-fast: 140ms;
  --z-duration-default: 240ms;
  --z-duration-slow: 360ms;

  /* Shared focus treatment. Components decide outline vs box-shadow. */
  --z-focus-ring: 0 0 0 3px rgb(159 195 255 / 55%);
  --z-focus-outline: 3px solid var(--z-color-focus);
  --z-focus-offset: 3px;

  /* Layout */
  --z-content-public: 73.75rem;
  --z-content-product: 70rem;
  --z-content-admin: 67.5rem;
  --z-content-mobile: 35rem;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --z-duration-fast: 1ms;
    --z-duration-default: 1ms;
    --z-duration-slow: 1ms;
  }
}
