/* ==========================================================================
   EDT Ingeniería — Tokens base de color + tipografía
   "Ingeniería con alma" — solidez técnica + modernidad + calidez humana.
   ========================================================================== */

:root {
  /* ===== COLOR — Brand ===== */
  --edt-primary:        #1B3A5C;
  --edt-primary-light:  #2A5580;
  --edt-primary-dark:   #0F2440;
  --edt-secondary:      #2D8C4E;
  --edt-secondary-light:#3AA862;
  --edt-secondary-dark: #1E6B38;
  --edt-accent:         #F5A623;
  --edt-accent-light:   #FFBE4F;
  --edt-accent-dark:    #D48C10;

  /* ===== COLOR — Foreground / Background ===== */
  --fg1: #2D2D2D;
  --fg2: #6B7280;
  --fg3: #6C737E;
  --fg-on-dark: #FFFFFF;
  --fg-on-dark-2: rgba(255,255,255,0.72);

  --bg-page:   #FFFFFF;
  --bg-light:  #F5F7FA;
  --bg-warm:   #FAFAF7;
  --bg-dark:   #0F2440;
  --border:    #E5E7EB;
  --border-strong: #D1D5DB;
  --line-soft: #F3F4F6;

  --overlay-dark:   rgba(15, 36, 64, 0.70);
  --overlay-darker: rgba(15, 36, 64, 0.85);
  --overlay-light:  rgba(255, 255, 255, 0.95);

  --status-active:    #15803D;  --status-active-bg:    #ECFDF5;
  --status-completed: #5B626E;  --status-completed-bg: #F3F4F6;

  --color-success: #16A34A;
  --color-error:   #DC2626;
  --color-warning: #F59E0B;

  /* ===== TYPE — families ===== */
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-heading: 'DM Serif Display', 'Georgia', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
  --display-tracking: -0.01em;
  --display-weight: 400;

  --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.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;
  --text-8xl:  5.5rem;

  --leading-tight:   1.15;
  --leading-snug:    1.30;
  --leading-normal:  1.60;
  --leading-relaxed: 1.75;

  --w-light: 300; --w-regular: 400; --w-medium: 500;
  --w-semibold: 600; --w-bold: 700;

  --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;

  --r-sm:  0.25rem;  --r-md:  0.5rem;  --r-lg:  0.75rem;
  --r-xl:  1rem;     --r-2xl: 1.5rem;  --r-full: 9999px;
  /* Radios intermedios (valores exactos preexistentes, ahora tokenizados):
     6px = nav links / IDs · 10px = cajas de ícono · 14px = paneles (cards, tablas, legal). */
  --r-6:  0.375rem;
  --r-10: 0.625rem;
  --r-14: 0.875rem;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.20);
  --shadow-card:       0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.10);
  /* Sombras con tinte de marca (azul profundo) para paneles flotantes. */
  --shadow-brand:      0 24px 48px -12px rgba(15,36,64,0.18), 0 8px 16px -4px rgba(15,36,64,0.08);
  --shadow-brand-sm:   0 4px 16px -8px rgba(15,36,64,0.08);
  --shadow-brand-soft: 0 8px 28px rgba(15,36,64,0.06);

  --t-fast:   150ms ease;
  --t-base:   300ms ease;
  --t-slow:   500ms ease;
  --t-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Easing "enfatizado" reutilizado en page-enter, reveals y menú móvil. */
  --ease-emphasized: cubic-bezier(0.32, 0.72, 0, 1);

  --container-max:    1200px;
  --container-narrow: 800px;
  --container-wide:   1400px;
  --header-height:    80px;
  --header-height-scrolled: 64px;
}

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--w-regular);
  line-height: var(--leading-normal);
  color: var(--fg1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--w-regular);
  line-height: var(--leading-tight);
  color: var(--edt-primary-dark);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); margin: 0 0 var(--space-4); }
h2 { font-size: clamp(1.875rem, 2.5vw + 1rem, 3rem);  margin: 0 0 var(--space-4); }
h3 { font-size: clamp(1.5rem, 1.5vw + 0.75rem, 2.25rem); margin: 0 0 var(--space-3); }
h4 { font-size: var(--text-xl); margin: 0 0 var(--space-2); }
h5 { font-size: var(--text-lg); margin: 0 0 var(--space-2); }
h6 { font-size: var(--text-base); margin: 0 0 var(--space-2); }

.h-card {
  font-family: var(--font-body);
  font-weight: var(--w-semibold);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--edt-primary-dark);
}

p { margin: 0 0 var(--space-4); text-wrap: pretty; }

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--fg2);
}

small, .caption {
  font-size: var(--text-sm);
  color: var(--fg2);
  line-height: var(--leading-snug);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

a {
  color: var(--edt-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--edt-accent-dark); }

::selection { background: var(--edt-accent); color: var(--edt-primary-dark); }
