/* ==========================================================================
   Smart365Solutions — Design tokens
   Base palette, type scale, spacing, radii, shadows and motion are carried
   over verbatim from the Bridge Hire / SimplyApply UI Kit so this site sits
   inside the same design system. Additions specific to Smart365Solutions are
   marked "S365" and are limited to: a mono type role, voice/pipeline state
   colors, and a dark theme (the source kit is light-only).
   ========================================================================== */

:root {
  /* ---- Base palette (Tailwind stops used by the source kit) ---- */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --purple-100: #f3e8ff;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;

  --indigo-600: #4f46e5;

  --green-400: #4ade80;
  --green-50:  #f0fdf4;
  --green-600: #16a34a;
  --green-700: #15803d;

  --red-50:  #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --sky-500: #0ea5e9;
  --pink-500: #ec4899;

  /* S365 — pipeline "in flight" state only */
  --amber-50:  #fffbeb;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --slate-50: #f8fafc;

  --white: #ffffff;

  /* ---- Semantic aliases ---- */
  --color-brand-primary: var(--blue-600);
  --color-brand-primary-hover: var(--blue-700);
  --color-brand-accent: var(--purple-600);
  --color-brand-accent-2: var(--indigo-600);

  --surface-page: var(--white);
  --surface-page-alt: var(--gray-50);
  --surface-card: var(--white);
  --surface-muted: var(--gray-100);
  --surface-sunken: var(--gray-100);
  --surface-glass: rgba(255, 255, 255, 0.8);
  --surface-glass-border: #ffffff;
  --surface-inverse: var(--gray-900);

  --text-heading: var(--gray-900);
  --text-body: var(--gray-700);
  --text-muted: var(--gray-500);
  --text-faint: var(--gray-400);
  --text-on-brand: var(--white);
  --text-link: var(--blue-600);
  --text-link-hover: var(--blue-700);

  --border-default: var(--gray-200);
  --border-subtle: var(--gray-100);
  --border-strong: var(--gray-300);

  --state-success-bg: var(--green-50);
  --state-success-fg: var(--green-600);
  --state-danger-bg: var(--red-50);
  --state-danger-fg: var(--red-500);
  --state-danger-strong: var(--red-600);

  /* S365 — operational state colors. Separate from the brand accent: these
     encode what a thing is *doing*, they are never used decoratively. */
  --state-live-bg: #e0f2fe;
  --state-live-fg: #0284c7;
  --state-live-dot: var(--sky-500);
  --state-pending-bg: var(--amber-50);
  --state-pending-fg: var(--amber-600);

  --gradient-hero: linear-gradient(to bottom right, var(--slate-50), var(--white), var(--blue-50));
  --gradient-brand-text: linear-gradient(to right, var(--blue-600), var(--purple-600), var(--blue-600));
  --gradient-section: linear-gradient(to bottom, var(--gray-50), var(--white));
  --gradient-rule: linear-gradient(to right, var(--blue-500), var(--purple-500));

  /* ---- Typography ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  /* S365 — a utility face the source kit had no need for. Carries latency
     figures, pipeline node ids and API snippets. */
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --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: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* ---- 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-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Radii ---- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ---- Containers ---- */
  --container-max: 80rem;
  --container-content: 72rem;
  --container-narrow: 42rem;

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --shadow-glow-blue: 0 20px 40px rgba(37, 99, 235, 0.35);
  --shadow-glow-blue-soft: 0 25px 50px rgba(59, 130, 246, 0.15);
  --shadow-blue-200: 0 25px 50px -12px rgb(191 219 254 / 0.5);

  --blur-blob: 60px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);

  --duration-fast: 0.2s;
  --duration-base: 0.3s;
  --duration-slow: 0.8s;

  color-scheme: light;
}

/* ==========================================================================
   Dark theme — S365 addition. Only the semantic tokens are redefined; every
   component styles through them, so nothing below this point restyles a
   component directly. The ground is blue-biased near-black rather than a
   neutral grey, and the brand steps one stop lighter to hold contrast.
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --color-brand-primary: var(--blue-500);
    --color-brand-primary-hover: var(--blue-400);
    --color-brand-accent: var(--purple-500);
    --color-brand-accent-2: #818cf8;

    --surface-page: #0b1020;
    --surface-page-alt: #0e1426;
    --surface-card: #131b30;
    --surface-muted: #1a2340;
    --surface-sunken: #0e1426;
    --surface-glass: rgba(19, 27, 48, 0.72);
    --surface-glass-border: #263153;
    --surface-inverse: #060a15;

    --text-heading: #f1f5f9;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --text-on-brand: #ffffff;
    --text-link: var(--blue-400);
    --text-link-hover: #93c5fd;

    --border-default: #24304d;
    --border-subtle: #1b2440;
    --border-strong: #364670;

    --state-success-bg: rgba(22, 163, 74, 0.16);
    --state-success-fg: #4ade80;
    --state-danger-bg: rgba(239, 68, 68, 0.16);
    --state-danger-fg: #f87171;
    --state-danger-strong: #ef4444;

    --state-live-bg: rgba(14, 165, 233, 0.18);
    --state-live-fg: #38bdf8;
    --state-pending-bg: rgba(245, 158, 11, 0.16);
    --state-pending-fg: #fbbf24;

    --blue-50: rgba(59, 130, 246, 0.14);
    --blue-100: rgba(59, 130, 246, 0.22);
    --purple-100: rgba(168, 85, 247, 0.2);
    --green-50: rgba(74, 222, 128, 0.14);
    --gray-100: #1a2340;
    --gray-200: #24304d;

    --gradient-hero: linear-gradient(to bottom right, #0b1020, #0c1224 45%, #101a35);
    --gradient-brand-text: linear-gradient(to right, var(--blue-400), var(--purple-400), var(--blue-400));
    --gradient-section: linear-gradient(to bottom, #0e1426, var(--surface-page));

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.55), 0 4px 6px -4px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.8);
    --shadow-glow-blue: 0 20px 40px rgba(37, 99, 235, 0.45);
    --shadow-glow-blue-soft: 0 25px 50px rgba(59, 130, 246, 0.22);
    --shadow-blue-200: 0 25px 50px -12px rgba(37, 99, 235, 0.45);

    color-scheme: dark;
  }
}

/* The in-page toggle stamps data-theme on <html> and must win over the media
   query in both directions. */

:root[data-theme="dark"] {
  --color-brand-primary: var(--blue-500);
  --color-brand-primary-hover: var(--blue-400);
  --color-brand-accent: var(--purple-500);
  --color-brand-accent-2: #818cf8;

  --surface-page: #0b1020;
  --surface-page-alt: #0e1426;
  --surface-card: #131b30;
  --surface-muted: #1a2340;
  --surface-sunken: #0e1426;
  --surface-glass: rgba(19, 27, 48, 0.72);
  --surface-glass-border: #263153;
  --surface-inverse: #060a15;

  --text-heading: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-on-brand: #ffffff;
  --text-link: var(--blue-400);
  --text-link-hover: #93c5fd;

  --border-default: #24304d;
  --border-subtle: #1b2440;
  --border-strong: #364670;

  --state-success-bg: rgba(22, 163, 74, 0.16);
  --state-success-fg: #4ade80;
  --state-danger-bg: rgba(239, 68, 68, 0.16);
  --state-danger-fg: #f87171;
  --state-danger-strong: #ef4444;

  --state-live-bg: rgba(14, 165, 233, 0.18);
  --state-live-fg: #38bdf8;
  --state-pending-bg: rgba(245, 158, 11, 0.16);
  --state-pending-fg: #fbbf24;

  --blue-50: rgba(59, 130, 246, 0.14);
  --blue-100: rgba(59, 130, 246, 0.22);
  --purple-100: rgba(168, 85, 247, 0.2);
  --green-50: rgba(74, 222, 128, 0.14);
  --gray-100: #1a2340;
  --gray-200: #24304d;

  --gradient-hero: linear-gradient(to bottom right, #0b1020, #0c1224 45%, #101a35);
  --gradient-brand-text: linear-gradient(to right, var(--blue-400), var(--purple-400), var(--blue-400));
  --gradient-section: linear-gradient(to bottom, #0e1426, var(--surface-page));

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.55), 0 4px 6px -4px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.8);
  --shadow-glow-blue: 0 20px 40px rgba(37, 99, 235, 0.45);
  --shadow-glow-blue-soft: 0 25px 50px rgba(59, 130, 246, 0.22);
  --shadow-blue-200: 0 25px 50px -12px rgba(37, 99, 235, 0.45);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --color-brand-primary: var(--blue-600);
  --color-brand-primary-hover: var(--blue-700);
  --color-brand-accent: var(--purple-600);
  --color-brand-accent-2: var(--indigo-600);

  --surface-page: var(--white);
  --surface-page-alt: var(--gray-50);
  --surface-card: var(--white);
  --surface-muted: var(--gray-100);
  --surface-sunken: var(--gray-100);
  --surface-glass: rgba(255, 255, 255, 0.8);
  --surface-glass-border: #ffffff;
  --surface-inverse: var(--gray-900);

  --text-heading: var(--gray-900);
  --text-body: var(--gray-700);
  --text-muted: var(--gray-500);
  --text-faint: var(--gray-400);
  --text-link: var(--blue-600);
  --text-link-hover: var(--blue-700);

  --border-default: var(--gray-200);
  --border-subtle: var(--gray-100);
  --border-strong: var(--gray-300);

  --state-success-bg: var(--green-50);
  --state-success-fg: var(--green-600);
  --state-danger-bg: var(--red-50);
  --state-danger-fg: var(--red-500);

  --state-live-bg: #e0f2fe;
  --state-live-fg: #0284c7;
  --state-pending-bg: var(--amber-50);
  --state-pending-fg: var(--amber-600);

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --purple-100: #f3e8ff;
  --green-50: #f0fdf4;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;

  --gradient-hero: linear-gradient(to bottom right, var(--slate-50), var(--white), var(--blue-50));
  --gradient-brand-text: linear-gradient(to right, var(--blue-600), var(--purple-600), var(--blue-600));
  --gradient-section: linear-gradient(to bottom, var(--gray-50), var(--white));

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow-blue: 0 20px 40px rgba(37, 99, 235, 0.35);
  --shadow-glow-blue-soft: 0 25px 50px rgba(59, 130, 246, 0.15);
  --shadow-blue-200: 0 25px 50px -12px rgb(191 219 254 / 0.5);

  color-scheme: light;
}
