/* ============================================================================
   SAMMONS SOFTWARE LLC — Design Foundations
   Colors + Typography tokens (base + semantic)
   Fonts are vendored in /fonts — no external requests.
   ============================================================================ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
  color-scheme: light dark;

  /* ---- BRAND BLUE (primary) — anchored on theme-color #2563eb ------------- */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;   /* PRIMARY / theme-color */
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --blue-950: #172554;

  /* ---- NEUTRALS (slate) — cool, technical --------------------------------- */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* ---- SEMANTIC STATUS ----------------------------------------------------- */
  --green-500: #16a34a;
  --green-50:  #f0fdf4;
  --amber-500: #d97706;
  --amber-50:  #fffbeb;
  --red-500:   #dc2626;
  --red-50:    #fef2f2;

  /* ============================ SEMANTIC TOKENS ============================= */

  /* Surfaces / backgrounds */
  --bg:          #ffffff;          /* page */
  --bg-subtle:   var(--slate-50);  /* alternating sections */
  --bg-muted:    var(--slate-100); /* wells, inactive */
  --bg-inverse:  var(--slate-950); /* dark / code surfaces */
  --bg-brand:    var(--blue-600);  /* brand-filled blocks */

  /* Foreground / text */
  --fg1: var(--slate-900);   /* primary text / headings */
  --fg2: var(--slate-600);   /* body / secondary */
  --fg3: var(--slate-400);   /* muted, captions, meta */
  --fg-on-dark:   var(--slate-50);
  --fg-on-brand:  #ffffff;

  /* Accent */
  --accent:        var(--blue-600);
  --accent-hover:  var(--blue-700);
  --accent-press:  var(--blue-800);
  --accent-subtle: var(--blue-50);
  --accent-ring:   rgba(37, 99, 235, 0.35);

  /* Lines */
  --border:        var(--slate-200);
  --border-strong: var(--slate-300);
  --border-on-dark: rgba(255,255,255,0.10);

  /* ---- TYPOGRAPHY ---------------------------------------------------------- */
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;

  /* Type scale */
  --text-xs:   0.75rem;   /* 12px — mono meta / tags */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px — body */
  --text-lg:   1.125rem;  /* 18px — lead */
  --text-xl:   1.375rem;  /* 22px — h3 */
  --text-2xl:  1.75rem;   /* 28px — h2 */
  --text-3xl:  2.25rem;   /* 36px — h1 */
  --text-4xl:  3rem;      /* 48px — display sm */
  --text-5xl:  4rem;      /* 64px — display */

  --leading-tight: 1.12;
  --leading-snug:  1.3;
  --leading-normal:1.6;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide:  0.04em;
  --tracking-mono:  0.06em;   /* uppercase mono wordmark / labels */

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;

  /* ---- SPACING (4px base) -------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ---- RADII ----------------------------------------------------------------
     Brand direction: SQUARE corners. All radii are 0 — crisp, technical edges.
     Tokens kept (all 0) so component CSS referencing them stays valid. */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-pill: 0;

  /* ---- SHADOWS (soft, cool-tinted) ----------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.05);
  --shadow-brand: 0 8px 24px rgba(37, 99, 235, 0.25);

  /* ---- MOTION -------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-med:  220ms;
  --dur-slow: 400ms;

  /* ---- SITE-SPECIFIC ------------------------------------------------------- */
  --nav-bg: rgba(255,255,255,.82);
  --hex-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27.71' height='48' viewBox='0 0 27.71 48'%3E%3Cpath d='M13.86 0L27.71 8V24L13.86 32L0 24V8ZM13.86 32V48' fill='none' stroke='%230f172a' stroke-opacity='.07'/%3E%3C/svg%3E");
}

/* Dark mode is system-driven only — no manual toggle. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--slate-950);
    --bg-subtle: #0b1220;
    --bg-muted: var(--slate-800);
    --bg-inverse: var(--slate-50);
    --fg1: var(--slate-100);
    --fg2: var(--slate-400);
    --fg3: var(--slate-500);
    --accent: var(--blue-400);
    --accent-hover: var(--blue-300);
    --accent-press: var(--blue-500);
    --accent-subtle: rgba(59,130,246,.12);
    --border: var(--slate-800);
    --border-strong: var(--slate-700);
    --nav-bg: rgba(2,6,23,.82);
    --hex-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27.71' height='48' viewBox='0 0 27.71 48'%3E%3Cpath d='M13.86 0L27.71 8V24L13.86 32L0 24V8ZM13.86 32V48' fill='none' stroke='%2394a3b8' stroke-opacity='.09'/%3E%3C/svg%3E");
    --shadow-xs: none; --shadow-sm: none; --shadow-md: none;
    --shadow-lg: none; --shadow-brand: none;
  }
}
