/* =========================================================
   MLT Unlimited Solutions Corp — Design Tokens
   Colors & Typography  (self-hosted variable fonts)
   ========================================================= */

@font-face {
  font-family: 'Raleway';
  src: url('fonts/Raleway.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono.ttf') format('truetype-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- BRAND CORE ------------------------------ */
  --mlt-navy-950: #00101F;
  --mlt-navy-900: #001A35;
  --mlt-navy-800: #002245;
  --mlt-navy-700: #003060;
  --mlt-navy-600: #004070;
  --mlt-navy-500: #005A8F;

  --mlt-blue-600: #0773B1;
  --mlt-blue-500: #2294C9;
  --mlt-blue-400: #40B0E0;
  --mlt-blue-300: #7CCAEA;
  --mlt-blue-200: #B8E2F3;
  --mlt-blue-100: #E4F2FA;
  --mlt-blue-050: #F2F8FC;

  /* ---------- NEUTRALS -------------------------------- */
  --mlt-ink-900:  #0B1420;
  --mlt-ink-700:  #2C3847;
  --mlt-ink-500:  #5B6776;
  --mlt-ink-300:  #A3ADBA;
  --mlt-line:     #E2E6EB;
  --mlt-surface-2:#F4F6F8;
  --mlt-surface-1:#F9FAFB;
  --mlt-surface-0:#FFFFFF;

  /* ---------- SEMANTIC -------------------------------- */
  --mlt-success:  #1F9D6B;
  --mlt-warning:  #E9A13B;
  --mlt-danger:   #DC4848;

  /* ---------- ROLE TOKENS ----------------------------- */
  --bg:           var(--mlt-surface-0);
  --bg-subtle:    var(--mlt-surface-1);
  --bg-muted:     var(--mlt-surface-2);
  --fg1:          var(--mlt-ink-900);
  --fg2:          var(--mlt-ink-700);
  --fg3:          var(--mlt-ink-500);
  --fg-muted:     var(--mlt-ink-300);
  --fg-inverse:   #FFFFFF;

  --brand:        var(--mlt-navy-900);
  --brand-hover:  var(--mlt-navy-800);
  --brand-press:  var(--mlt-navy-950);
  --accent:       var(--mlt-blue-500);
  --accent-hover: var(--mlt-blue-600);

  --border:       var(--mlt-line);
  --border-strong:#C9D1DB;
  --focus-ring:   rgba(34,148,201,0.45);

  /* ---------- TYPOGRAPHY ------------------------------ */
  --font-display: 'Raleway', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Raleway', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs:    12px;
  --fs-sm:    14px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    20px;
  --fs-xl:    24px;
  --fs-2xl:   30px;
  --fs-3xl:   38px;
  --fs-4xl:   48px;
  --fs-5xl:   60px;
  --fs-6xl:   76px;

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-normal:1.5;
  --lh-loose: 1.7;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:  0.04em;
  --tracking-caps:  0.12em;

  /* ---------- SPACING --------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10:40px;
  --space-12:48px;
  --space-16:64px;
  --space-20:80px;
  --space-24:96px;

  /* ---------- RADIUS ---------------------------------- */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* ---------- SHADOWS --------------------------------- */
  --shadow-xs: 0 1px 2px rgba(0, 26, 53, 0.06);
  --shadow-sm: 0 2px 6px rgba(0, 26, 53, 0.08);
  --shadow-md: 0 8px 20px -6px rgba(0, 26, 53, 0.12), 0 2px 6px rgba(0, 26, 53, 0.06);
  --shadow-lg: 0 20px 40px -16px rgba(0, 26, 53, 0.22), 0 4px 10px rgba(0, 26, 53, 0.08);
  --shadow-xl: 0 32px 64px -20px rgba(0, 26, 53, 0.28);
  --shadow-focus: 0 0 0 3px var(--focus-ring);

  /* ---------- MOTION ---------------------------------- */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   360ms;

  /* ---------- GRADIENTS ------------------------------- */
  --gradient-hero: radial-gradient(120% 90% at 80% 20%, #2294C9 0%, #0773B1 35%, #001A35 85%);
  --gradient-soft: linear-gradient(135deg, #E4F2FA 0%, #F9FAFB 100%);
}

/* =========================================================
   SEMANTIC ELEMENT STYLES
   ========================================================= */

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg1);
  background: var(--bg-subtle);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg1);
  letter-spacing: var(--tracking-snug);
  line-height: var(--lh-tight);
  margin: 0;
  font-weight: 600;
}
h1 { font-size: var(--fs-5xl); font-weight: 700; letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--fs-2xl); }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  /* accent-hover rather than accent: 12px caps on a light surface need 4.5:1,
     and #2294C9 only reaches 3.27:1. Overridden inline on navy surfaces. */
  color: var(--accent-hover);
  margin: 0;
}

p { margin: 0 0 var(--space-4); color: var(--fg2); }
small { font-size: var(--fs-sm); color: var(--fg3); }
strong, b { font-weight: 600; color: var(--fg1); }

a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--accent-hover); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-8) 0; }

::selection { background: var(--mlt-blue-200); color: var(--mlt-navy-900); }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

/* The standard ring only reaches ~2:1 against #001A35; WCAG asks for 3:1.
   Blue-300 on the navy band gets it to ~7:1. */
.on-navy :focus-visible { box-shadow: 0 0 0 3px rgba(124, 202, 234, 0.9); }

/* ---------- Page-level animation ---------------------- */
@keyframes mlt-orbit {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%      { opacity: .8; transform: scale(1.06); }
}
@keyframes mlt-scan {
  0%   { transform: translateY(-100%); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(760%); opacity: 0; }
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

input::placeholder, textarea::placeholder { color: var(--fg-muted); }
.on-navy input::placeholder, .on-navy textarea::placeholder { color: rgba(255,255,255,0.4); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
