/* MisVisitas · página pública. Papel de libro de registro, tinta azul, azul noche de la garita y ámbar de la pluma de barrera. */
:root {
  --papel: #eef2f6;
  --raya: #c9d6e8;
  --margen: #d64545;
  --tinta: #2b4c9b;
  --noche: #12203a;
  --noche-2: #1c2f52;
  --ambar: #f2b23a;
  --ambar-oscuro: #b97c0c;
  --texto: #12203a;
  --texto-2: #4a5b74;
  --blanco: #ffffff;
  --verde: #1d7a4a;
  --ancho: 1180px;
  --sans: 'Archivo', system-ui, sans-serif;
  --mano: 'Kalam', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--papel); color: var(--texto); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; font-variation-settings: 'wdth' 100; -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: var(--tinta); }
h1, h2, h3 { font-family: var(--sans); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; border-radius: 4px; }

.saltar { position: absolute; left: -999px; top: 0; background: var(--noche); color: var(--blanco); padding: .6rem 1rem; z-index: 50; }
.saltar:focus { left: 1rem; top: 1rem; }

/* ---- Botones ---- */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px; font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; transition: background-color .15s, color .15s, border-color .15s; }
.boton.principal { background: var(--ambar); color: var(--noche); }
.boton.principal:hover { background: #ffc552; }
.boton.secundario { background: transparent; color: var(--noche); border-color: var(--noche); }
.boton.secundario:hover { background: var(--noche); color: var(--blanco); }
.boton.grande { min-height: 54px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.boton.whatsapp { background: #1f8f4e; color: var(--blanco); margin-top: 1.25rem; }
.boton.whatsapp:hover { background: #18773f; }

/* ---- Cabecera ---- */
.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: .75rem max(1rem, calc((100vw - var(--ancho)) / 2 + 1rem)); background: rgb(238 242 246 / 92%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--raya); }
.marca { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--noche); text-decoration: none; font-variation-settings: 'wdth' 112; }
.menu { display: flex; gap: 1.5rem; flex: 1; }
.menu a { color: var(--texto); text-decoration: none; font-weight: 600; font-size: .96rem; }
.menu a:hover { color: var(--tinta); text-decoration: underline; text-underline-offset: 4px; }
.acciones { display: flex; gap: .6rem; }

/* ---- Hero: el libro de la garita ---- */
.hero { max-width: var(--ancho); margin: 0 auto; padding: 4.5rem 1rem 5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); font-weight: 800; font-variation-settings: 'wdth' 118; color: var(--noche); max-width: 14ch; }
.entrada { margin-top: 1.4rem; font-size: 1.2rem; color: var(--texto-2); max-width: 36rem; }
.hero-botones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.nota { margin-top: 1rem; font-size: .92rem; color: var(--texto-2); }

.libro { margin: 0; }
/* La hora va a la izquierda de la línea roja del margen; el texto, a la derecha (como en el libro de papel). */
.libro-hoja { --pad: 4.9rem; --sangria: 4.1rem; --col-hora: 3.1rem; --linea: 4.3rem;
  position: relative; background: var(--blanco); border-radius: 6px 14px 14px 6px; box-shadow: 0 1px 0 var(--raya), 0 18px 40px -18px rgb(18 32 58 / 45%); padding: 1.1rem 1.1rem 1.4rem var(--pad);
  background-image: linear-gradient(to right, transparent var(--linea), var(--margen) var(--linea), var(--margen) calc(var(--linea) + 2px), transparent calc(var(--linea) + 2px)), repeating-linear-gradient(to bottom, transparent 0, transparent 2.55rem, var(--raya) 2.55rem, var(--raya) calc(2.55rem + 1px));
  background-position: 0 0, 0 3.35rem; transform: rotate(-1.2deg); }
.libro-hoja::before { content: ''; position: absolute; left: -10px; top: 18px; bottom: 18px; width: 10px; border-radius: 6px 0 0 6px; background: var(--noche); }
.mano { font-family: var(--mano); color: var(--tinta); font-weight: 400; }
.libro-encabezado { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .82rem; font-weight: 700; color: var(--texto-2); height: 2.25rem; align-items: center; }
.libro-encabezado .mano { font-size: 1.15rem; font-weight: 700; margin-left: .25rem; }
.libro-lineas { list-style: none; margin: 0; padding: 0; }
.libro-lineas li { display: grid; grid-template-columns: var(--col-hora) minmax(0, 1fr) auto; align-items: center; column-gap: calc(var(--sangria) - var(--col-hora)); min-height: 2.55rem; margin-left: calc(-1 * var(--sangria)); font-size: 1.12rem; line-height: 1.15; }
.libro-lineas .hora { font-size: 1.02rem; }
.sello { justify-self: end; white-space: nowrap; font-size: .74rem; font-weight: 700; color: var(--verde); border: 2px solid currentColor; border-radius: 6px; padding: .12rem .45rem; transform: rotate(-3deg); background: rgb(255 255 255 / 85%); }
.sello::before { content: '✓ '; }
.libro figcaption { margin-top: 1.4rem; font-size: .92rem; color: var(--texto-2); max-width: 32rem; }

/* El único momento animado: los sellos aparecen uno tras otro, como si la app fuera registrando cada línea. */
@media (prefers-reduced-motion: no-preference) {
  .sello { opacity: 0; animation: sellar .45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
  .libro-lineas li:nth-child(1) .sello { animation-delay: .6s; }
  .libro-lineas li:nth-child(2) .sello { animation-delay: 1s; }
  .libro-lineas li:nth-child(3) .sello { animation-delay: 1.4s; }
  .libro-lineas li:nth-child(4) .sello { animation-delay: 1.8s; }
  .libro-lineas li:nth-child(5) .sello { animation-delay: 2.2s; }
  .libro-lineas li:nth-child(6) .sello { animation-delay: 2.6s; }
}
@keyframes sellar { from { opacity: 0; transform: rotate(-3deg) scale(1.6); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }

/* ---- Bloques ---- */
.bloque { max-width: var(--ancho); margin: 0 auto; padding: 4.5rem 1rem; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 3rem; align-items: start; border-top: 1px solid var(--raya); }
.bloque-titulo h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; font-variation-settings: 'wdth' 112; }
.bloque-titulo p { margin-top: 1rem; color: var(--texto-2); max-width: 32rem; }
.bloque.oscuro { max-width: none; padding-left: max(1rem, calc((100vw - var(--ancho)) / 2 + 1rem)); padding-right: max(1rem, calc((100vw - var(--ancho)) / 2 + 1rem)); background: var(--noche); color: #e9eef6; border-top: 0; }
.bloque.oscuro .bloque-titulo p, .bloque.oscuro dd { color: #b3c1d6; }
.bloque.oscuro dt { color: var(--blanco); }
.bloque.oscuro .funciones > div { border-left-color: var(--ambar); }

.funciones { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.funciones > div { border-left: 3px solid var(--tinta); padding-left: 1rem; }
.funciones dt { font-weight: 800; font-size: 1.12rem; font-variation-settings: 'wdth' 106; }
.funciones dd { margin: .35rem 0 0; color: var(--texto-2); }

.pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 1.25rem; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-items: baseline; font-size: 1.1rem; color: var(--texto-2); }
.pasos li::before { content: counter(paso); font-family: var(--mano); font-size: 2.2rem; color: var(--tinta); line-height: 1; }
.pasos b { color: var(--texto); }

.integracion { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Precios ---- */
#precios { grid-template-columns: minmax(0, 1fr); }
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--noche); border-radius: 16px; overflow: hidden; background: var(--blanco); }
.plan { padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem; }
.plan + .plan { border-left: 1px solid var(--raya); }
.plan h3 { font-size: 1.35rem; font-weight: 800; font-variation-settings: 'wdth' 110; }
.precio { color: var(--texto-2); }
.precio b { font-size: 3rem; font-weight: 800; color: var(--noche); font-variation-settings: 'wdth' 120; letter-spacing: -.02em; margin-right: .2rem; }
.para { font-size: .96rem; color: var(--texto-2); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; flex: 1; }
.plan li { padding-left: 1.4rem; position: relative; font-size: .97rem; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--verde); font-weight: 800; }
.plan .boton { margin-top: .5rem; }
.plan.destacado { background: var(--noche); color: #e9eef6; }
.plan.destacado .precio, .plan.destacado .para { color: #b3c1d6; }
.plan.destacado .precio b, .plan.destacado h3 { color: var(--blanco); }
.plan.destacado li::before { color: var(--ambar); }
.letra-chica { margin-top: 1rem; font-size: .9rem; color: var(--texto-2); }

/* ---- Contacto ---- */
.contacto { align-items: start; }
.formulario { background: var(--blanco); border-radius: 16px; padding: 1.75rem; box-shadow: 0 18px 40px -24px rgb(18 32 58 / 40%); }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.campos label { display: grid; gap: .35rem; font-weight: 700; font-size: .92rem; }
.campos .ancho { grid-column: 1 / -1; }
.opcional { font-weight: 400; color: var(--texto-2); }
input, select, textarea { font: inherit; font-weight: 400; color: var(--texto); background: var(--papel); border: 1.5px solid var(--raya); border-radius: 10px; padding: .65rem .8rem; min-height: 46px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 3px rgb(43 76 155 / 18%); }
.trampa { position: absolute !important; left: -9999px; }
.error { background: #fde8e6; color: #9e1d14; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.gracias { background: var(--blanco); border-radius: 16px; padding: 2rem; border-left: 6px solid var(--verde); }
.gracias h3 { font-size: 1.5rem; }
.gracias p { margin-top: .6rem; color: var(--texto-2); }

/* ---- Pie ---- */
.pie { max-width: var(--ancho); margin: 0 auto; padding: 3rem 1rem 4rem; border-top: 1px solid var(--raya); display: grid; gap: .6rem; color: var(--texto-2); font-size: .95rem; }
.pie .copy { font-size: .85rem; }

/* ---- Teléfono y tableta ---- */
@media (max-width: 960px) {
  .hero, .bloque, .integracion { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero { padding-top: 2.5rem; }
  .planes { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--raya); }
  .menu { display: none; }
  .cabecera { justify-content: space-between; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .solo-ancho { display: none; }
  .funciones, .campos { grid-template-columns: minmax(0, 1fr); }
  .libro-hoja { --pad: 4.1rem; --sangria: 3.5rem; --col-hora: 2.8rem; --linea: 3.55rem; transform: none;
    background-image: linear-gradient(to right, transparent var(--linea), var(--margen) var(--linea), var(--margen) calc(var(--linea) + 2px), transparent calc(var(--linea) + 2px)); }
  .libro-lineas li { grid-template-columns: var(--col-hora) minmax(0, 1fr); padding: .35rem 0; border-bottom: 1px solid var(--raya); font-size: 1.05rem; }
  .libro-lineas .hora { font-size: .95rem; align-self: start; padding-top: .1rem; }
  .libro-lineas .sello { grid-column: 2; justify-self: start; margin-top: .25rem; }
  .libro-encabezado { height: auto; padding-bottom: .4rem; }
  .bloque { padding-top: 3rem; padding-bottom: 3rem; }
}
