/**
 * @file theme.css
 * shadcn/ui-compatible theme variables for cs_theme_tailwind.
 *
 * Token VALUES are the MOS Innovation Hub design language (DESIGN.md +
 * PAGES-PLAN.md, from the approved demo). Variable NAMES stay
 * byte_theme/shadcn-compatible so inherited components restyle without
 * Twig edits (RESOLVED.md decision 1).
 *
 * LIGHT is the default (PAGES-PLAN.md correction Sep 29 — the demo
 * ships light on landing); dark is opt-in via [data-theme="dark"] with
 * the demo's dark palette. AA-safe accents per RESOLVED.md decision 12
 * (light: #0077B6 cyan-blue swap; dark: #4FD8FF cyan).
 */

:root {
  --background: #F6F8FC;
  --foreground: #0B1220;
  --card: rgba(255, 255, 255, 0.94);
  --card-foreground: var(--foreground);
  --primary: #0077B6;
  --primary-foreground: #FFFFFF;
  --secondary: #6D4CFF;
  --secondary-foreground: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.72);
  --muted-foreground: #4D5870;
  --accent: #0077B6;
  --accent-foreground: #FFFFFF;
  --destructive: #BE123C;
  --destructive-foreground: #FFFFFF;
  --border: rgba(20, 37, 66, 0.12);
  --input: rgba(20, 37, 66, 0.2);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --radius: 0.5rem; /* 8px — DESIGN.md */
  --shadow-2xs: 0 1px 3px 0px hsl(220 43% 11% / 0.05);
  --shadow-xs: 0 1px 3px 0px hsl(220 43% 11% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(220 43% 11% / 0.1), 0 1px 2px -1px hsl(220 43% 11% / 0.1);
  --shadow: 0 1px 3px 0px hsl(220 43% 11% / 0.1), 0 1px 2px -1px hsl(220 43% 11% / 0.1);
  --shadow-md: 0 1px 3px 0px hsl(220 43% 11% / 0.1), 0 2px 4px -1px hsl(220 43% 11% / 0.1);
  --shadow-lg: 0 18px 50px rgba(42, 53, 79, 0.16); /* DESIGN.md soft shadow, ref-tuned */
  --shadow-xl: 0 18px 50px rgba(42, 53, 79, 0.16);
  --shadow-2xl: 0 18px 50px rgba(42, 53, 79, 0.16);

  /* Extended demo tokens (not part of the shadcn set). */
  --background-2: #FFFFFF;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.52);
  --border-strong: rgba(20, 37, 66, 0.2);
  --field: rgba(20, 37, 66, 0.04);
  --text-muted: #4D5870;
  --text-soft: #718098; /* large/secondary text only — ~4.0:1 on #F6F8FC */
  --accent-2: #6D4CFF;
  --accent-3: #008F68;
  --accent-4: #B45309;
  --success: #008F68;
  --warning: #B45309;
  --info: #0369A1;
  --danger: #BE123C;
  --gradient: linear-gradient(135deg, #0069D9 0%, #7254F3 48%, #00AFCB 100%);
  --gradient-soft: linear-gradient(135deg, rgba(47, 128, 237, 0.14), rgba(124, 92, 255, 0.1), rgba(37, 224, 163, 0.1));
  --glow: 0 0 28px rgba(0, 119, 182, 0.12);
  --glass-blur: blur(18px);
  --chart-grid: rgba(20, 37, 66, 0.1);
  --chart-text: #4D5870;
  --transition-duration: 220ms; /* DESIGN.md motion */

  /* Set navbar height for hero billboard overlay */
  --navbar-height: calc(var(--spacing) * 15);

  @media (min-width: 768px) {
    --navbar-height: calc(var(--spacing) * 18);
  }
}

/* Arabic pages render in Cairo (demo: fonts switch per direction). */
[dir="rtl"] {
  --font-sans: "Cairo", "Inter", system-ui, sans-serif;
}

/* Dark theme — opt-in via toggle (demo dark palette, DESIGN.md). */
[data-theme="dark"] {
  --background: #05050A;
  --foreground: #F8FBFF;
  --card: rgba(255, 255, 255, 0.075);
  --card-foreground: var(--foreground);
  --primary: #4FD8FF;
  --primary-foreground: #05050A;
  --secondary: #7C5CFF;
  --secondary-foreground: #F8FBFF;
  --muted: rgba(255, 255, 255, 0.05);
  --muted-foreground: #AEB9CF;
  --accent: #4FD8FF;
  --accent-foreground: #05050A;
  --destructive: #FF647C;
  --destructive-foreground: #05050A;
  --border: rgba(255, 255, 255, 0.14);
  --input: rgba(255, 255, 255, 0.16);

  --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.28);
  --shadow-xl: 0 18px 60px rgba(0, 0, 0, 0.28);
  --shadow-2xl: 0 18px 60px rgba(0, 0, 0, 0.28);

  --background-2: #0A1020;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.24);
  --field: rgba(255, 255, 255, 0.08);
  --text-muted: #AEB9CF;
  --text-soft: #7F8AA3;
  --accent-2: #7C5CFF;
  --accent-3: #25E0A3;
  --accent-4: #FFB84D;
  --success: #32E6A0;
  --warning: #FFCB6B;
  --info: #5BCBFF;
  --danger: #FF647C;
  --gradient: linear-gradient(135deg, #2F80ED 0%, #7C5CFF 45%, #35E8FF 100%);
  --glow: 0 0 24px rgba(63, 221, 255, 0.14);
  --glass-blur: blur(22px);
  --chart-grid: rgba(255, 255, 255, 0.1);
  --chart-text: #C9D4E8;
}
