/*
  Tech Relay design tokens — single source of truth shared by the public site
  (site.css) and the admin dashboard (admin.css). Keep this file provider-agnostic:
  no component classes here, only primitives.
*/
:root {
  /* ---------- Brand ---------- */
  --tr-navy: #0b1f3a;
  --tr-navy-dark: #071527;
  --tr-navy-light: #123a75;
  --tr-blue: #1464f2;
  --tr-blue-dark: #0d4cc4;
  --tr-blue-light: #eef4ff;
  --tr-accent: #ff7a1a;
  --tr-accent-dark: #e06a12;
  /* Logo yellow (the wordmark's gold bars) — used for primary CTAs. */
  --tr-yellow: #f5a623;
  --tr-yellow-dark: #dd9114;

  /* ---------- Neutral scale ---------- */
  --tr-gray-50: #f8fafc;
  --tr-gray-100: #f1f5f9;
  --tr-gray-200: #e2e8f0;
  --tr-gray-300: #cbd5e1;
  --tr-gray-400: #94a3b8;
  --tr-gray-500: #64748b;
  --tr-gray-600: #475569;
  --tr-gray-700: #334155;
  --tr-gray-800: #1e293b;
  --tr-gray-900: #0f172a;

  /* Back-compat alias used by earlier public-site CSS */
  --tr-light: var(--tr-gray-50);

  /* ---------- Semantic ---------- */
  --tr-success: #16a34a;
  --tr-success-bg: #dcfce7;
  --tr-danger: #dc2626;
  --tr-danger-bg: #fee2e2;
  --tr-warning: #b45309;
  --tr-warning-bg: #fef3c7;
  --tr-info: #0369a1;
  --tr-info-bg: #e0f2fe;

  /* ---------- Elevation ---------- */
  --tr-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --tr-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --tr-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --tr-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.14);
  --tr-shadow-xl: 0 24px 64px rgba(7, 21, 39, 0.22);

  /* ---------- Radius ---------- */
  --tr-radius-sm: 8px;
  --tr-radius-md: 10px;
  --tr-radius-lg: 14px;
  --tr-radius-xl: 20px;
  --tr-radius-pill: 999px;

  /* ---------- Motion ---------- */
  --tr-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tr-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tr-duration-fast: 150ms;
  --tr-duration-base: 220ms;
  --tr-duration-slow: 400ms;
  --tr-transition: var(--tr-duration-fast) var(--tr-ease);

  /* ---------- Typography ---------- */
  --tr-font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --tr-text-xs: 0.75rem;
  --tr-text-sm: 0.875rem;
  --tr-text-base: 1rem;
  --tr-text-lg: 1.125rem;
  --tr-text-xl: 1.25rem;
  --tr-text-2xl: clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem);
  --tr-text-3xl: clamp(1.875rem, 1.6rem + 1.1vw, 2.25rem);
  --tr-text-4xl: clamp(2.25rem, 1.85rem + 1.8vw, 3rem);
  --tr-text-5xl: clamp(2.75rem, 2.1rem + 2.8vw, 3.75rem);

  /* ---------- Icon badge scale ---------- */
  --tr-icon-badge-sm: 32px;
  --tr-icon-badge-md: 42px;
  --tr-icon-badge-lg: 56px;
  --tr-icon-badge-xl: 72px;

  /* ---------- Spacing scale (for custom components; Bootstrap utilities cover the rest) ---------- */
  --tr-space-1: 0.25rem;
  --tr-space-2: 0.5rem;
  --tr-space-3: 0.75rem;
  --tr-space-4: 1rem;
  --tr-space-5: 1.5rem;
  --tr-space-6: 2rem;
  --tr-space-8: 3rem;
  --tr-space-10: 4rem;

  /* ---------- Premium navy surface (deep gradient + fine grain) ---------- */
  --tr-navy-deepest: #050c1a;
  --tr-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Shared heading rhythm (public site + admin) ---------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--tr-text-4xl); }
h2 { font-size: var(--tr-text-3xl); }
h3 { font-size: var(--tr-text-2xl); }
h4 { font-size: var(--tr-text-xl); letter-spacing: -0.015em; }
h5 { font-size: var(--tr-text-lg); letter-spacing: -0.01em; }
h6 { font-size: var(--tr-text-base); letter-spacing: -0.005em; }

p {
  line-height: 1.65;
}

/* ---------- Shared icon-badge utility (used by both public site and admin) ---------- */

.tr-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--tr-radius-md);
  background: var(--tr-blue-light);
  color: var(--tr-blue);
  width: var(--tr-icon-badge-md);
  height: var(--tr-icon-badge-md);
  font-size: 1.15rem;
}

.tr-icon-badge-sm {
  width: var(--tr-icon-badge-sm);
  height: var(--tr-icon-badge-sm);
  font-size: 0.95rem;
  border-radius: var(--tr-radius-sm);
}

.tr-icon-badge-lg {
  width: var(--tr-icon-badge-lg);
  height: var(--tr-icon-badge-lg);
  font-size: 1.5rem;
}

.tr-icon-badge-xl {
  width: var(--tr-icon-badge-xl);
  height: var(--tr-icon-badge-xl);
  font-size: 2rem;
  border-radius: var(--tr-radius-lg);
}

.tr-icon-badge-circle {
  border-radius: 50%;
}

.tr-icon-badge-success {
  background: var(--tr-success-bg);
  color: var(--tr-success);
}

.tr-icon-badge-warning {
  background: var(--tr-warning-bg);
  color: var(--tr-warning);
}

.tr-icon-badge-navy {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
