/* =============================================================
   BASE — Variables de diseño, reset y tipografía
   Paleta y tokens extraídos de la marca Neuralife Salud.
   ============================================================= */

/* ---------- Tokens de diseño ---------- */
:root {
  /* Colores de marca */
  --brand-purple:      #651bae;   /* morado principal */
  --brand-purple-600:  #5a17a0;
  --brand-purple-700:  #4b3a6b;
  --brand-teal:        #38d9d3;   /* turquesa / acento */
  --brand-teal-700:    #12807b;

  /* Morados oscuros (fondos y texto sobre claro) */
  --purple-950: #1e1233;
  --purple-900: #2a1447;
  --purple-800: #3d2a5c;

  /* Morados claros (superficies suaves) */
  --purple-50:  #f6f1fc;
  --purple-100: #ede5f8;
  --purple-200: #e6dcf5;

  /* Neutros */
  --ink:     #0a0a0a;   /* texto principal */
  --muted:   #7a6a96;   /* texto secundario */
  --line:    #e6dcf5;   /* bordes */
  --surface: #ffffff;
  --surface-2: #faf7fe;

  /* Degradados */
  --grad-brand: linear-gradient(120deg, var(--brand-purple) 0%, var(--brand-teal) 100%);
  --grad-dark:  linear-gradient(160deg, var(--purple-950) 0%, var(--purple-800) 100%);

  /* Tipografía */
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  /* Radios */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(30, 18, 51, .06);
  --shadow:    0 8px 24px rgba(30, 18, 51, .10);
  --shadow-lg: 0 20px 50px rgba(30, 18, 51, .18);

  /* Espaciado de secciones */
  --section-y: clamp(2.25rem, 5vw, 4rem);
  --container:  1180px;
  --gutter:     clamp(1rem, 4vw, 2rem);

  /* Transiciones */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset moderno ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fcfcfc;   /* PRUEBA: celeste pastel muy tenue (antes: var(--surface)) */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;   /* sin destello gris al tocar en móvil */
  overflow-x: clip;                            /* evita cualquier scroll horizontal accidental */
}

/* ---------- Pulido / detalles finos ---------- */
::selection { background: rgba(101, 27, 174, .16); color: var(--purple-950); }
/* La barra fija no tapa el contenido al saltar a una sección */
[id] { scroll-margin-top: 92px; }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

:focus-visible { outline: 3px solid var(--brand-teal); outline-offset: 2px; border-radius: 4px; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--purple-950); }

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { color: var(--muted); }

/* ---------- Utilidades de layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { margin-bottom: .75rem; }
.section-head p { font-size: 1.075rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-purple);
}

.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Accesibilidad: solo lectores de pantalla */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Respeta preferencia de menos animación */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
