:root {
  --porcelana: #f1f4f2;
  --blanco: #ffffff;
  --tinta: #0f1f1b;
  --tinta-suave: #3f5650;
  --salvia: #c8d9d2;
  --salvia-clara: #e6eeea;
  --esmeralda: #0b7a5a;
  --esmeralda-oscura: #075c43;
  --esmeralda-tenue: #e2f1ea;
  --alerta: #9a3412;
  --alerta-tenue: #fdebe3;
  --ancho: 1120px;
  --display: "Sora", system-ui, sans-serif;
  --texto: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--porcelana);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 18px;
  line-height: 1.55;
}
a { color: var(--esmeralda); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--esmeralda-oscura); }
:focus-visible { outline: 3px solid var(--esmeralda); outline-offset: 3px; }
.salto { position: absolute; left: -999px; top: 0; background: var(--blanco); padding: 0.5rem 1rem; z-index: 10; }
.salto:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 28ch; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 62ch; }
ul, ol { padding-left: 1.2em; max-width: 62ch; }
li { margin-bottom: 0.4em; }
small { font-size: 0.9rem; color: var(--tinta-suave); }
code { font-size: 0.9em; background: rgba(0,0,0,0.05); padding: 0.05em 0.35em; border-radius: 4px; }
.antetitulo { font-family: var(--display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--esmeralda); margin: 0 0 0.6rem; }

.contenedor { width: min(var(--ancho), 100% - 2.5rem); margin-inline: auto; }

header.barra { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; gap: 1rem; flex-wrap: wrap; }
.marca { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--tinta); text-decoration: none; letter-spacing: -0.02em; }
.marca span { color: var(--esmeralda); }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
nav a { color: var(--tinta); text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--esmeralda); }
nav a.destacado { color: var(--esmeralda); }

.boton {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1rem;
  background: var(--esmeralda); color: var(--blanco); border: 0; border-radius: 6px;
  padding: 0.85rem 1.4rem; cursor: pointer; text-decoration: none; text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.boton:hover { background: var(--esmeralda-oscura); color: var(--blanco); }
.boton:active { transform: translateY(1px); }
.boton[disabled] { background: var(--salvia); color: var(--tinta-suave); cursor: not-allowed; transform: none; }
.boton.secundario { background: transparent; color: var(--esmeralda); box-shadow: inset 0 0 0 2px var(--esmeralda); }
.boton.secundario:hover { background: var(--esmeralda-tenue); color: var(--esmeralda-oscura); }
.boton.secundario[disabled] { box-shadow: inset 0 0 0 2px var(--salvia); background: transparent; }

/* Portada */
.hero { padding: 2.5rem 0 2rem; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero p.entrada { font-size: 1.25rem; color: var(--tinta-suave); }
.hero .acciones { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.5rem; }
.mapa { width: 100%; height: auto; }
.mapa text { font-family: var(--display); font-size: 13px; fill: var(--tinta); }
.mapa text.pie { font-family: var(--texto); font-size: 11.5px; fill: var(--tinta-suave); }
.mapa .caja { fill: var(--blanco); stroke: var(--salvia); stroke-width: 1.2; }
.mapa .caja.centro { stroke: var(--esmeralda); stroke-width: 1.6; }
.mapa .caja.acreditada { stroke: var(--esmeralda); stroke-width: 1.4; fill: var(--esmeralda-tenue); }
.mapa .via { fill: none; stroke: var(--esmeralda); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: trazar 1.6s ease-out 0.3s forwards; }
@keyframes trazar { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .mapa .via { animation: none; stroke-dashoffset: 0; } }

/* Acreditaciones */
.sellos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0 0 2.5rem; list-style: none; margin: 0; max-width: none; }
.sello { background: var(--blanco); border: 1px solid var(--salvia); border-radius: 10px; padding: 1.1rem 1.25rem; display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; margin: 0; }
.sello .icono { width: 40px; height: 40px; border-radius: 50%; background: var(--esmeralda-tenue); color: var(--esmeralda); display: grid; place-items: center; }
.sello .icono svg { width: 22px; height: 22px; }
.sello b { display: block; font-family: var(--display); font-weight: 600; line-height: 1.25; margin-bottom: 0.2rem; }
.sello p { margin: 0; font-size: 0.95rem; color: var(--tinta-suave); }
.sello .fecha { display: inline-block; margin-top: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--esmeralda); }

section { padding: 3rem 0; border-top: 1px solid var(--salvia); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.cuatro { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.tarjeta { background: var(--blanco); border: 1px solid var(--salvia); border-radius: 10px; padding: 1.5rem 1.6rem; }
.tarjeta h3 { margin-bottom: 0.4rem; }
.tres > .tarjeta.ancha { grid-column: 1 / -1; }
.tarjeta.ancha .dos { gap: 2rem; align-items: start; }
.tarjeta.ancha .dos > * { margin: 0; }
.tarjeta p:last-child, .tarjeta ul:last-child { margin-bottom: 0; }
.tarjeta ul { padding-left: 1.1em; }
.etiqueta { display: inline-block; font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: var(--esmeralda-tenue); color: var(--esmeralda-oscura); border-radius: 999px; padding: 0.2rem 0.6rem; margin-bottom: 0.6rem; }
.paso { border-left: 3px solid var(--esmeralda); padding-left: 1rem; }
.paso b { display: block; font-family: var(--display); font-weight: 600; margin-bottom: 0.25rem; }
.estado-fase { background: var(--esmeralda-tenue); border-radius: 8px; padding: 1.25rem 1.5rem; }
.estado-fase p:last-child { margin-bottom: 0; }
.estado-fase .hitos { list-style: none; padding: 0; margin: 0.6rem 0 1rem; }
.estado-fase .hitos li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; margin-bottom: 0.5rem; }
.estado-fase .hitos svg { width: 20px; height: 20px; color: var(--esmeralda); margin-top: 0.15rem; }

/* Por qué un motor propio: comparativa */
.entrada-seccion { font-size: 1.15rem; color: var(--tinta-suave); max-width: 70ch; margin-bottom: 1.75rem; }
.tabla { background: var(--blanco); border: 1px solid var(--salvia); border-radius: 10px; overflow: hidden; margin-top: 2rem; }
.comparativa { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.comparativa caption { text-align: left; font-family: var(--display); font-weight: 600; font-size: 1.1rem; padding: 1.1rem 1.25rem 0.75rem; }
.comparativa th, .comparativa td { text-align: left; vertical-align: top; padding: 0.85rem 1.25rem; border-top: 1px solid var(--salvia); }
.comparativa thead th { background: var(--esmeralda-tenue); color: var(--esmeralda-oscura); font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.comparativa tbody th { font-family: var(--display); font-weight: 600; width: 22%; }
.comparativa tbody td:nth-child(2) { color: var(--tinta); }
.comparativa tbody td:nth-child(3) { color: var(--tinta-suave); }
.nota-tabla { margin: 0.6rem 0 0; max-width: none; }
@media (max-width: 720px) {
  .comparativa thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .comparativa tr { display: block; border-top: 1px solid var(--salvia); }
  .comparativa tbody tr:first-child { border-top: 0; }
  .comparativa th, .comparativa td { display: block; border-top: 0; padding: 0.45rem 1.1rem; width: auto; }
  .comparativa tbody th { width: auto; padding-top: 0.9rem; }
  .comparativa td::before { content: attr(data-col); display: block; font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--esmeralda); margin-bottom: 0.1rem; }
  .comparativa td:last-child { padding-bottom: 0.9rem; }
}

.faq details { border-top: 1px solid var(--salvia); padding: 0.9rem 0; max-width: 70ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--salvia); }
.faq summary { font-family: var(--display); font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--esmeralda); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.6rem 0 0; }

.cierre { background: var(--tinta); color: var(--porcelana); border-radius: 12px; padding: 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.cierre h2 { color: var(--blanco); max-width: none; }
.cierre p { color: var(--salvia); margin-bottom: 0; }
.cierre .acciones { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
.cierre .boton.secundario { color: var(--blanco); box-shadow: inset 0 0 0 2px var(--salvia); }
.cierre .boton.secundario:hover { background: rgba(255,255,255,0.08); color: var(--blanco); }

footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--salvia); color: var(--tinta-suave); font-size: 0.95rem; }
footer p { margin-bottom: 0.3em; }

/* Conexión de WhatsApp */
.vias { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0 0; }
form.ficha { background: var(--blanco); border: 1px solid var(--salvia); border-radius: 10px; padding: 1.75rem; }
form.ficha label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; }
form.ficha label:first-of-type { margin-top: 0; }
form.ficha input { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--salvia); border-radius: 6px; background: var(--porcelana); color: var(--tinta); }
form.ficha input:focus { border-color: var(--esmeralda); background: var(--blanco); }
form.ficha .boton { width: 100%; margin-top: 1.4rem; font-size: 1.05rem; }
form.ficha .boton + .boton { margin-top: 0.7rem; }
form.ficha .nota { margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--tinta-suave); }
.oculto { display: none !important; }
.estado { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 8px; background: var(--esmeralda-tenue); display: none; }
.estado.visible { display: block; }
.estado.error { background: var(--alerta-tenue); color: var(--alerta); }
.estado p { margin-bottom: 0.4em; }
.estado p:last-child { margin-bottom: 0; }

.legal h3 { margin-top: 1.6rem; }

@media (max-width: 900px) {
  .sellos { grid-template-columns: 1fr; }
  .cierre { grid-template-columns: 1fr; }
  .cierre .acciones { justify-content: flex-start; }
}
@media (max-width: 820px) {
  body { font-size: 17px; }
  .hero, .dos, .vias { grid-template-columns: 1fr; gap: 2rem; }
  .tres, .cuatro { grid-template-columns: 1fr; }
  nav { gap: 0.25rem 1rem; }
  section { padding: 2.25rem 0; }
  .cierre { padding: 1.75rem; }
}
@media (max-width: 820px) { .tarjeta.ancha .dos { gap: 0.9rem; } }
