/* ============================================================
   AaaS Design System — Colors & Type
   Basalt + Circuit. Dark-first, warm-gray light theme.
   Locked tokens (do not hardcode hex; reference CSS vars).
   ============================================================ */

@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");

:root,
[data-theme="dark"] {
  /* --- Basalt surfaces (warm gray, never pure white) --- */
  --basalt-deep:    8 8 9;        /* page bg */
  --basalt-surface: 26 26 28;     /* glass surface */
  --basalt-bright:  42 42 46;     /* 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;          /* 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;         /* 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;          /* "all-clear" / success only */
  --accent-teal-dim:rgba(0, 212, 184, 0.15);
  --pastel-lavender: 147 154 255;       /* "learning" / model badge only */
  --pastel-gold:     248 217 116;       /* "new" / "alert-soft" only */

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

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

  /* --- Foundation tokens --- */
  --radius:      0.75rem;                                  /* all surfaces */
  --liquid-ease: cubic-bezier(0.23, 1, 0.32, 1);          /* all transitions */

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

  color-scheme: dark;
}

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

/* ============================================================
   Base type — body uses sentence case, never uppercase
   ============================================================ */
html, body {
  font-family: var(--font-inter);
  background: rgb(var(--basalt-deep));
  color: rgb(var(--text));
  -webkit-font-smoothing: antialiased;
}

/* H1 baseline — Inter 900, UPPERCASE, tight tracking, trailing period
   (display H1 always carries a 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;
}

/* ============================================================
   Semantic tokens (ready-to-use)
   ============================================================ */
.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.  rgba(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: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.50);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Anti-pattern reminders (do not delete these comments)
   ✗ 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
*/
