/* ============================================================
   Codeator — Colors & Type
   Core design tokens. Import this first.
   Source: C:\Users\Abdu\.claude\Codeator Design System\colors_and_type.css
   Only change vs. source: @font-face url() paths point to ../fonts/.
   ============================================================ */

/* JetBrains Mono — single typeface, all roles (display, sans, mono).
   Self-hosted, variable-font files covering weights 100–800 + italics. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations'),
       url('../fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Italic-VariableFont_wght.ttf') format('truetype-variations'),
       url('../fonts/JetBrainsMono-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* --- Brand colors (extracted from logo) ------------------- */
  --brand-crimson:        #C3122E;   /* core red — the crest */
  --brand-crimson-bright: #E51E3D;   /* hover / active */
  --brand-crimson-deep:   #8A0A21;   /* pressed / deep accent */
  --brand-crimson-wine:   #5C0818;   /* darkest, for compositing on navy */

  --brand-navy:           #0E1124;   /* deepest, page bg in dark mode */
  --brand-navy-core:      #191D38;   /* the helmet */
  --brand-steel:          #353B54;   /* lighter navy, shadow/gradient */
  --brand-slate:          #5A6078;   /* UI neutral cool */

  --brand-bone:           #F6F1E8;   /* warm off-white, page bg in light mode */
  --brand-ivory:          #FBF8F2;   /* card fill on bone */
  --brand-parchment:      #EDE6D6;   /* subtle surface */

  --brand-gold:           #C9A24A;   /* rare accent — achievements, "awarded" */

  /* --- Neutrals (cool-tinted to agree with navy) ------------ */
  --gray-950: #0E1124;
  --gray-900: #191D38;
  --gray-800: #252A44;
  --gray-700: #353B54;
  --gray-600: #4C5369;
  --gray-500: #6B7188;
  --gray-400: #9098AA;
  --gray-300: #BCC1CD;
  --gray-200: #DBDEE4;
  --gray-100: #ECEEF2;
  --gray-50:  #F5F6F8;

  /* --- Semantic (light mode default) ------------------------ */
  --bg:         var(--brand-bone);
  --bg-raised: var(--brand-ivory);
  --bg-sunken:  var(--brand-parchment);
  --bg-inverse: var(--brand-navy);

  --fg:         var(--brand-navy);      /* primary text */
  --fg-muted:   var(--gray-700);
  --fg-subtle:  var(--gray-500);
  --fg-inverse: var(--brand-bone);

  --border:         var(--gray-200);
  --border-strong:  var(--gray-300);
  --border-inverse: var(--gray-800);

  --accent:         var(--brand-crimson);
  --accent-hover:   var(--brand-crimson-bright);
  --accent-pressed: var(--brand-crimson-deep);
  --on-accent:      var(--brand-bone);

  --success: #2F8F5E;
  --warning: #C9A24A;
  --danger:  var(--brand-crimson);
  --info:    #3C6BB5;

  /* --- Typography faces ------------------------------------- */
  --font-display: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-sans:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* --- Type scale (1.25 — major third) --------------------- */
  --fs-xs:  12px;
  --fs-sm:  14px;
  --fs-md:  16px;     /* base */
  --fs-lg:  18px;
  --fs-xl:  22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;
  --fs-5xl: 64px;
  --fs-6xl: 88px;

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-display: 0.08em;   /* Cinzel wants this — Roman-inscription look */
  --tracking-mono:   -0.01em;

  /* --- Spacing scale (4px base) ----------------------------- */
  --s-0:   0;
  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* --- Radii (restrained — the brand is sharper than "soft SaaS") --- */
  --radius-none: 0;
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   16px;
  --radius-pill: 999px;

  /* --- Borders ---------------------------------------------- */
  --border-hairline: 1px;
  --border-regular:  1.5px;
  --border-strong-w: 2px;

  /* --- Shadows — navy-tinted, crisp, never puffy ----------- */
  --shadow-xs: 0 1px 0 rgba(14, 17, 36, 0.06);
  --shadow-sm: 0 1px 2px rgba(14, 17, 36, 0.08), 0 1px 0 rgba(14, 17, 36, 0.04);
  --shadow-md: 0 2px 6px rgba(14, 17, 36, 0.10), 0 1px 2px rgba(14, 17, 36, 0.06);
  --shadow-lg: 0 8px 24px rgba(14, 17, 36, 0.12), 0 2px 6px rgba(14, 17, 36, 0.08);
  --shadow-xl: 0 24px 60px rgba(14, 17, 36, 0.20), 0 8px 20px rgba(14, 17, 36, 0.10);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-crimson-glow: 0 0 0 3px rgba(195, 18, 46, 0.18);

  /* --- Motion ----------------------------------------------- */
  --ease-out:      cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.6, 0.05, 0.4, 1);
  --ease-snap:     cubic-bezier(0.2, 0.9, 0.3, 1.2); /* overshoot, used sparingly */
  --dur-fast:   120ms;
  --dur-med:    200ms;
  --dur-slow:   320ms;
}

/* Dark scheme — the brand's "native" surface */
[data-theme="dark"], .theme-dark {
  --bg:         var(--brand-navy);
  --bg-raised:  var(--brand-navy-core);
  --bg-sunken:  #080A18;
  --bg-inverse: var(--brand-bone);

  --fg:         var(--brand-bone);
  --fg-muted:   var(--gray-300);
  --fg-subtle:  var(--gray-400);
  --fg-inverse: var(--brand-navy);

  --border:         var(--gray-800);
  --border-strong:  var(--gray-700);
  --border-inverse: var(--gray-200);

  --on-accent: var(--brand-bone);
}

/* ============================================================
   Element defaults
   ============================================================ */
html, body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--fg);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-5xl); line-height: var(--lh-tight);  }
h2 { font-size: var(--fs-4xl); line-height: var(--lh-tight);  }
h3 { font-size: var(--fs-3xl); line-height: var(--lh-snug);   }
h4 { font-size: var(--fs-2xl); line-height: var(--lh-snug);   }
h5 { font-size: var(--fs-xl);  line-height: var(--lh-snug);   }
h6 { font-size: var(--fs-lg);  line-height: var(--lh-snug); letter-spacing: -0.01em; }

/* Display size — use sparingly, for landing-page heroes */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-6xl);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: none;
}

/* Eyebrow — small uppercase label above a heading */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

p { margin: 0; text-wrap: pretty; }
.lead { font-size: var(--fs-lg); line-height: var(--lh-relaxed); color: var(--fg-muted); }

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-feature-settings: "calt" 1, "liga" 0;
}
code {
  font-size: 0.92em;
  padding: 0.12em 0.4em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent-pressed);
}
[data-theme="dark"] code { color: var(--brand-crimson-bright); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
a:hover   { color: var(--accent-hover); border-bottom-color: currentColor; }
a:active  { color: var(--accent-pressed); }

::selection { background: var(--brand-crimson); color: var(--brand-bone); }
