/* ============================================================
   DESIGN TOKENS — Cristian Carreras
   Importar en TODAS las páginas con:
   <link rel="stylesheet" href="/assets/css/tokens.css">
   ============================================================ */

:root {

  /* --- COLORES --- */
  --color-navy:        #041635;   /* Fondo principal, headers, footers — igual a "primary" de index.html */
  --color-cta:         #0057bf;   /* Botones CTA, links activos — igual a "secondary" de index.html */
  --color-light-blue:  #E8F1FB;   /* Fondos alternos, cards */
  --color-white:       #FFFFFF;
  --color-black:       #0A0A0A;
  --color-gray-100:    #F5F7FA;   /* Fondos muy suaves */
  --color-gray-300:    #D1D5DB;   /* Bordes suaves */
  --color-gray-600:    #6B7280;   /* Texto secundario */
  --color-gray-900:    #111827;   /* Texto principal */
  --color-surface:           #f7f9fb;   /* Fondo body — igual a "surface" de index.html */
  --color-surface-container: #eceef0;   /* Fondo cards — igual a "surface-container" de index.html */
  --color-primary-container: #1b2b4b;   /* Navy medio — sección sobre mí de index.html */

  /* --- TIPOGRAFÍA --- */
  --font-heading: 'Manrope', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --fw-light:      300;
  --fw-regular:    400;
  --fw-semibold:   600;
  --fw-extrabold:  800;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */

  /* --- ESPACIADO --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* --- BORDES — valores exactos del Tailwind config de index.html --- */
  --radius-sm:   4px;
  --radius-md:   1rem;    /* 16px = Tailwind borderRadius DEFAULT */
  --radius-lg:   2rem;    /* 32px = Tailwind rounded-lg — usado en cards */
  --radius-xl:   3rem;    /* 48px = Tailwind rounded-xl */
  --radius-full: 9999px;  /* pill — usado en botones CTA */

  /* --- SOMBRAS — alineadas con Tailwind defaults de index.html --- */
  --shadow-sm:  0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
  --shadow-cta: 0 4px 16px rgba(0,87,191,0.35);  /* sombra azul para botones CTA */

  /* --- TRANSICIONES --- */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* --- LAYOUT --- */
  --container-max: 1200px;
  --container-pad: clamp(1rem, 4vw, 2rem);  /* padding lateral responsive */

  /* --- LOGO --- */
  --logo-height-header:  70px;   /* altura del logo en header */
  --logo-height-footer:  55px;   /* altura del logo en footer */
  --logo-height-mobile:  50px;   /* altura en mobile */
}

/* ============================================================
   RESET Y BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--text-base);
  color: var(--color-gray-900);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   COMPONENTES GLOBALES REUTILIZABLES
   ============================================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);  /* pill — igual a rounded-full de index.html */
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  min-height: 48px;          /* accesibilidad touch */
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-cta);
  color: var(--color-white);
  border-color: var(--color-cta);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  background: #003d99;
  border-color: #003d99;
  box-shadow: 0 6px 20px rgba(0,87,191,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-ghost {
  background: transparent;
  color: var(--color-cta);
  border-color: var(--color-cta);
}
.btn-ghost:hover {
  background: var(--color-cta);
  color: var(--color-white);
}

/* Cards — shadow-sm y rounded-lg igual a las cards de index.html */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-8);
  border: 1px solid rgba(197,198,207,0.2);
}

/* Header/Nav compartido */
.site-header {
  background: #F7F9FB !important;
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-header .logo img {
  height: var(--logo-height-header);
  width: auto;
  display: block;
}

/* Footer compartido */
.site-footer {
  background: #F7F9FB !important;
  color: var(--color-gray-900);
  border-top: 1px solid var(--color-gray-300);
  padding: var(--space-12) 0 var(--space-8);
}

.site-footer .logo img {
  height: var(--logo-height-footer);
  width: auto;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;   /* hero title más chico en mobile */
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
  }

  .site-header .logo img {
    height: var(--logo-height-mobile);
  }

  .site-footer .logo img {
    height: var(--logo-height-mobile);
  }
}
