/* =============================================================
   TacTrax Design System — Colors + Type
   Version 1.1 · Accent #39FF14 (Neon Lime) · Quicksand
   Import from any HTML mock:   <link rel="stylesheet" href="/colors_and_type.css">
   ============================================================= */

/* ---- Fonts ---- */
/* @import rules MUST come first (before @font-face / other rules) or
   browsers silently drop them. */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');
/* Material Symbols — matches @expo/vector-icons MaterialIcons used throughout the app. */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

/* Quicksand self-hosted from fonts/. */
@font-face {
  font-family: 'Quicksand';
  src: url('fonts/Quicksand-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Material Icons base class (in case the @import fails — e.g. offline) */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  vertical-align: middle;
}

:root {
  /* =================================================================
     BASE COLORS
     ================================================================= */

  /* --- Surfaces (dark, 7-step elevation scale) --- */
  --bg:                          #0A0C0F;   /* app root — deeper than surface so glass reads */
  --surface:                     #111316;
  --surface-dim:                 #111316;
  --surface-bright:              #37393d;
  --surface-container-lowest:    #0c0e11;
  --surface-container-low:       #1a1c1f;
  --surface-container:           #1e2023;
  --surface-container-high:      #282a2d;
  --surface-container-highest:   #333538;

  /* --- Foreground / text --- */
  --fg-1:                        #E2E2E6;   /* primary text */
  --fg-2:                        #A3A3A3;   /* secondary text, captions */
  --fg-3:                        #737373;   /* tertiary, icon inactive */
  --fg-4:                        #525252;   /* disabled */
  --fg-invert:                   #0A0C0F;   /* text on accent fill */

  /* --- Accent (TacTrax Neon Lime) --- */
  --accent:                      #39FF14;
  --accent-hover:                #5CFF3D;
  --accent-press:                #2ED40F;
  --accent-soft:                 #A8FF95;   /* text-on-container, glow */
  --accent-container:            rgba(57, 255, 20, 0.12);
  --accent-container-strong:     rgba(57, 255, 20, 0.22);
  --accent-border:               rgba(57, 255, 20, 0.45);
  --accent-glow:                 0 0 14px rgba(57, 255, 20, 0.55);

  /* --- Semantic --- */
  --hazard:                      #EAEA00;
  --danger:                      #EF4444;
  --danger-soft:                 rgba(239, 68, 68, 0.14);
  --warning:                     #F59E0B;
  --success:                     #10B981;
  --info:                        #06B6D4;

  /* --- Mode accents --- */
  --mode-aerial:                 #EF4444;
  --mode-hunting:                #F59E0B;
  --mode-hiking:                 #10B981;
  --mode-cycling:                #06B6D4;
  --mode-offroad:                #D97706;
  --mode-land:                   #3B82F6;

  /* --- Borders / outlines --- */
  --border-hairline:             rgba(255, 255, 255, 0.10);
  --border-soft:                 rgba(255, 255, 255, 0.06);
  --border-strong:               rgba(255, 255, 255, 0.18);
  --border-accent:               rgba(57, 255, 20, 0.45);

  /* --- Glass --- */
  --glass-fill:                  rgba(17, 19, 22, 0.72);
  --glass-fill-strong:           rgba(17, 19, 22, 0.88);
  --glass-blur:                  blur(14px) saturate(1.1);
  --glass-border:                1px solid rgba(255, 255, 255, 0.10);

  /* --- Shadows --- */
  --shadow-panel:                0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-raised:               0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-accent:               0 0 14px rgba(57, 255, 20, 0.55);

  /* =================================================================
     SPACING & RADII
     ================================================================= */
  --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;

  --radius-xs:  4px;   /* data chip */
  --radius-sm:  6px;   /* toggle */
  --radius-md:  8px;   /* button, inline control */
  --radius-lg:  12px;  /* card, panel */
  --radius-xl:  16px;  /* modal, sheet */
  --radius-full: 9999px;

  /* =================================================================
     TYPE — BASE TOKENS
     ================================================================= */
  --font-sans:    'Quicksand', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Quicksand', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Weights — Quicksand ships 300..700; we use 400/500/600/700 */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Size scale */
  --text-xxs: 10px;   /* micro tactical labels (ACC, SATS) */
  --text-xs:  11px;   /* tab bar, chips */
  --text-sm:  12px;   /* body small, captions */
  --text-base:14px;   /* default body */
  --text-md:  16px;   /* drawer items, emphasized body */
  --text-lg:  18px;   /* stat values */
  --text-xl:  20px;   /* wordmark, section headers */
  --text-2xl: 24px;   /* mission / card titles */
  --text-3xl: 32px;   /* large telemetry readouts */
  --text-4xl: 40px;   /* hero stats */
  --text-5xl: 56px;   /* display */

  /* Tracking — TacTrax uses extreme tracking both ways */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.01em;
  --tracking-normal:   0em;
  --tracking-wide:     0.06em;
  --tracking-wider:    0.10em;
  --tracking-widest:   0.18em;  /* uppercase micro labels */

  /* Leading */
  --leading-tight:   1.1;
  --leading-snug:    1.25;
  --leading-normal:  1.5;

  /* =================================================================
     SEMANTIC TYPE ROLES
     Apply via class: .h1 / .h2 / .label / .micro / .mono / etc.
     Or reference the var in a component's CSS.
     ================================================================= */

  --type-display: var(--weight-bold) var(--text-5xl)/var(--leading-tight) var(--font-display);
  --type-h1:      var(--weight-bold) var(--text-4xl)/var(--leading-tight) var(--font-display);
  --type-h2:      var(--weight-bold) var(--text-3xl)/var(--leading-tight) var(--font-display);
  --type-h3:      var(--weight-bold) var(--text-2xl)/var(--leading-snug)  var(--font-display);
  --type-h4:      var(--weight-semibold) var(--text-xl)/var(--leading-snug) var(--font-display);
  --type-body:    var(--weight-regular) var(--text-base)/var(--leading-normal) var(--font-sans);
  --type-body-md: var(--weight-medium)  var(--text-md)/var(--leading-normal)  var(--font-sans);
  --type-caption: var(--weight-medium)  var(--text-sm)/var(--leading-snug)    var(--font-sans);
  --type-label:   var(--weight-bold)    var(--text-xxs)/1.1 var(--font-sans);
  --type-mono:    var(--weight-medium)  var(--text-sm)/1.3 var(--font-mono);
}

/* =================================================================
   Global resets + base
   ================================================================= */

html, body {
  background: var(--bg);
  color: var(--fg-1);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
}

* { box-sizing: border-box; }

/* =================================================================
   Typography classes
   ================================================================= */

.display  { font: var(--type-display); letter-spacing: var(--tracking-tighter); }
.h1       { font: var(--type-h1);      letter-spacing: var(--tracking-tighter); }
.h2       { font: var(--type-h2);      letter-spacing: var(--tracking-tight); }
.h3       { font: var(--type-h3);      letter-spacing: var(--tracking-tight); }
.h4       { font: var(--type-h4);      letter-spacing: var(--tracking-normal); }
.body     { font: var(--type-body); }
.body-md  { font: var(--type-body-md); }
.caption  { font: var(--type-caption); color: var(--fg-2); }

/* Tactical micro-label — the TACTRAX signature */
.label, .micro {
  font: var(--type-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--fg-2);
}

.mono { font: var(--type-mono); font-variant-numeric: tabular-nums; }

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tighter);
  color: var(--accent);
}

/* =================================================================
   Utility helpers
   ================================================================= */

.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.glass-strong {
  background: var(--glass-fill-strong);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.accent-text  { color: var(--accent); }
.accent-glow  { text-shadow: 0 0 8px rgba(57, 255, 20, 0.6); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 8px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  font: var(--weight-bold) var(--text-xs)/1 var(--font-sans);
  color: var(--fg-1);
}

.chip--accent {
  background: var(--accent-container);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Material Symbols / Icons */
.material-icons, .material-symbols-outlined {
  font-family: 'Material Icons', 'Material Symbols Outlined';
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
}
