:root {
  --piso: max(1rem, env(safe-area-inset-bottom));
  --papel: #e7e9e4;
  --noche: #16263d;
  --plata: #e9ecef;
  --plata-oscura: #aab4c0;
  --tinta: #101a28;
  --marca: #236DA9;
  --coral: #ef6a5b;
  --turquesa: #2bb3a6;
  --mostaza: #f2b632;
  --lila: #8b6fd6;
  --celeste: #4fa3e0;
}
* { box-sizing: border-box; }
body { margin: 0; font: 1.0625rem/1.55 "Hanken Grotesk", system-ui, sans-serif; color: var(--tinta); background: var(--papel); }
.envoltura { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { font-family: "Caprasimo", Georgia, serif; font-weight: 400; margin: 0; }

/* Portada */
.portada { background: var(--papel); color: var(--tinta); padding: 2.5rem 0 0; overflow: hidden; }
.franja { display: block; width: 100%; height: clamp(7rem, 24vw, 22rem); object-fit: cover; object-position: left center; margin-top: 1.5rem; }
.marca { margin: 0 0 1.5rem; font-weight: 700; color: #4a5a6e; }
.marca-logo { width: min(15rem, 62vw); margin: 0 auto 1.5rem; }
.logo { display: block; width: 100%; height: auto; }
.firma { margin: .25rem 0 0; font-size: .9rem; font-weight: 600; letter-spacing: .04em; color: #4a5a6e; text-align: right; }
.visita .firma { color: #aab4c0; text-align: left; margin-top: 1rem; }
.portada h1 { font-size: clamp(2.6rem, 10vw, 5.25rem); line-height: 1.02; max-width: 12ch; }
.bajada { max-width: 34rem; margin: 1.25rem 0 1.75rem; font-size: 1.15rem; color: #2c394a; }
.boton { display: inline-block; background: var(--mostaza); color: var(--tinta); text-decoration: none; font-weight: 700; padding: .95rem 1.6rem; border-radius: 3rem; min-height: 3rem; }
.boton:hover { background: #f7c654; }
a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Hilo de cuentas: la idea de la portada */
.sigla { margin: 2.5rem 0 0; font-weight: 600; letter-spacing: .03em; color: #4a5a6e; text-align: center; }
.portada .envoltura + .hilo { margin-top: 1rem; }
.hilo { position: relative; display: flex; align-items: center; gap: .35rem; margin-top: 2.5rem; height: 4.5rem; }
.hilo::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: #8d99a8; }
.cuenta { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; position: relative; background: var(--c, var(--coral)); }
.cuenta::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.7), rgba(255,255,255,0) 42%); }
.hilo .cuenta:nth-child(3n) { width: 1.5rem; height: 1.5rem; }
.hilo .cuenta:nth-child(4n+1) { width: 2.9rem; height: 2.9rem; }
.hilo .cuenta { animation: enhebrar .7s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(var(--i) * 45ms + .2s); }
@keyframes enhebrar { from { transform: translateY(-140%); opacity: 0; } to { transform: none; opacity: 1; } }
.c-coral { --c: var(--coral); } .c-turquesa { --c: var(--turquesa); } .c-mostaza { --c: var(--mostaza); } .c-lila { --c: var(--lila); } .c-celeste { --c: var(--celeste); }

/* Botón flotante de WhatsApp */
.wa-flotante { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(var(--piso) + 8.9rem); z-index: 10; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.wa-flotante:hover { background: #1fbd5a; }
.wa-flotante:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--noche); }

/* Botón flotante de consulta rápida */
.consulta-flotante { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(var(--piso) + 4.95rem); z-index: 10; display: flex; align-items: center; gap: .55rem; min-height: 3.2rem; padding: .6rem 1.2rem .6rem 1rem; border: 0; border-radius: 3rem; background: var(--coral); color: var(--tinta); font: 700 1rem "Hanken Grotesk", system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; }
.tienda-flotante { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(var(--piso) + 0rem); z-index: 10; display: flex; align-items: center; gap: .55rem; min-height: 3.2rem; padding: .6rem 1.2rem .6rem 1rem; border-radius: 3rem; background: var(--marca); color: #fff; text-decoration: none; font: 700 1rem "Hanken Grotesk", system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.tienda-flotante:hover { background: #1d5b8e; }
.tienda-flotante:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--noche); }
.consulta-flotante:hover { background: #f38174; }
.consulta-flotante:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--noche); }

/* Ventana de consulta rápida: letras y botones grandes */
#dlg-consulta { width: min(34rem, calc(100% - 1.5rem)); max-height: 92dvh; overflow: auto; border: 0; border-radius: 1.25rem; padding: 1.25rem; background: #fff; color: var(--tinta); }
#dlg-consulta::backdrop { background: rgba(16, 26, 40, .65); }
#form-consulta { display: grid; gap: 1.1rem; }
#form-consulta h2 { font-size: 1.8rem; margin-right: 6rem; }
.cr-cerrar { position: absolute; top: 1rem; right: 1rem; min-height: 2.75rem; padding: 0 1rem; border: 2px solid var(--plata-oscura); border-radius: 3rem; background: #fff; font: 700 1rem "Hanken Grotesk", system-ui, sans-serif; color: var(--tinta); cursor: pointer; }
.cr-campo { border: 0; margin: 0; padding: 0; display: grid; gap: .6rem; }
.cr-pregunta { font-weight: 700; font-size: 1.15rem; padding: 0; }
#cr-nombre { font: 1.2rem "Hanken Grotesk", system-ui, sans-serif; min-height: 3.4rem; padding: 0 1rem; border: 2px solid var(--plata-oscura); border-radius: .75rem; width: 100%; }
#cr-nombre:focus-visible { outline: 3px solid var(--marca); outline-offset: 2px; }
.cr-opcion { display: flex; align-items: center; gap: .85rem; min-height: 3.4rem; padding: .5rem 1rem; border: 2px solid var(--plata-oscura); border-radius: .75rem; cursor: pointer; font-size: 1.1rem; line-height: 1.25; }
.cr-opcion .cuenta { width: 1.4rem; height: 1.4rem; }
.cr-opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-opcion:has(input:checked) { border-color: var(--tinta); background: #f1f4f8; box-shadow: inset 0 0 0 1px var(--tinta); font-weight: 700; }
.cr-opcion:has(input:focus-visible) { outline: 3px solid var(--marca); outline-offset: 2px; }
.cr-foto { scroll-margin-bottom: 11rem; padding: .9rem 1rem; border: 2px dashed var(--plata-oscura); border-radius: .75rem; background: #f6f7f9; }
.cr-foto[hidden] { display: none; }
.cr-foto-etiqueta { display: flex; align-items: center; gap: .85rem; font-weight: 700; font-size: 1.1rem; line-height: 1.25; cursor: pointer; }
.cr-foto-etiqueta input { width: 1.7rem; height: 1.7rem; flex: none; accent-color: var(--marca); }
.cr-foto-ayuda { margin: .6rem 0 0; color: #3b4a5d; font-size: 1rem; }
.cr-pie { position: sticky; bottom: -1.25rem; display: grid; gap: .5rem; margin: 0 -1.25rem -1.25rem; padding: .75rem 1.25rem 1.25rem; background: #fff; box-shadow: 0 -10px 12px -6px rgba(16,26,40,.15); }
.cr-error { margin: 0; min-height: 0; color: #a3281c; font-weight: 700; font-size: 1.05rem; }
.cr-enviar { width: 100%; border: 0; font: 700 1.2rem "Hanken Grotesk", system-ui, sans-serif; background: #25d366; color: var(--tinta); min-height: 3.6rem; cursor: pointer; }
.cr-enviar:hover { background: #1fbd5a; }
#form-consulta .nota { color: #3b4a5d; margin: 0 !important; font-size: 1rem; }

/* Menú de secciones */
html { scroll-behavior: smooth; }
.menu { position: sticky; top: 0; z-index: 5; display: flex; gap: .25rem; overflow-x: auto; background: var(--noche); padding: .5rem .75rem; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { flex: none; color: #e4e9ef; text-decoration: none; font-weight: 600; font-size: .95rem; padding: .55rem .9rem; border-radius: 3rem; }
.menu a:hover { background: rgba(255,255,255,.12); }
.menu a:focus-visible { outline: 2px solid var(--mostaza); outline-offset: -2px; }

/* Secciones */
.seccion { padding: 3rem 0; scroll-margin-top: 3.4rem; }
.seccion:nth-child(even) { background: rgba(255,255,255,.4); }
.visita { scroll-margin-top: 3.4rem; }
.cabeza { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.cabeza .cuenta { width: 2.2rem; height: 2.2rem; margin-top: .15rem; }
.cabeza h2 { font-size: 1.7rem; line-height: 1.15; }
.cuerpo { padding-left: 3.2rem; }
.cuerpo p { margin: 0 0 1rem; max-width: 34rem; color: #2c394a; }
.cuerpo .vitrina-bajada { font-weight: 600; margin-bottom: .75rem; }
.seccion .enlace-wa { display: inline-block; color: var(--tinta); font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--c, var(--mostaza)); padding-bottom: .1rem; }
.piezas { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.pieza { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--plata-oscura); border-radius: 3rem; padding: .5rem 1.1rem .5rem .6rem; font-weight: 600; }
.pieza .cuenta { width: 1.3rem; height: 1.3rem; }

/* Bocetos a lápiz: dibujos pegados con cinta sobre el papel */
.boceto { position: relative; margin: 0 0 1.5rem; padding: .5rem; background: #f4f5f1; box-shadow: 0 2px 10px rgba(16,26,40,.18); transform: rotate(-1deg); }
.seccion:nth-child(even) .boceto { transform: rotate(1deg); }
.boceto::before { content: ""; position: absolute; top: -.7rem; left: 50%; width: 5rem; height: 1.4rem; margin-left: -2.5rem; background: rgba(242,182,50,.55); transform: rotate(-3deg); }
.boceto img { display: block; width: 100%; height: auto; aspect-ratio: 760 / 470; object-fit: cover; }
.seccion[id="impresion"] .boceto img { mix-blend-mode: multiply; }

/* Tienda en línea */
.tienda { background: var(--marca); color: #fff; padding: 2.5rem 0; }
.tienda-pregunta { font-family: "Caprasimo", Georgia, serif; font-size: 1.7rem; line-height: 1.15; margin: 0 0 1rem; }
.boton-claro { display: inline-block; color: #fff; border: 2px solid #fff; text-decoration: none; font-weight: 700; padding: .8rem 1.5rem; border-radius: 3rem; }
.boton-claro:hover { background: #fff; color: var(--marca); }

/* Visita */
.visita { background: var(--noche); color: #f3f5f7; padding: 2.5rem 0 13.5rem; }
.visita h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.visita p { margin: .2rem 0; }
.isotipo { display: block; width: 3.5rem; height: auto; margin: 0 0 1rem; }
.estado { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.estado::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: currentColor; }
.estado.abierto { color: #5fd49a; } .estado.cerrado { color: #ff8f84; }
.nota { font-size: .92rem; color: #b6c0cc; margin-top: .9rem !important; }
.eslogan { margin-top: 2rem !important; color: var(--plata-oscura); font-style: italic; }

@media (min-width: 52rem) {
  .portada { padding-top: 4rem; }
  .menu { justify-content: center; }
  .seccion .envoltura { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; }
  .cabeza { margin-bottom: 0; grid-column: 1; grid-row: 1; }
  .boceto { grid-column: 1; grid-row: 2; margin: 1.5rem 0 0; }
  .cuerpo { grid-column: 2; grid-row: 1 / span 2; }
  .cuerpo { padding-left: 0; }
  .tienda .envoltura { display: flex; align-items: center; gap: 2rem; justify-content: space-between; }
  .tienda-pregunta { margin: 0; font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .hilo .cuenta { animation: none; } html { scroll-behavior: auto; } }

/* Locales */
.locales { padding: 3rem 0; scroll-margin-top: 3.4rem; }
.locales h2 { font-size: 1.7rem; line-height: 1.15; margin-bottom: .5rem; }
.locales-bajada { margin: 0 0 1.5rem; }
.locales-rejilla { display: grid; gap: 2rem; }
.local h3 { font-size: 1.4rem; margin: .9rem 0 .2rem; }
.local p { margin: .2rem 0; }
.local-lugar { font-weight: 700; color: #4a5a6e; }
.local-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.local-fotos img { display: block; width: 100%; height: auto; border-radius: .5rem; }
@media (min-width: 52rem) { .locales-rejilla { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

/* Logo a la derecha de la portada, centrado con el titular (desde 64rem; antes queda centrado arriba) */
@media (min-width: 64rem) {
  .portada { position: relative; }
  .portada .marca-logo {
    position: absolute; margin: 0;
    right: clamp(1.25rem, 5vw, 6rem);
    width: clamp(15rem, 28vw, 26rem);
    top: calc(4rem + 1.53 * clamp(2.6rem, 10vw, 5.25rem));
    transform: translateY(-50%);
  }
}

/* Celular: los botones flotantes suben para que la barra del navegador no los corte */
@media (max-width: 51.99rem) {
  :root { --piso: calc(max(1rem, env(safe-area-inset-bottom)) + 2rem); }
  .visita { padding-bottom: 15.5rem; }
}
