/* ==========================================================================
   BASE — Reset, variables CSS, tipografía global
   ========================================================================== */

/* ---- Custom Properties ---- */
:root {
  /* Paleta: azul claro profesional */
  --color-primary:       #5B9BD5;   /* azul claro principal */
  --color-primary-dark:  #3A7BBF;   /* azul más intenso */
  --color-primary-deeper:#2C5F9E;   /* azul profundo para CTA */
  --color-primary-light: #A8CCE8;   /* azul suave */
  --color-primary-pale:  #C8E0F5;   /* azul más intenso para fondos */
  --color-accent:        #2DCEA6;   /* verde menta acento */
  --color-accent-light:  #D0F5EB;
  --color-warm:          #F0C27A;   /* dorado cálido */
  --color-bg:            #F7FAFD;   /* fondo azulado muy suave */
  --color-bg-alt:        #EDF4FA;   /* fondo alterno azulado */
  --color-bg-dark:       #1B2A4A;   /* fondo oscuro para secciones hero/footer */
  --color-surface:       #FFFFFF;
  --color-text:          #1E293B;   /* slate 800 */
  --color-text-light:    #64748B;   /* slate 500 */
  --color-text-inv:      #FFFFFF;
  --color-border:        #D8E4EF;
  --color-whatsapp:      #25D366;
  --color-whatsapp-dark: #1EBE57;

  /* Tipografía */
  --ff-body:    'Inter', system-ui, -apple-system, sans-serif;
  --ff-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;
  --fw-extrabold: 800;

  /* Tamaños fluidos */
  --fs-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --fs-sm:   clamp(0.8125rem, 0.77rem + 0.2vw, 0.9rem);
  --fs-base: clamp(0.9375rem, 0.88rem + 0.3vw, 1.05rem);
  --fs-md:   clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  --fs-lg:   clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-xl:   clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  --fs-2xl:  clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl:  clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --fs-4xl:  clamp(2.75rem, 2rem + 3.2vw, 4.25rem);

  /* Espaciado */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width:     1240px;
  --header-height: 76px;

  /* Bordes y sombras */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;
  --shadow-sm:  0 1px 3px rgba(27,42,74,.05);
  --shadow-md:  0 4px 16px rgba(27,42,74,.08);
  --shadow-lg:  0 12px 40px rgba(27,42,74,.12);
  --shadow-xl:  0 20px 60px rgba(27,42,74,.15);

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 300ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 500ms cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  line-height: 1.25;
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p + p { margin-top: var(--space-md); }

::selection {
  background-color: var(--color-primary-light);
  color: var(--color-text-inv);
}

/* ---- Focus visible (accesibilidad) ---- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---- Ocultar visualmente (accesibilidad) ---- */
.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;
}
