/* ==========================================================================
   Divisa — Design Tokens
   Alineado con el manual de marca Divisa (casa de servicios financieros).
   ========================================================================== */

:root {
  /* Brand — Divisa institucional */
  --navy-950: #00132B;   /* near-black inverse */
  --navy-900: #001E44;   /* deeper, headings on white */
  --navy-800: #002A5B;   /* PRIMARY brand navy — wordmark, surfaces */
  --navy-700: #001E44;
  --navy-600: #0F4488;
  --navy-500: #0F4488;
  --navy-300: #6B8AB8;
  --navy-100: #CBD7E7;
  --navy-50:  #EAF0F8;

  --red-700: #971A1F;
  --red-600: #B82329;   /* hover / pressed */
  --red-500: #D03037;   /* PRIMARY brand red — swoosh / accent */
  --red-400: #E0626A;
  --red-100: #F8CDD0;
  --red-50:  #FCEAEB;

  /* Neutrals — grises azulados, NO cálidos */
  --gray-0:    #FFFFFF;
  --gray-25:   #FAFBFC;
  --gray-50:   #F4F6F9;
  --gray-100:  #E7EBF1;
  --gray-200:  #D2D8E1;
  --gray-300:  #B4BDCB;
  --gray-400:  #8995A6;
  --gray-500:  #677386;
  --gray-600:  #4B5568;
  --gray-700:  #333B4B;
  --gray-800:  #1F2533;
  --gray-900:  #0E1320;

  /* Aliases para compatibilidad con el código existente */
  --ink-900: var(--gray-900);
  --ink-700: var(--gray-700);
  --ink-500: var(--gray-500);
  --ink-400: var(--gray-400);
  --ink-300: var(--gray-300);
  --ink-200: var(--gray-200);
  --ink-100: var(--gray-100);
  --ink-50:  var(--gray-50);

  /* Semantic surfaces — manual: blancos limpios y bg-subtle azulado */
  --canvas: #FFFFFF;
  --paper:  #FFFFFF;
  --bg-subtle: var(--gray-50);
  --bg-muted:  var(--gray-100);

  /* Sand DEPRECATED — mantenidos como gris frío para no romper layouts */
  --sand-100: var(--gray-50);
  --sand-200: var(--gray-100);
  --sand-300: var(--gray-200);

  /* Semantic / signal colors */
  --mint-500: #1B8A4E;   /* success — money in */
  --mint-100: #E4F5EC;
  --amber-500: #C77700;
  --amber-100: #FCF1DC;

  /* Typography — Source Sans 3 (sans), Source Serif 4, JetBrains Mono */
  --font-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-7xl: 5.5rem;
  --text-8xl: 7rem;

  /* Spacing — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radii — Divisa rectangular-corporativa (NO toy-rounded) */
  --radius-sm: 4px;
  --radius-md: 6px;     /* default — botones, inputs */
  --radius-lg: 8px;     /* cards */
  --radius-xl: 10px;    /* cards prominentes */
  --radius-2xl: 14px;   /* hero / modales */
  --radius-full: 999px; /* solo pills/badges */

  /* Shadows — azuladas (rgba navy 0,42,91) */
  --shadow-xs: 0 1px 2px rgba(0, 42, 91, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 42, 91, 0.08), 0 1px 2px rgba(0, 42, 91, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 42, 91, 0.10), 0 2px 4px rgba(0, 42, 91, 0.04);
  --shadow-lg: 0 12px 28px rgba(0, 42, 91, 0.14), 0 4px 8px rgba(0, 42, 91, 0.06);
  --shadow-xl: 0 24px 48px rgba(0, 42, 91, 0.16), 0 8px 16px rgba(0, 42, 91, 0.06);

  --shadow-navy: 0 12px 28px rgba(0, 42, 91, 0.20), 0 4px 8px rgba(0, 42, 91, 0.10);
  --shadow-red: 0 6px 16px rgba(208, 48, 55, 0.22);
  --shadow-focus: 0 0 0 3px rgba(15, 68, 136, 0.25);

  /* Motion — manual: out-quint suave, 200ms default */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  /* Layout */
  --container: 1280px;
  --container-narrow: 1080px;
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--gray-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  color: var(--navy-900);
  text-wrap: balance;
}

h1 { letter-spacing: -0.015em; line-height: 1.05; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input, select, textarea { font-family: inherit; }

::selection {
  background: var(--navy-800);
  color: white;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-500);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 320ms var(--ease-out) both; }

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Focus ring — manual: navy 3px, accesibilidad financiera obligatoria */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
