/* ============================================================
   Airexsus es una empresa Design System
   colors_and_type.css — canonical design tokens
   Source: DESIGN.md (this package). Drop this file into any
   project and bind tokens via :root before composing UI.
   ============================================================ */

/* ---- Optional brand font binding ----------------------------
   Inter is the canonical typeface. If a self-hosted font file
   is added to fonts/Inter.var.woff2 the @font-face below will
   pick it up; otherwise the stack falls back to system Inter
   or platform sans. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: local('Inter Variable'),
       local('Inter'),
       url('fonts/Inter.var.woff2') format('woff2-variations'),
       url('fonts/Inter.var.woff2') format('woff2');
}

:root {
  /* -------- Brand core -------- */
  --brand-primary:         #00A4D6;
  --brand-primary-hover:   #0095C2;
  --brand-primary-pressed: #0087B3;
  --brand-deep:            #1B3A5C;
  --brand-frost:           #E6F3F8;
  --brand-ink:             #0E2236;

  /* -------- Neutrals (light) -------- */
  --bg:             #F7FAFB;
  --surface:        #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-sunken: #EEF3F6;
  --fg:             #0E2236;
  --fg-muted:       #5A6C7E;
  --fg-subtle:      #8898A8;
  --fg-onbrand:     #FFFFFF;
  --border:         #D9E2EA;
  --border-strong:  #B5C3D1;
  --border-focus:   #00A4D6;

  /* -------- Status -------- */
  --success: #1B9B6F;
  --success-bg: #E4F5EE;
  --warning: #D98B2B;
  --warning-bg: #FBEFD9;
  --danger:  #C8364A;
  --danger-bg: #F8E1E4;
  --info:    #3A78C2;
  --info-bg: #E3ECF8;

  /* -------- Type -------- */
  --font-display: 'Inter Variable', 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-display-xl: clamp(48px, 6vw, 84px);
  --text-display-l:  clamp(36px, 4vw, 56px);
  --text-h1: 36px;
  --text-h2: 28px;
  --text-h3: 22px;
  --text-h4: 18px;
  --text-body: 16px;
  --text-body-s: 14px;
  --text-caption: 13px;
  --text-eyebrow: 12px;
  --text-mono-s: 13px;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-base: 1.55;
  --lh-loose: 1.7;

  --tracking-tight: -0.022em;
  --tracking-base: 0;
  --tracking-wide: 0.14em;

  /* -------- Spacing -------- */
  --space-0: 0;
  --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;
  --space-32: 128px;

  /* -------- Radius -------- */
  --radius-xs: 2px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* -------- Shadows -------- */
  --shadow-hairline: 0 0 0 1px var(--border);
  --shadow-1: 0 1px 2px rgba(14, 34, 54, 0.06), 0 0 0 1px rgba(14, 34, 54, 0.04);
  --shadow-2: 0 4px 12px rgba(14, 34, 54, 0.08), 0 0 0 1px rgba(14, 34, 54, 0.04);
  --shadow-3: 0 12px 32px rgba(14, 34, 54, 0.10), 0 0 0 1px rgba(14, 34, 54, 0.05);
  --shadow-focus: 0 0 0 3px color-mix(in oklch, var(--brand-primary) 35%, transparent);

  /* -------- Motion -------- */
  --dur-instant: 80ms;
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;
  --ease-in:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* -------- Layout -------- */
  --container-max: 1280px;
  --container-wide: 1440px;
  --sidebar-w: 280px;
  --topbar-h: 56px;
}

/* -------- Dark mode (dashboard only) -------- */
:root[data-theme="dark"],
.theme-dark {
  --bg:             #0A1420;
  --surface:        #11202F;
  --surface-raised: #16293B;
  --surface-sunken: #0A1420;
  --fg:             #E7F0F6;
  --fg-muted:       #9AAFC2;
  --fg-subtle:      #6A7E92;
  --border:         #1F354A;
  --border-strong:  #34516E;

  --brand-frost: #122A3D;
  --success-bg: #0F2B22;
  --warning-bg: #2F2113;
  --danger-bg:  #2E141A;
  --info-bg:    #11243C;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* -------- Base + typography utilities -------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brand-deep);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); line-height: 1.15; letter-spacing: -0.018em; }
h2 { font-size: var(--text-h2); line-height: 1.2;  letter-spacing: -0.015em; }
h3 { font-size: var(--text-h3); line-height: 1.3;  letter-spacing: -0.01em; }
h4 { font-size: var(--text-h4); line-height: 1.35; }

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
a:hover { border-bottom-color: var(--brand-primary); }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono-s);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}

.muted   { color: var(--fg-muted); }
.subtle  { color: var(--fg-subtle); }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-s);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
