/* =========================================================
   Iveron Design System – colors_and_type.css
   Tech Naturalism — Data as Evolving Systems
   ========================================================= */

/* Primary typeface: HK Grotesk (brand). Served locally from fonts/. */
@font-face { font-family: 'HK Grotesk'; font-style: normal; font-weight: 300;
  src: url('fonts/HKGrotesk-Light.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: italic; font-weight: 300;
  src: url('fonts/HKGrotesk-LightItalic.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: normal; font-weight: 400;
  src: url('fonts/HKGrotesk-Regular.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: italic; font-weight: 400;
  src: url('fonts/HKGrotesk-Italic.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: normal; font-weight: 500;
  src: url('fonts/HKGrotesk-Medium.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: italic; font-weight: 500;
  src: url('fonts/HKGrotesk-MediumItalic.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: normal; font-weight: 600;
  src: url('fonts/HKGrotesk-SemiBold.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: italic; font-weight: 600;
  src: url('fonts/HKGrotesk-SemiBoldItalic.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: normal; font-weight: 700;
  src: url('fonts/HKGrotesk-Bold.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'HK Grotesk'; font-style: italic; font-weight: 700;
  src: url('fonts/HKGrotesk-BoldItalic.otf') format('opentype'); font-display: swap; }

/* UI companion for dense tables — Inter from Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* -----------------------------------------------------
     COLOR TOKENS — raw palette
     ----------------------------------------------------- */

  /* Navy — the foundation of the brand */
  --iv-navy-900: #031521;   /* near-black navy, body text on light bg */
  --iv-navy-800: #093348;   /* PRIMARY brand navy */
  --iv-navy-700: #0E4361;   /* hover / pressed primary */
  --iv-navy-600: #1C3A66;   /* muted navy, secondary accents */
  --iv-navy-300: #5C7A99;   /* muted captions */

  /* Periwinkle / Sky — the "atmospheric" counterpart */
  --iv-sky-500:  #9DB3DE;   /* dusty periwinkle accent */
  --iv-sky-300:  #BFD0EC;   /* light blue on dark bg */
  --iv-sky-100:  #E4ECF7;   /* subtle hover tint on light */

  /* Moss / Olive — the "natural" accent (data as living system) */
  --iv-moss-700: #5C6830;
  --iv-moss-500: #74813F;   /* accent / signal */
  --iv-moss-300: #A8B477;

  /* Neutrals */
  --iv-white:    #FFFFFF;
  --iv-paper:    #F5F6F9;   /* off-white cool paper */
  --iv-fog:      #F1F2F5;   /* lightest bg tint */
  --iv-line:     #DDE3EC;   /* hairline / divider */
  --iv-mute:     #8A97A8;   /* tertiary text */

  /* Semantic — status */
  --iv-danger:   #C2443A;   /* threat / critical */
  --iv-warn:     #D49A2A;   /* warning */
  --iv-ok:       #3E8A5C;   /* resolved / verified */
  --iv-info:     var(--iv-sky-500);

  /* -----------------------------------------------------
     SEMANTIC TOKENS — light surface (default)
     ----------------------------------------------------- */
  --bg:          var(--iv-paper);
  --bg-raised:   var(--iv-white);
  --bg-sunken:   var(--iv-fog);

  --fg:          var(--iv-navy-900);
  --fg-strong:   var(--iv-navy-800);
  --fg-muted:    var(--iv-navy-300);
  --fg-subtle:   var(--iv-mute);
  --fg-inverse:  var(--iv-white);

  --border:      var(--iv-line);
  --border-strong: #C4CDD9;

  --accent:      var(--iv-navy-800);
  --accent-soft: var(--iv-sky-300);
  --signal:      var(--iv-moss-500);

  /* -----------------------------------------------------
     TYPOGRAPHY
     ----------------------------------------------------- */
  --font-display: 'HK Grotesk', system-ui, sans-serif;
  --font-body:    'HK Grotesk', system-ui, sans-serif;
  --font-ui:      'Inter', 'HK Grotesk', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* Scale */
  --fs-hero:     clamp(48px, 6vw, 96px);
  --fs-display:  64px;
  --fs-h1:       48px;
  --fs-h2:       36px;
  --fs-h3:       28px;
  --fs-h4:       22px;
  --fs-lg:       20px;
  --fs-body:     16px;
  --fs-sm:       14px;
  --fs-xs:       12px;
  --fs-eyebrow:  11px;

  /* Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-bold:     700;

  /* Line-heights */
  --lh-tight:   1.02;
  --lh-heading: 1.1;
  --lh-body:    1.55;
  --lh-loose:   1.75;

  /* Letter-spacing */
  --ls-hero:   0.02em;    /* brand guide uses open tracking on display */
  --ls-eyebrow: 0.2em;    /* WIDE for eyebrows: "BY ICTS", section labels */
  --ls-caps:    0.08em;

  /* -----------------------------------------------------
     SPACE, RADIUS, SHADOW, MOTION
     ----------------------------------------------------- */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-7: 32px; --sp-8: 40px;
  --sp-9: 48px;  --sp-10: 64px; --sp-11: 80px; --sp-12: 120px;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(3, 21, 33, 0.06);
  --shadow-sm: 0 2px 6px rgba(3, 21, 33, 0.08), 0 1px 2px rgba(3,21,33,.04);
  --shadow:    0 8px 24px -12px rgba(9, 51, 72, 0.22), 0 2px 6px rgba(3,21,33,.05);
  --shadow-lg: 0 24px 60px -24px rgba(9, 51, 72, 0.32);

  --ease-out:     cubic-bezier(.2, .8, .2, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --dur-fast:  120ms;
  --dur:       220ms;
  --dur-slow:  420ms;
}

/* Dark surface variant — use for immersive panels / hero sections */
[data-iv-theme="dark"], .iv-dark {
  --bg:          var(--iv-navy-800);
  --bg-raised:   #0E3E57;
  --bg-sunken:   var(--iv-navy-900);
  --fg:          var(--iv-fog);
  --fg-strong:   var(--iv-white);
  --fg-muted:    var(--iv-sky-300);
  --fg-subtle:   #7F96AF;
  --fg-inverse:  var(--iv-navy-800);
  --border:      rgba(191, 208, 236, 0.14);
  --border-strong: rgba(191, 208, 236, 0.28);
  --accent:      var(--iv-sky-300);
  --accent-soft: rgba(191, 208, 236, 0.18);
}

/* =========================================================
   SEMANTIC ELEMENT STYLES
   ========================================================= */
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.iv-hero {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
  color: var(--fg-strong);
  text-wrap: balance;
}
h1, .iv-h1 {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-h1); line-height: var(--lh-heading);
  letter-spacing: 0.01em; margin: 0 0 var(--sp-5);
  color: var(--fg-strong);
}
h2, .iv-h2 {
  font-family: var(--font-display); font-weight: var(--fw-medium);
  font-size: var(--fs-h2); line-height: var(--lh-heading);
  margin: 0 0 var(--sp-4); color: var(--fg-strong);
}
h3, .iv-h3 {
  font-family: var(--font-display); font-weight: var(--fw-medium);
  font-size: var(--fs-h3); line-height: 1.2;
  margin: 0 0 var(--sp-3); color: var(--fg-strong);
}
h4, .iv-h4 {
  font-family: var(--font-display); font-weight: var(--fw-medium);
  font-size: var(--fs-h4); line-height: 1.25;
  margin: 0 0 var(--sp-2);
}
p, .iv-p {
  font-size: var(--fs-body); line-height: var(--lh-body);
  max-width: 68ch; margin: 0 0 var(--sp-4);
}
.iv-lead {
  font-size: var(--fs-lg); line-height: 1.5;
  color: var(--fg-muted); max-width: 62ch;
}
.iv-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.iv-caption {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  letter-spacing: 0.02em;
}
code, .iv-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
hr, .iv-rule {
  border: 0; height: 1px; background: var(--border);
  margin: var(--sp-7) 0;
}
a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
a:hover { color: var(--iv-navy-700); border-bottom-color: currentColor; }
