/* =====================================================================
   AUTO-SYNCED FROM ~/repos/open-design/design-systems/myrgic/colors_and_type.css
   Do not edit here. Source-of-truth is the canonical Myrgic design system.
   To update: edit there, then re-sync into this repo.
   Last synced: 2026-05-07
   ===================================================================== */

/* =================================================================
   Myrgic — Colors & Type
   =================================================================
   Loaded everywhere. Defines:
   - color tokens (background, surfaces, borders, text, accent)
   - type stack (Fraunces display + JetBrains Mono body)
   - semantic type rules (h1..h4, body, mono, eyebrow, tagline)
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---- Background / surface scale ----
     Five steps from deepest substrate to elevated surface.
     bg → bg-card → bg-elevated step in equal perceptual increments. */
  --bg:           #0a0a0f;   /* page substrate — the "void" */
  --bg-card:      #13131a;   /* default card / panel */
  --bg-elevated:  #1a1a23;   /* modal / popover / inset */

  /* ---- Borders ---- */
  --border:        #2d2d3b;
  --border-light:  #3a3a4a;

  /* ---- Text scale (high → low) ---- */
  --fg:    #fafafa;          /* primary text, headings */
  --fg-2:  #d4d4d8;          /* body */
  --fg-3:  #a1a1aa;          /* muted / secondary */
  --fg-4:  #71717a;          /* tertiary / metadata */

  /* ---- Accent ----
     Single accent for emphasis, links, focus rings, brand markers.
     The mark itself uses the full chromatic spectrum — that range
     is reserved and never appears on static surfaces. */
  --accent:        #8b5cf6;
  --accent-soft:   rgba(139, 92, 246, 0.15);

  /* ---- Spectrum ----
     v1: reserved for the mark only.
     v2: chromatic is allowed off-mark — gradient washes, sub-brand
     hue bands, gradient text on rare display moments, hover halos.
     Static UI surfaces still stay neutral; chromatic is an event. */
  --spectrum-0:   hsl(0,   70%, 60%);
  --spectrum-60:  hsl(60,  70%, 60%);
  --spectrum-120: hsl(120, 70%, 60%);
  --spectrum-180: hsl(180, 70%, 60%);
  --spectrum-240: hsl(240, 70%, 60%);
  --spectrum-300: hsl(300, 70%, 60%);

  /* ---- Sub-brand hue bands ----
     Each Myrgic sub-brand owns one slice of the spectrum. The mark
     can be tinted to its band; a wash, accent, or gradient text uses
     these as anchors. Centroid hue + wide band for gradients. */
  --hue-myrgic:        260;   /* parent — full spectrum, accent at 260 */
  --hue-cogos:         262;   /* substrate / kernel — violet→indigo */
  --hue-mod3:          188;   /* voice / modality — cyan→teal */
  --hue-research:       42;   /* knowledge — amber→gold */
  --hue-constellation: 322;   /* trust / identity — magenta */

  --brand-cogos:         hsl(262, 70%, 62%);
  --brand-mod3:          hsl(188, 65%, 60%);
  --brand-research:      hsl( 42, 72%, 62%);
  --brand-constellation: hsl(322, 68%, 62%);

  --grad-cogos:    linear-gradient(135deg, hsl(245 70% 60%), hsl(285 70% 65%));
  --grad-mod3:     linear-gradient(135deg, hsl(170 65% 58%), hsl(210 65% 62%));
  --grad-research: linear-gradient(135deg, hsl( 28 72% 60%), hsl( 58 72% 64%));
  --grad-constellation: linear-gradient(135deg, hsl(305 68% 60%), hsl(340 68% 64%));
  --grad-spectrum: linear-gradient(135deg,
                     hsl(  0 70% 60%), hsl( 60 70% 60%), hsl(120 70% 60%),
                     hsl(180 70% 60%), hsl(240 70% 60%), hsl(300 70% 60%),
                     hsl(360 70% 60%));

  /* ---- Type families ---- */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-body:    'JetBrains Mono', ui-monospace, monospace;

  /* ---- Type sizes ---- */
  --t-hero:    clamp(56px, 11vw, 96px);
  --t-h1:      40px;
  --t-h2:      32px;
  --t-h3:      22px;
  --t-h4:      18px;
  --t-body:    14px;
  --t-small:   12px;
  --t-meta:    11px;   /* eyebrow / tagline */
  --t-micro:   10px;

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

  /* ---- Radii ---- */
  --r-1: 4px;          /* buttons, chips, inline */
  --r-2: 6px;          /* small cards, swatches */
  --r-3: 8px;          /* default card / panel */
  --r-4: 10px;         /* large container */
  --r-pill: 999px;

  /* ---- Borders ---- */
  --bw: 1px;

  /* ---- Shadows ----
     Myrgic uses borders, not shadows, for surface separation.
     The one shadow that exists is for true elevation (modals). */
  --elev-1: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --elev-2: 0 16px 48px -12px rgba(0, 0, 0, 0.75);

  /* ---- Motion ---- */
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:       100ms;
  --dur-base:       180ms;
  --dur-slow:       320ms;
}

/* =================================================================
   Base
   ================================================================= */
html, body {
  margin: 0;
  background: var(--bg);
}
body {
  color: var(--fg-2);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }

/* =================================================================
   Semantic type
   =================================================================
   Rule of thumb: Fraunces for headings + display; Mono for body and
   anything structural. The display axis (`opsz` 144) only at large
   sizes; smaller Fraunces uses the body opsz. */

.h-hero {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--fg);
  font-size: var(--t-hero);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  margin: 0;
}
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--fg);
  font-size: var(--t-h1);
  letter-spacing: -0.025em;
  line-height: 1.1;
  /* opsz tracks rendered px size — 144 is for hero-only display.
     At h1 size the high-contrast hairlines spider-web; opsz≈px keeps
     the thick:thin ratio readable. */
  font-variation-settings: 'opsz' 40;
  margin: 0;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--fg);
  font-size: var(--t-h2);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-variation-settings: 'opsz' 32;
  margin: 0;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--fg);
  font-size: var(--t-h3);
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-variation-settings: 'opsz' 36;
  margin: 0;
}
h4, .h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--fg);
  font-size: var(--t-h4);
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0;
}

p, .body {
  font-family: var(--font-mono);
  font-size: var(--t-body);
  color: var(--fg-3);
  line-height: 1.7;
  margin: 0 0 var(--s-4);
}
p:last-child { margin-bottom: 0; }

code, .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--fg-2);
}

/* Small structural meta — used for section numbers, labels, taglines */
.eyebrow, .tagline {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  color: var(--fg-4);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

/* =================================================================
   Utilities — accent ring (focus), divider
   ================================================================= */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.divider {
  border: 0;
  border-top: var(--bw) solid var(--border);
  margin: var(--s-5) 0;
}
