/* ==========================================================
   Azulado Estudio · Base común de las plantillas por rubro
   Cada plantilla define sus colores y tipografías en su propio
   estilo.css (variables de :root). Acá va solo lo compartido.
   El color de marca (--acento) lo pone motor.js desde datos.js.
   ========================================================== */

:root {
  --acento: #1f6f6a;
  --sobre-acento: #f7f8f7;
  --acento-suave: color-mix(in oklab, var(--acento) 12%, var(--fondo));
  --acento-hondo: color-mix(in oklab, var(--acento) 72%, #0b0d0c);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: 16px;
  --ancho: 1200px;
  --barra-alto: 64px;
  --radio: 10px;
  --radio-chico: 6px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; --barra-alto: 72px; } }

/* ---------- Reset corto ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--barra-alto) + 8px); }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--fuente-titulo); line-height: 1.1; text-wrap: balance; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

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

.contenedor { width: 100%; max-width: calc(var(--ancho) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.seccion { padding-block: var(--s-8); }
@media (min-width: 1024px) { .seccion { padding-block: var(--s-9); } }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.saltar {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  background: var(--tinta); color: var(--fondo); padding: var(--s-2) var(--s-4); border-radius: var(--radio-chico);
}
.saltar:focus { top: var(--s-2); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--radio-boton, 999px);
  background: var(--acento); color: var(--sobre-acento);
  font-weight: 600; font-size: 0.975rem; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-linea { background: transparent; color: var(--tinta); border-color: color-mix(in oklab, var(--tinta) 28%, transparent); }
.btn-claro { background: var(--fondo); color: var(--tinta); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--acento-hondo); }
  .btn-linea:hover { background: transparent; border-color: var(--tinta); }
  .btn-claro:hover { background: color-mix(in oklab, var(--fondo) 88%, var(--tinta)); }
}

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 40;
  height: var(--barra-alto);
  background: var(--barra-fondo, var(--fondo));
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.barra.con-borde { border-bottom-color: var(--linea); }
.barra .contenedor { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.marca { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; min-height: 44px; }
.marca img { height: 36px; width: auto; }
.marca-texto { font-family: var(--fuente-titulo); font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1; }
.nav-escritorio { display: none; }
.nav-escritorio a { text-decoration: none; font-size: 0.95rem; padding: var(--s-2) 0; color: var(--tinta-suave); transition: color 200ms ease; }
.nav-escritorio a:hover { color: var(--tinta); }
.barra-acciones { display: flex; align-items: center; gap: var(--s-2); }
.barra-acciones .btn { min-height: 44px; padding: 0 var(--s-4); }
.boton-menu {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--linea); border-radius: var(--radio-chico);
}
.boton-menu span { display: block; width: 18px; height: 1.5px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
@media (min-width: 960px) {
  .nav-escritorio { display: flex; gap: var(--s-6); }
  .boton-menu { display: none; }
}
@media (max-width: 359px) { .barra-acciones .btn-ocultable { display: none; } }

/* Menú del celular: va FUERA del header y oculto con [hidden] (no queda activo encima de la página) */
.menu-movil {
  position: fixed; inset: var(--barra-alto) 0 0 0; z-index: 39;
  background: var(--fondo);
  padding: var(--s-6) var(--gutter);
  display: flex; flex-direction: column; gap: var(--s-2);
  animation: menu-entra 220ms var(--ease-out);
}
.menu-movil a { font-family: var(--fuente-titulo); font-size: 1.75rem; text-decoration: none; padding: var(--s-2) 0; border-bottom: 1px solid var(--linea); }
.menu-movil .btn { margin-top: var(--s-5); font-family: var(--fuente-texto); font-size: 1rem; border-bottom: 0; }
@keyframes menu-entra { from { opacity: 0; transform: translateY(-8px); } }
@media (min-width: 960px) { .menu-movil { display: none !important; } }

/* ---------- Estado de horario (abierto / cerrado) ---------- */
.estado-horario { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 0.9rem; font-weight: 500; }
.estado-horario::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa19e; flex: none; }
.estado-horario.abierto::before { background: #2f9e5b; box-shadow: 0 0 0 4px color-mix(in oklab, #2f9e5b 22%, transparent); }
.lista-horarios { display: grid; gap: var(--s-1); font-variant-numeric: tabular-nums; }
.lista-horarios li { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--linea); }
.lista-horarios li.hoy { font-weight: 650; }
.lista-horarios span:last-child { text-align: right; color: var(--tinta-suave); }
.lista-horarios li.hoy span:last-child { color: var(--tinta); }

/* ---------- Mapa ---------- */
.mapa { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radio); background: var(--superficie); filter: saturate(0.85); }

/* ---------- Preguntas frecuentes ---------- */
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-5) 0; font-weight: 600; font-size: 1.05rem; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none; margin-right: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding-bottom: var(--s-5); color: var(--tinta-suave); max-width: 65ch; }

/* ---------- Formularios que arman el mensaje de WhatsApp ---------- */
.campo { display: grid; gap: var(--s-2); }
.campo label, .campo .etiqueta { font-size: 0.875rem; font-weight: 600; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  background: var(--fondo); border: 1px solid color-mix(in oklab, var(--tinta) 20%, transparent); border-radius: var(--radio-chico);
  transition: border-color 160ms ease;
}
.campo input:hover, .campo select:hover { border-color: color-mix(in oklab, var(--tinta) 40%, transparent); }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--acento); outline-offset: 0; border-color: var(--acento); }
.campo .ayuda { font-size: 0.8125rem; color: var(--tinta-suave); }
.campo-error input, .campo-error select { border-color: #b3261e; }
.mensaje-error { font-size: 0.8125rem; color: #b3261e; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-flotante {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 56px; padding: 0 var(--s-5) 0 var(--s-4);
  background: #1f8f4e; color: #f6fbf8; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 20px -6px rgb(10 30 20 / 0.45);
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
}
.wa-flotante svg { width: 24px; height: 24px; }
.wa-flotante:active { transform: scale(0.96); }
.wa-flotante.oculto { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* ---------- Pie ---------- */
.pie { padding-block: var(--s-7) calc(var(--s-8) + 40px); border-top: 1px solid var(--linea); font-size: 0.9rem; color: var(--tinta-suave); }
.pie .contenedor { display: grid; gap: var(--s-5); }
.pie a { color: var(--tinta); }
.pie-linea { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); }
.aviso-demo { font-size: 0.8125rem; }

/* ---------- Ventana (fichas, galería) ---------- */
dialog.ventana {
  width: min(1040px, 100%); max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; padding: 0;
  border: 0; background: var(--fondo); color: var(--tinta); overflow: auto;
}
@media (min-width: 900px) {
  dialog.ventana { height: fit-content; max-height: calc(100dvh - 48px); margin: auto; border-radius: var(--radio); }
}
dialog.ventana:focus { outline: none; }
dialog.ventana::backdrop { background: rgb(12 14 13 / 0.6); }
dialog.ventana[open] { animation: ventana-entra 260ms var(--ease-out); }
dialog.ventana[open]::backdrop { animation: fundido 260ms ease; }
@keyframes ventana-entra { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes fundido { from { opacity: 0; } }
.cerrar-ventana {
  position: sticky; top: var(--s-3); margin: var(--s-3) var(--s-3) 0 auto; z-index: 2; float: right;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 0; background: var(--fondo); color: var(--tinta);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.15);
}
.cerrar-ventana svg { width: 20px; height: 20px; }

/* ---------- Aparición al hacer scroll (solo si hay JS y movimiento) ---------- */
.con-mov .revelar { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--demora, 0ms); }
.con-mov .revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .btn, .wa-flotante { transition: background-color 200ms ease, opacity 200ms ease; }
}

/* ==========================================================
   Portada en capas (la arma motor.js con S.portada)
   Foto entera, la palabra grande y la misma foto con el fondo
   recortado encima: la palabra queda detrás de la persona.
   Los valores --palabra-* y --portada-* se ajustan en datos.js.
   ========================================================== */
.portada {
  position: relative; overflow: hidden;
  height: 100svh; min-height: 620px; max-height: 1000px;
  background: var(--portada-fondo, var(--portada-color, #111));
  color: var(--portada-texto-color, #fff);
}
.portada-capas { position: absolute; inset: 0; container-type: size; }
.portada-capas img.portada-capa {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--portada-foco, 50% 50%);
}
/* Modo "lado": la foto a la derecha y el fondo liso extendido (para fotos verticales) */
.portada--lado .portada-capas img.portada-capa {
  inset: auto; right: var(--portada-derecha, 5vw); bottom: 0; height: 100%; width: auto; object-fit: fill;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}
/* Sombra para que se lea el texto: va por encima de las dos fotos */
.portada-capas::after { content: ""; position: absolute; inset: 0; background: var(--portada-sombra, none); pointer-events: none; }
.portada-palabra {
  position: absolute; margin: 0;
  top: var(--palabra-arriba, 12%); left: var(--palabra-izq, var(--gutter)); right: var(--palabra-der, auto);
  text-align: var(--palabra-alinear, left);
  font-family: var(--palabra-fuente, var(--fuente-titulo)); font-weight: var(--palabra-peso, 700);
  font-size: var(--palabra-tam, 28cqh); line-height: 0.8; letter-spacing: var(--palabra-espaciado, -0.035em); font-stretch: var(--palabra-estirar, normal);
  text-transform: var(--palabra-caja, uppercase); color: var(--palabra-color, #fff); white-space: nowrap;
}
.portada-texto { position: absolute; left: 0; right: 0; bottom: var(--portada-texto-abajo, clamp(48px, 9vh, 96px)); z-index: 2; }
@media (max-width: 760px) {
  .portada { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; }
  .portada-capas { position: relative; inset: auto; height: var(--portada-alto-cel, 66svh); min-height: 440px; }
  .portada-capas img.portada-capa { object-position: var(--portada-foco-cel, var(--portada-foco, 50% 50%)); object-fit: var(--portada-ajuste-cel, cover); -webkit-mask-image: var(--portada-mascara-cel, none); mask-image: var(--portada-mascara-cel, none); }
  .portada--lado .portada-capas img.portada-capa { right: auto; left: 50%; transform: translateX(-50%); -webkit-mask-image: none; mask-image: none; }
  .portada-capas::after { background: linear-gradient(transparent 62%, var(--portada-color, #111)); }
  .portada-palabra { top: var(--palabra-arriba-cel, 14%); left: var(--palabra-izq-cel, 0); right: var(--palabra-der-cel, 0); text-align: var(--palabra-alinear-cel, center); font-size: var(--palabra-tam-cel, 22cqw); }
  .portada-texto { position: relative; bottom: auto; margin-top: -12px; padding-bottom: var(--s-7); }
}
.con-mov .portada-capas { animation: portada-asienta 1.4s var(--ease-out) both; transform-origin: 50% 100%; }
.con-mov .portada-palabra { animation: portada-sube 1s var(--ease-out) 0.15s both; }
.con-mov .portada-texto .contenedor > * > * { animation: portada-sube 700ms var(--ease-out) both; }
.con-mov .portada-texto .contenedor > * > :nth-child(1) { animation-delay: 0.35s; }
.con-mov .portada-texto .contenedor > * > :nth-child(2) { animation-delay: 0.41s; }
.con-mov .portada-texto .contenedor > * > :nth-child(3) { animation-delay: 0.47s; }
.con-mov .portada-texto .contenedor > * > :nth-child(n+4) { animation-delay: 0.53s; }
@keyframes portada-asienta { from { transform: scale(1.05); } }
@keyframes portada-sube { from { opacity: 0; transform: translateY(18px); } }

/* La barra flota sobre la portada y recupera su fondo al bajar */
.con-portada .barra { position: fixed; left: 0; right: 0; background: transparent; transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease; }
.con-portada:not(.bajo-portada) .barra { color: var(--portada-barra, #fff); }
.con-portada:not(.bajo-portada) .barra .nav-escritorio a { color: inherit; opacity: 0.85; }
.con-portada:not(.bajo-portada) .barra .nav-escritorio a:hover { opacity: 1; }
.con-portada:not(.bajo-portada) .barra .boton-menu { border-color: color-mix(in oklab, currentColor 35%, transparent); }
.con-portada.bajo-portada .barra { background: var(--barra-fondo, var(--fondo)); border-bottom-color: var(--linea); }
.con-portada.menu-abierto .barra { background: var(--fondo); color: var(--tinta); }

/* ==========================================================
   Banda de foto a pantalla completa con un título grande
   (la arma motor.js con S.banda)
   ========================================================== */
.banda-foto { position: relative; min-height: min(86svh, 760px); display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: #111; }
.banda-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--banda-foco, 50% 50%); }
.banda-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 10 10 / 0.78), rgb(8 10 10 / 0.15) 60%, rgb(8 10 10 / 0.05)); }
.banda-foto .contenedor { position: relative; z-index: 1; padding-block: var(--s-8); display: grid; gap: var(--s-5); justify-items: start; }
.banda-titulo { font-size: clamp(2.75rem, 1rem + 7vw, 6rem); line-height: 0.92; letter-spacing: -0.03em; max-width: 12ch; }
.banda-texto { font-size: 1.125rem; max-width: 42ch; color: rgb(255 255 255 / 0.86); }
.banda-foto .btn { background: #fff; color: #111; }
@media (hover: hover) and (pointer: fine) { .banda-foto .btn:hover { background: color-mix(in oklab, #fff 86%, #111); } }
.con-mov .banda-foto img { transition: transform 1.2s var(--ease-out); transform: scale(1.06); }
.con-mov .banda-foto.visible img { transform: none; }
.btn-claro-linea { background: transparent; color: inherit; border-color: color-mix(in oklab, currentColor 45%, transparent); }
@media (hover: hover) and (pointer: fine) { .btn-claro-linea:hover { background: color-mix(in oklab, currentColor 12%, transparent); border-color: currentColor; } }
/* El bloque de texto de la portada puede ir a la derecha: --portada-texto-margen: auto */
.portada-texto .contenedor > * { margin-left: var(--portada-texto-margen, 0); }
@media (max-width: 760px) { .portada-texto .contenedor > * { margin-left: 0; } }
