/* ============================================================
   Avanza Partners — hoja de estilos
   Paleta tomada del logo: navy + gris sobre blanco.
   Sitio de una sola apariencia (claro), pensado para B2B.
   ============================================================ */

:root {
  --navy: #1f3a70;
  --navy-dark: #16294f;
  --navy-700: #274a8c;
  --gray: #8c9298;
  --ink: #1b2430;
  --muted: #5b6572;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-navy: #16294f;
  --border: #e2e7ee;
  --shadow: 0 1px 2px rgba(16, 33, 66, .06), 0 8px 24px rgba(16, 33, 66, .08);
  --radius: 12px;
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-dark);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.05rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--navy-700);
  margin-bottom: .6rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--navy);
  color: #fff;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--navy-dark); text-decoration: none; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--navy);
}
.btn-outline:hover { background: var(--bg-alt); color: var(--navy-dark); }
.btn-light {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.btn-light:hover { background: #eef2f8; color: var(--navy-dark); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}
.brand img { width: 150px; height: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.site-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: .96rem;
}
.site-nav a:hover { color: var(--navy-700); text-decoration: none; }
.site-nav a.btn { color: #fff; }
.site-nav a.btn:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: var(--navy-700); font-weight: 700; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Secciones ---------- */
section { padding: clamp(3rem, 2rem + 5vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--bg-navy); color: #dde5f2; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
}
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
}
.hero-card h3 { color: var(--navy-dark); }
.hero-card ul { margin: 0; padding: 0; list-style: none; }
.hero-card li { padding: .5rem 0 .5rem 1.8rem; position: relative; border-bottom: 1px solid var(--border); }
.hero-card li:last-child { border-bottom: 0; }

/* ---------- Check list ---------- */
.check { list-style: none; margin: 0; padding: 0; }
.check li {
  position: relative;
  padding: .35rem 0 .35rem 1.9rem;
}
.check li::before {
  content: "";
  position: absolute;
  left: 0; top: .55rem;
  width: 1.15rem; height: 1.15rem;
  background: no-repeat center / contain
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%231f3a70"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.3 3.29 6.8-6.8a1 1 0 0 1 1.4 0Z"/></svg>');
}

/* ---------- Grid de features / cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: #eaf0fb;
  color: var(--navy-700);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.stat .num { font-size: 2rem; font-weight: 800; color: #fff; }
.stat .label { color: #b9c6dd; font-size: .95rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.plan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.plan.featured { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy), var(--shadow); }
.plan .tag {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.plan .price { font-size: 1.5rem; font-weight: 800; color: var(--navy-dark); }
.plan .price span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 1rem 0 1.5rem; }
.plan .btn { width: 100%; justify-content: center; }

/* ---------- Tabla comparativa de planes ---------- */
.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;
}
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
  font-size: .95rem;
}
.compare th, .compare td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-weight: 700;
}
.compare thead th:not(:first-child) { text-align: center; width: 16%; }
.compare tbody th { text-align: left; font-weight: 500; color: var(--ink); }
.compare tbody td { text-align: center; }
.compare tbody tr:nth-child(even) th,
.compare tbody tr:nth-child(even) td { background: var(--bg-alt); }
.compare td.yes::before {
  content: "";
  display: inline-block;
  width: 1.15rem; height: 1.15rem;
  vertical-align: -.22rem;
  background: no-repeat center / contain
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%231f3a70"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.3 3.29 6.8-6.8a1 1 0 0 1 1.4 0Z"/></svg>');
}
.compare td.no { color: var(--gray); }
.compare td.no::before { content: "\2013"; }

/* Bloques de servicios de prevención */
.svc-group { margin-top: 2.75rem; }
.svc-group:first-of-type { margin-top: 1.5rem; }
.svc-group > h3 { color: var(--navy-700); margin-bottom: .25rem; }
.svc-group > p.lead-sm { color: var(--muted); margin-bottom: 1.4rem; max-width: 60ch; }
.svc-card { display: flex; flex-direction: column; }
.svc-card .icon { font-weight: 800; }
.svc-card p { margin-bottom: 0; }
.svc-card .legal {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .8rem;
  color: var(--muted);
}
.svc-card .legal strong { color: var(--navy-700); font-weight: 600; }
.svc-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: #eaf0fb;
  border-radius: 10px;
  font-size: .9rem;
  color: var(--navy-dark);
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd9ee; max-width: 46ch; margin-inline: auto; }
.cta-band .btn { margin-top: 1.4rem; }

/* ---------- Formulario ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .9rem; color: var(--navy-dark); }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--navy-700);
  outline-offset: 1px;
  border-color: var(--navy-700);
}
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: .85rem; color: var(--muted); }
.alert {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #8a1f1a;
  padding: .8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}

/* ---------- Contacto lateral ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.contact-list strong { display: block; color: var(--navy-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-navy);
  color: #b9c6dd;
  padding-top: 3rem;
}
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.site-footer a { color: #cdd9ee; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: .3rem 0; }
.footer-grid img { width: 150px; background: #fff; padding: 8px 10px; border-radius: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.2rem 0;
  font-size: .85rem;
}

/* ---------- Prose (páginas de texto) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; color: var(--navy-700); }

.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip {
  background: #eaf0fb;
  color: var(--navy-700);
  border-radius: 999px;
  padding: .35rem .8rem;
  font-size: .85rem;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px;
  background: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 100;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .pricing, .stats { grid-template-columns: 1fr; }
  .grid-2, .form-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: .5rem 20px 1.2rem;
    transform: translateY(-120%);
    transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a.btn { margin-top: .8rem; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
