/* De Volada: estilos compartidos */

:root {
  --papel: #FBFCFE;
  --cuadro: #E1EAF5;
  --cuadro-fuerte: #B9CDE6;
  --tinta: #1C2B6E;
  --tinta-suave: #4A5687;
  --margen: #E0473C;
  --marcatextos: #FFE34A;
  --marcatextos-hover: #FFD91A;
  --pagado: #DDEBDF;
  --pagado-tinta: #22603A;
  --debe: #FBE1DE;
  --debe-tinta: #A3271D;

  --letra: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mano: "Kalam", "Comic Sans MS", cursive;

  --ancho: 1080px;
  --lado: 16px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background-color: var(--papel);
  background-image:
    linear-gradient(var(--cuadro) 1px, transparent 1px),
    linear-gradient(90deg, var(--cuadro) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--tinta);
  font-family: var(--letra);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Línea roja de margen del cuaderno (solo pantallas amplias) */
@media (min-width: 900px) {
  body::before {
    content: "";
    position: fixed;
    top: 0; bottom: 0; left: 44px;
    width: 2px;
    background: var(--margen);
    opacity: .55;
    pointer-events: none;
    z-index: 0;
  }
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

a { color: inherit; }

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

.envoltura {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--lado);
}
@media (min-width: 900px) {
  .envoltura { padding: 0 32px 0 88px; }
}

/* ---------- Encabezado ---------- */
.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.marca svg { width: 34px; height: 24px; }
.cabecera .enlace-wa {
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--papel);
  border: 1.5px solid var(--tinta);
}
.cabecera .enlace-wa:hover { background: #fff; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 24px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.boton svg { width: 22px; height: 22px; flex: none; }
.boton-principal {
  background: var(--marcatextos);
  color: var(--tinta);
  border: 2px solid var(--tinta);
  box-shadow: 4px 4px 0 var(--tinta);
}
.boton-principal:hover { background: var(--marcatextos-hover); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--tinta); }
.boton-principal:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }
.boton-secundario {
  background: var(--papel);
  color: var(--tinta);
  border: 2px solid var(--tinta);
}
.boton-secundario:hover { background: #fff; }

/* ---------- Portada ---------- */
.portada {
  display: grid;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 56px;
}
@media (min-width: 900px) {
  .portada {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 88px;
  }
}

.portada h1 {
  margin: 0;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.6rem, 10.5vw, 5.4rem);
  line-height: .98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
[data-variant="whatsapp"] .portada h1 {
  font-size: clamp(2.1rem, 7.4vw, 4rem);
  line-height: 1.02;
}

.portada .bajada {
  margin: 22px 0 0;
  max-width: 36ch;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--tinta-suave);
  text-wrap: pretty;
}

.oferta {
  margin: 22px 0 0;
  max-width: 34ch;
  text-wrap: balance;
  font-weight: 700;
  font-size: 1.125rem;
}
.oferta span {
  background: linear-gradient(transparent 38%, var(--marcatextos) 38%, var(--marcatextos) 92%, transparent 92%);
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
@media (max-width: 539px) {
  .acciones .boton { width: 100%; }
}

.letra-chica {
  margin: 16px 0 0;
  font-size: .9375rem;
  color: var(--tinta-suave);
  max-width: 44ch;
}

.ilustracion {
  width: 100%;
  max-width: 320px;
  margin: 8px 0 0 auto;
}
@media (min-width: 900px) {
  .ilustracion { max-width: 480px; margin: 0 0 0 auto; }
}

.mascara { stroke-dasharray: 1; stroke-dashoffset: 0; }

/* ---------- Secciones ---------- */
.seccion { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 900px) { .seccion { padding-top: 80px; padding-bottom: 80px; } }

.seccion h2 {
  margin: 0 0 28px;
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(1.75rem, 5.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}
.seccion .intro {
  margin: -12px 0 32px;
  max-width: 52ch;
  color: var(--tinta-suave);
}

/* "¿Te suena?": renglones de libreta escritos a mano */
.renglones {
  list-style: none;
  margin: 0;
  padding: 8px 20px 8px 20px;
  background-color: #fff;
  background-image: linear-gradient(transparent calc(2.6rem - 1px), var(--cuadro-fuerte) calc(2.6rem - 1px));
  background-size: 100% 2.6rem;
  border: 1.5px solid var(--cuadro-fuerte);
  border-radius: 4px;
  max-width: 720px;
  box-shadow: 0 1px 0 var(--cuadro-fuerte), 6px 8px 0 -2px rgba(28, 43, 110, .06);
  position: relative;
}
.renglones::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 46px;
  width: 1.5px;
  background: var(--margen);
  opacity: .7;
}
.renglones li {
  font-family: var(--mano);
  font-size: 1.3rem;
  line-height: 2.6rem;
  padding-left: 40px;
  color: #22337F;
}
@media (max-width: 539px) {
  .renglones { background-size: 100% 2.4rem; background-image: linear-gradient(transparent calc(2.4rem - 1px), var(--cuadro-fuerte) calc(2.4rem - 1px)); }
  .renglones li { font-size: 1.12rem; line-height: 2.4rem; }
}
.renglones-pie {
  margin: 20px 0 0;
  font-weight: 600;
}

/* Cómo funciona */
.pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) {
  .pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}
.pasos li { position: relative; }
.pasos .num {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.5rem;
  border: 2.5px solid var(--tinta);
  border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%;
  background: var(--marcatextos);
}
.pasos h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}
.pasos p { margin: 0; color: var(--tinta-suave); max-width: 36ch; }

/* Sí / todavía no */
.alcance {
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) { .alcance { grid-template-columns: 1fr 1fr; gap: 56px; } }
.alcance h3 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 700;
}
.alcance ul { list-style: none; margin: 0; padding: 0; }
.alcance li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--cuadro-fuerte);
}
.alcance li::before {
  flex: none;
  width: 1.2em;
  font-weight: 800;
  text-align: center;
}
.alcance .si li::before { content: "✓"; color: var(--pagado-tinta); }
.alcance .no li { color: var(--tinta-suave); }
.alcance .no li::before { content: "×"; color: var(--margen); font-size: 1.2em; }

/* Ejemplo: antes y después */
.ejemplo {
  display: grid;
  gap: 36px;
  align-items: center;
}
@media (min-width: 760px) {
  .ejemplo { grid-template-columns: 1fr auto 1fr; gap: 28px; }
}
.etiqueta-ej {
  display: block;
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 1rem;
}
.hoja {
  background: #fff;
  border: 1.5px solid var(--cuadro-fuerte);
  border-radius: 4px;
  padding: 14px 16px 18px 52px;
  position: relative;
  background-image: linear-gradient(transparent calc(2.2rem - 1px), var(--cuadro-fuerte) calc(2.2rem - 1px));
  background-size: 100% 2.2rem;
  background-position: 0 14px;
  transform: rotate(-1.2deg);
  box-shadow: 5px 6px 0 -1px rgba(28, 43, 110, .07);
}
.hoja::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 38px;
  width: 1.5px;
  background: var(--margen);
  opacity: .7;
}
.hoja p {
  margin: 0;
  font-family: var(--mano);
  font-size: 1.08rem;
  line-height: 2.2rem;
  color: #22337F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hoja .tachado { text-decoration: line-through; text-decoration-color: var(--margen); text-decoration-thickness: 2px; opacity: .8; }
.hoja .encierro { border: 2px solid var(--margen); border-radius: 50%; padding: 0 6px; }

.flecha-ej { justify-self: center; color: var(--tinta); }
.flecha-ej svg { width: 72px; height: 40px; }
@media (max-width: 759px) { .flecha-ej svg { transform: rotate(90deg); width: 56px; } }

.telefono {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border: 3px solid var(--tinta);
  border-radius: 34px;
  padding: 12px 10px 16px;
  background: var(--tinta);
  box-shadow: 6px 8px 0 -2px rgba(28, 43, 110, .14);
}
.pantalla {
  background: #fff;
  border-radius: 24px;
  padding: 18px 14px 14px;
  font-size: .9rem;
  line-height: 1.35;
}
.pantalla .app-titulo { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.pantalla .app-titulo b { font-size: 1.05rem; font-stretch: 112%; }
.pantalla .app-titulo span { color: var(--tinta-suave); font-size: .8rem; }
.pantalla .resumen { display: flex; gap: 8px; margin: 12px 0 10px; }
.pantalla .resumen div {
  flex: 1;
  background: var(--papel);
  border: 1.5px solid var(--cuadro-fuerte);
  border-radius: 10px;
  padding: 8px 10px;
}
.pantalla .resumen small { display: block; color: var(--tinta-suave); font-size: .72rem; }
.pantalla .resumen strong { font-size: 1.1rem; font-stretch: 112%; }
.pantalla ul { list-style: none; margin: 0; padding: 0; }
.pantalla li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-top: 1px solid var(--cuadro);
}
.pantalla li small { display: block; color: var(--tinta-suave); font-size: .76rem; }
.chip {
  flex: none;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.chip.pagado { background: var(--pagado); color: var(--pagado-tinta); }
.chip.debe { background: var(--debe); color: var(--debe-tinta); }
.chip.manana { background: #E6ECF8; color: var(--tinta); }
.nota-ej {
  margin: 28px 0 0;
  font-size: .9rem;
  color: var(--tinta-suave);
}

/* Preguntas frecuentes */
.preguntas { max-width: 760px; }
.preguntas details {
  border-top: 1.5px solid var(--cuadro-fuerte);
  background: rgba(251, 252, 254, .85);
}
.preguntas details:last-child { border-bottom: 1.5px solid var(--cuadro-fuerte); }
.preguntas summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-weight: 700;
  font-size: 1.125rem;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: "+";
  flex: none;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 500;
  transition: transform .15s ease;
}
.preguntas details[open] summary::after { transform: rotate(45deg); }
.preguntas details p { margin: 0 4px 20px; color: var(--tinta-suave); max-width: 62ch; }

/* Cierre */
.cierre {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 48px 24px;
  background: var(--tinta);
  color: #fff;
  border-radius: 20px;
  text-align: left;
}
@media (min-width: 760px) { .cierre { padding: 64px 56px; } }
.cierre h2 {
  margin: 0;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.cierre p { margin: 16px 0 0; color: #D3DAF2; max-width: 46ch; }
.cierre .acciones { margin-top: 28px; }
.cierre .boton-principal { box-shadow: 4px 4px 0 #0B1440; border-color: #0B1440; }
.cierre .boton-secundario { background: transparent; color: #fff; border-color: #fff; }
.cierre .boton-secundario:hover { background: rgba(255, 255, 255, .08); }
.cierre :focus-visible { outline-color: var(--marcatextos); }

/* Pie */
.pie {
  padding-top: 32px;
  padding-bottom: 120px;
  font-size: .9rem;
  color: var(--tinta-suave);
}
.pie p { margin: 0 0 8px; }
.pie a { font-weight: 600; color: var(--tinta); }
@media (min-width: 760px) { .pie { padding-bottom: 48px; } }

/* Barra fija en celular */
.barra {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 10px var(--lado) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 252, 254, .96);
  border-top: 1.5px solid var(--cuadro-fuerte);
  transform: translateY(110%);
  transition: transform .2s ease;
}
.barra.visible { transform: translateY(0); }
.barra .boton { min-height: 50px; padding: 10px 16px; box-shadow: none; }
.barra .boton-principal { flex: 1; }
.barra .boton-secundario { flex: none; width: 56px; padding: 0; }
@media (min-width: 760px) { .barra { display: none; } }

/* Páginas internas (gracias, aviso) */
.interna { padding-top: 32px; padding-bottom: 80px; }
.interna h1 {
  margin: 0 0 20px;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.texto {
  max-width: 68ch;
  background: rgba(251, 252, 254, .92);
}
.texto h2 { font-size: 1.25rem; font-weight: 700; margin: 36px 0 10px; line-height: 1.3; }
.texto p, .texto li { color: #2C3A78; }
.texto ul { padding-left: 1.2em; }
.texto li { margin-bottom: 6px; }

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