/* ============================================================
   Digital Waves — Design System
   Phase 1.1 — All CSS custom properties (tokens)
   Fonts are loaded in _Layout.cshtml via Google Fonts.
   ============================================================ */

:root {
  /* ── BRAND ── */
  --color-brand-deep:      #003B5C;
  --color-brand-mid:       #008B8B;
  --color-brand-teal:      #1ABC9C;

  /* ── SURFACES ── */
  --color-bg:              #f5fbfa;
  --color-surface:         #ffffff;
  --color-surface-alt:     #eef7f5;
  --color-border:          #d0e8e4;
  --color-border-light:    #e8f4f2;

  /* ── DARK SECTIONS ── */
  --color-dark:            #001e35;
  --color-dark-surface:    #003B5C;
  --color-dark-surface-alt:#00304e;
  --color-dark-border:     rgba(26,188,156,0.15);

  /* ── TEXT ── */
  --color-text-primary:    #003B5C;
  --color-text-secondary:  #2d6a8a;
  --color-text-muted:      #6b9ab8;
  --color-text-inverse:    #f5fbfa;
  --color-text-inverse-muted: rgba(245,251,250,0.65);

  /* ── ACCENT ── */
  --color-accent:          #1ABC9C;
  --color-accent-mid:      #008B8B;
  --color-accent-glow:     rgba(26,188,156,0.20);
  --color-mid-glow:        rgba(0,139,139,0.15);

  /* ── SEMANTIC ── */
  --color-success:         #1ABC9C;
  --color-warning:         #f59e0b;
  --color-error:           #ef4444;
  --color-info:            #008B8B;

  /* ── GRADIENTS (sequence is sacred: #003B5C → #008B8B → #1ABC9C) ── */
  --gradient-brand:      linear-gradient(135deg, #003B5C 0%, #008B8B 50%, #1ABC9C 100%);
  --gradient-brand-h:    linear-gradient(90deg,  #003B5C 0%, #008B8B 50%, #1ABC9C 100%);
  --gradient-brand-text: linear-gradient(90deg,  #008B8B 0%, #1ABC9C 100%);
  --gradient-brand-dark: linear-gradient(180deg, #001e35 0%, #003B5C 100%);

  /* ── TYPOGRAPHY ── */
  --font-display:  'Montserrat', sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* ── FLUID FONT SCALE ── */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  3.5rem;
  --text-hero: clamp(2.5rem, 6vw, 5rem);
  --text-display: clamp(3rem, 8vw, 6.5rem);

  /* ── SPACING ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --section-padding: clamp(4rem, 8vw, 7rem);

  /* ── SHADOWS ── */
  --shadow-sm:  0 1px 3px rgba(0,59,92,0.08);
  --shadow-md:  0 4px 16px rgba(0,59,92,0.12);
  --shadow-lg:  0 12px 40px rgba(0,59,92,0.16);
  --shadow-xl:  0 24px 80px rgba(0,59,92,0.22);
  --shadow-teal: 0 8px 32px rgba(26,188,156,0.25);

  /* ── RADIUS ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ── MOTION ── */
  --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-base:   300ms;
  --duration-slow:   600ms;
  --duration-slower: 900ms;

  /* ── Z-INDEX ── */
  --z-base:    0;
  --z-raised:  10;
  --z-dropdown:200;
  --z-sticky:  300;
  --z-overlay: 400;
  --z-modal:   500;
  --z-loader:  999;

  /* ── LAYOUT ── */
  --nav-height: 70px;
  --container-max: 1240px;
}

/* ── ARABIC OVERRIDE ──
   Cairo handles both display and body in Arabic. */
[lang="ar"] {
  --font-display: 'Cairo', sans-serif;
  --font-body:    'Cairo', sans-serif;
  font-size: 1.05rem;
}

/* ── RTL HELPERS ──
   Components use CSS logical properties throughout;
   these cover the few physical-property edge cases. */
[dir="rtl"] {
  direction: rtl;
  text-align: start;
}

/* ── BOX MODEL ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
