/* ============================================================
   AaaS Design System — Canonical Entry Point
   ------------------------------------------------------------
   Link THIS file:  <link rel="stylesheet" href="styles.css">
   It defines the full token + type foundation (colors, type,
   radius, easing, glass, semantic helpers) as real rules.
   Toggle data-theme="light" on <html>/<body> for light mode;
   dark is the default. UI-kit stylesheets (in each ui_kits product
   folder) are component-scoped — link those in addition on kit pages.
   ============================================================ */

/* @font-face source — Inter + JetBrains Mono (Google Fonts CDN).
   Must stay first: @import rules precede all other rules. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ============================================================
   COLOR TOKENS — Basalt + Circuit. Dark-first, warm-gray light.
   Channels are space-separated so you can do rgb(var(--x) / .15).
   Never hardcode hex; always reference these vars.
   ============================================================ */
:root,
[data-theme="dark"] {
  /* --- Basalt surfaces (warm gray, never pure white) --- */
  --basalt-deep:    8 8 9; /* @kind color */        /* page bg */
  --basalt-surface: 26 26 28; /* @kind color */     /* glass surface */
  --basalt-bright:  42 42 46; /* @kind color */     /* lifted card / hover */

  /* --- BRAND LEADS (the only two colors that ever dominate) ---
     Circuit and Red are co-equal. Use them generously: headings, CTAs,
     active states, hover borders, glow rings, topic labels, status. */
  --circuit-glow:   0 243 255; /* @kind color */         /* the blue/green — primary brand */
  --circuit-dim:    rgba(0, 243, 255, 0.15);
  --circuit-glow-strong: rgba(0, 243, 255, 0.4);
  --accent-red:     244 63 108; /* @kind color */        /* primary brand (co-lead) */
  --accent-red-dim: rgba(244, 63, 108, 0.15);
  --accent-red-glow:rgba(244, 63, 108, 0.4);

  /* --- SUPPORTIVE (contextual use only, never dominant) ---
     Use for: one stat in a strip; one badge variant; a single status pill;
     log-line prefix coloring. Never as a hero, button fill, or section accent. */
  --accent-teal:    0 212 184; /* @kind color */         /* "all-clear" / success only */
  --accent-teal-dim:rgba(0, 212, 184, 0.15);
  --pastel-lavender: 147 154 255; /* @kind color */      /* "learning" / model badge only */
  --pastel-gold:     248 217 116; /* @kind color */      /* "new" / "alert-soft" only */

  /* --- Text --- */
  --text:        224 224 222; /* @kind color */
  --text-muted:  rgba(224, 224, 222, 0.5);

  /* --- Border / chrome --- */
  --border:      rgba(255, 255, 255, 0.05);
  --grain-opacity: 0.015; /* @kind other */
  --aura-blend:  screen; /* @kind other */

  /* --- Type families --- */
  --font-inter: "Inter", system-ui, -apple-system, sans-serif;
  --font-jetbrains: "JetBrains Mono", ui-monospace, monospace;

  /* --- Foundation tokens --- */
  --radius:      0.75rem;                          /* 12px — all surfaces */
  --radius-btn:  0.6rem;                           /* buttons */
  --liquid-ease: cubic-bezier(0.23, 1, 0.32, 1); /* @kind other */  /* all transitions */

  /* --- Elevation --- */
  --shadow-glass:  inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-hover:  0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--circuit-dim);
  --shadow-menu:   0 12px 40px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

[data-theme="light"] {
  --basalt-deep:    228 228 224; /* @kind color */ /* warm gray, NEVER #fff */
  --basalt-surface: 218 218 213; /* @kind color */
  --basalt-bright:  205 205 198; /* @kind color */
  --circuit-glow:   0 120 145; /* @kind color */
  --circuit-dim:    rgba(0, 120, 145, 0.15);
  --circuit-glow-strong: rgba(0, 120, 145, 0.4);
  --accent-red:     190 42 82; /* @kind color */
  --accent-red-dim: rgba(190, 42, 82, 0.10);
  --accent-red-glow:rgba(190, 42, 82, 0.30);
  --accent-teal:    0 140 120; /* @kind color */
  --accent-teal-dim:rgba(0, 140, 120, 0.12);
  --pastel-lavender:100 106 200; /* @kind color */
  --pastel-gold:    190 155 40; /* @kind color */
  --text:           17 17 19; /* @kind color */
  --text-muted:     rgba(17, 17, 19, 0.6);
  --border:         rgba(0, 0, 0, 0.08);
  --grain-opacity:  0.01; /* @kind other */
  --aura-blend:     multiply; /* @kind other */
  color-scheme: light;
}

/* ============================================================
   TYPOGRAPHY — Inter (visual) + JetBrains Mono (system/code).
   Body is NEVER uppercase. Mono labels are NEVER bold (700+).
   ============================================================ */
html, body {
  font-family: var(--font-inter);
  background: rgb(var(--basalt-deep));
  color: rgb(var(--text));
  -webkit-font-smoothing: antialiased;
}

/* H1 — Inter 900, UPPERCASE, tight tracking, trailing period */
h1, .h1 {
  font-family: var(--font-inter);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.85;
  font-size: clamp(3rem, 6vw, 5.5rem);
}
/* H2 — display section header */
h2, .h2 {
  font-family: var(--font-inter);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-size: clamp(2rem, 4vw, 3rem);
}
/* H3 — content header, Title Case */
h3, .h3 {
  font-family: var(--font-inter);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  font-size: 1.5rem;
}
/* H4 — content sub-header, Title Case */
h4, .h4 {
  font-family: var(--font-inter);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.3;
  font-size: 1.125rem;
}
/* Body */
p, .body {
  font-family: var(--font-inter);
  font-weight: 400;
  line-height: 1.6;
  font-size: 1rem;
}
.body-sm   { font-size: 0.875rem; line-height: 1.55; }
.body-lg   { font-size: 1.125rem; line-height: 1.65; }

/* Mono labels — UPPERCASE, never bold (700+) */
.label-overline {
  font-family: var(--font-jetbrains);
  font-weight: 500;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
}
.label-nav {
  font-family: var(--font-jetbrains);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.label-system {
  font-family: var(--font-jetbrains);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: normal;
}
/* CTA text — Inter, 700, UPPERCASE */
.cta-text {
  font-family: var(--font-inter);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
/* Code / mono inline */
code, .mono {
  font-family: var(--font-jetbrains);
  font-weight: 400;
  font-size: 0.875em;
}

/* ============================================================
   FOUNDATIONS — helpers, glass, glow, selection.
   ============================================================ */
.fg-primary   { color: rgb(var(--text)); }
.fg-muted     { color: var(--text-muted); }
.fg-circuit   { color: rgb(var(--circuit-glow)); }
.fg-red       { color: rgb(var(--accent-red)); }
.fg-teal      { color: rgb(var(--accent-teal)); }

.bg-deep      { background: rgb(var(--basalt-deep)); }
.bg-surface   { background: rgb(var(--basalt-surface)); }
.bg-bright    { background: rgb(var(--basalt-bright)); }

/* Glass surface — nav + cards. rgb(26 26 28 / 0.6) + 24px blur */
.glass {
  background: rgb(var(--basalt-surface) / 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius);
}
[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.50);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Glow utilities */
.glow-circuit { box-shadow: 0 0 24px var(--circuit-dim); }
.glow-red     { box-shadow: 0 0 24px var(--accent-red-dim); }
.text-glow     { text-shadow: 0 0 12px rgb(var(--circuit-glow) / 0.6); }
.text-glow-red { text-shadow: 0 0 12px rgb(var(--accent-red) / 0.6); }

/* Brand-colored selection */
::selection { background: var(--accent-red-dim); color: rgb(var(--text)); }

/* Anti-pattern reminders (do not delete)
   ✗ never uppercase body            ✗ never bold (700+) on mono labels
   ✗ never gradient-text mix circuit + red
   ✗ buttons on solid blue/cyan must use BLACK text (legibility)
   ✓ display H1 always trailing period
   ✓ all surfaces use --radius (0.75rem)   ✓ all transitions use --liquid-ease
*/
