
/* Tema claro v3 (CONTRATO-v3). Paleta definida SOLO con variables CSS. */
:root {
  --bg: #EDEFF2;          /* fondo general, gris claro frio */
  --bg-soft: #E3E6EB;     /* secciones alternas */
  --surface: #F6F7F9;     /* tarjetas, campos: gris muy claro, no blanco */
  --surface-2: #FAFBFC;   /* solo para el plan destacado o una pieza que deba resaltar */
  --line: #D3D8DF;
  --line-strong: #8A929D;
  --text: #111317;
  --dim: #4A515C;
  --dimmer: #5B636E;
  --accent: #0E8F86;
  --accent-bright: #1FB5A8;  /* rellenos grandes, barras, ilustraciones; nunca texto chico */
  --accent-ink: #0A6F68;     /* texto y enlaces turquesa sobre claro */
  --accent-soft: rgba(14, 143, 134, .10);
  --btn: #0B7A72;            /* fondo de botones con texto blanco */
  --btn-hover: #096B64;
  --on-btn: #FFFFFF;
  --accent2: #1E9BE8;        /* celeste fuerte: rellenos, trazos y detalles (no texto) */
  --accent2-ink: #0A629A;    /* celeste para texto sobre --bg (ver contraste medido) */
  --accent2-soft: rgba(30, 155, 232, .12);
  --veil: 237, 239, 242;     /* RGB de --bg para velos sobre la foto */
  --focus: #0A6F68;
  --shadow-sm: 0 1px 2px rgba(17, 19, 23, .06), 0 1px 1px rgba(17, 19, 23, .04);
  --shadow: 0 8px 24px -12px rgba(17, 19, 23, .18), 0 2px 6px rgba(17, 19, 23, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --gutter: 20px;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-ink); }
a:hover { color: var(--accent2-ink); text-decoration-color: var(--accent2); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Selector de idioma: mismo mecanismo que actual.html (body[data-lang]) */
body[data-lang="es"] .lang-en { display: none; }
body[data-lang="en"] .lang-es { display: none; }

/* Tipografia */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--dim); max-width: 62ch; }
.muted { color: var(--dim); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent-bright); }

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; position: relative; }
.section.soft { background: var(--bg-soft); }
.grid-2, .grid-3 { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

/* Tarjetas: superficie gris muy clara, sombra suave en lugar de borde duro */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: var(--shadow); }

/* Botones (alto 44 px minimo, tactiles) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Fondo turquesa profundo (--btn) con texto blanco 600: contraste AA */
.btn-primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); font-weight: 600; box-shadow: 0 4px 14px -6px rgba(11, 122, 114, .55); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--on-btn); }
/* Ghost sobre gris: sin relleno blanco, borde gris medio */
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: var(--accent-soft); }

/* Foco visible (teclado) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible { border-radius: 999px; }

/* Revelado al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  .btn:hover { transform: none; }
}

/* Menu movil (compartido): .mobile-toggle abre/cierra .nav-links con la clase is-open */
.mobile-toggle { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text); width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; }
@media (max-width: 900px) {
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px var(--gutter) 20px;
  }
  .nav-links.is-open a { padding: 12px 0; }
}
