/* ================================
   TYPOGRAPHY SYSTEM
   ================================
   Consolidated, responsive font system for entire app.
   All font definitions use CSS variables from color_palette.css

   Base font size is responsive (17-19px) and readable for
   military/intelligence UI. All other sizes scale from base.

   FONT HIERARCHY:
   - h1 / .text-h1    : ~22px (--font-size-3xl)  - Main page titles
   - h2 / .text-h2    : ~19px (--font-size-2xl)  - Panel headers
   - h3 / .text-h3    : ~18px (--font-size-xl)   - Section headers
   - h4 / .text-h4    : ~17px (--font-size-lg)   - Subsection headers
   - h5 / .text-h5    : ~15px (--font-size-md)   - Minor headers
   - h6 / .text-h6    : ~13px (--font-size-sm)   - Smallest headers
   - body / p         : 15-17px (--font-size-base) - Body text
   - label            : ~13px (--font-size-sm)   - Form labels
   - .text-small      : ~13px (--font-size-sm)   - Small text
   - .text-xs         : ~14px (--font-size-xs)   - Default panel text
   - .text-2xs        : ~10-11px (--font-size-2xs) - Badges, dense labels

   FONT WEIGHTS:
   - 400 (normal)    : Body text, inputs
   - 500 (medium)    : Labels, buttons
   - 600 (semibold)  : Headers (h2-h6)
   - 700 (bold)      : Main titles (h1), emphasis

   ================================ */

@import url("color_palette.css");

/* ================================
   TYPOGRAPHY VARIABLES
   ================================ */

:root {
  /* Font Sizes - Responsive and scalable (increased ~20% for readability) */
  --font-size-base: clamp(17px, 1.5vw, 19px);
  --font-size-2xs: calc(var(--font-size-base) * 0.65); /* ~10-11px */
  --font-size-xs: calc(
    var(--font-size-base) * 0.75
  ); /* ~14px — default panel text */
  --font-size-sm: calc(var(--font-size-base) * 0.8); /* ~14px */
  --font-size-md: calc(var(--font-size-base) * 0.85); /* ~16px */
  --font-size-lg: calc(var(--font-size-base) * 0.9); /* ~17px */
  --font-size-xl: calc(var(--font-size-base) * 0.95); /* ~18px */
  --font-size-2xl: calc(var(--font-size-base) * 1); /* ~19px */
  --font-size-3xl: calc(var(--font-size-base) * 1.05); /* ~22px */

  /* Fine-grained per-px sizes. Use named tiers by default;
     reach for these only when a named tier is too coarse. */
  --font-size-10: calc(var(--font-size-base) * 0.59);
  --font-size-11: calc(var(--font-size-base) * 0.65);
  --font-size-12: calc(var(--font-size-base) * 0.71);
  --font-size-13: calc(var(--font-size-base) * 0.76);
  --font-size-14: calc(var(--font-size-base) * 0.82);
  --font-size-15: calc(var(--font-size-base) * 0.88);
  --font-size-16: calc(var(--font-size-base) * 0.94);
  --font-size-18: calc(var(--font-size-base) * 1.07);
  --font-size-19: calc(var(--font-size-base) * 1.12);
  --font-size-20: calc(var(--font-size-base) * 1.18);
  --font-size-22: calc(var(--font-size-base) * 1.29);

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
}

/* ================================
   BASE STYLES
   ================================ */

body {
  overflow: hidden;
}

/* Base Typography - Applied to all elements */
body,
button,
input,
select,
textarea,
label {
  font-family: var(--gd-font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================================
   HEADING HIERARCHY
   ================================ */

h1,
.text-h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--spacing-lg) 0;
}

h2,
.text-h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--spacing-md) 0;
}

h3,
.text-h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--spacing-sm) 0;
}

h4,
.text-h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  margin: 0 0 var(--spacing-sm) 0;
}

h5,
.text-h5 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  margin: 0 0 var(--spacing-xs) 0;
}

h6,
.text-h6 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  margin: 0 0 var(--spacing-xs) 0;
}

/* ================================
   TEXT STYLES
   ================================ */

/* Body text */
p,
.text-body {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  margin: 0 0 var(--spacing-md) 0;
}

/* Small text */
small,
.text-small {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
}

/* Extra small text */
.text-xs {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
}

/* Labels */
label,
.text-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  color: var(--text-secondary);
}

/* ================================
   TEXT UTILITIES
   ================================ */

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-primary {
  color: var(--text-primary);
}

.text-on-dark {
  color: var(--text-on-dark);
}

.text-bold {
  font-weight: var(--font-weight-bold);
}

.text-semibold {
  font-weight: var(--font-weight-semibold);
}

.text-medium {
  font-weight: var(--font-weight-medium);
}

.text-normal {
  font-weight: var(--font-weight-normal);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}
