/* =========================================================
   AECSA · Servicios v2 — interacción, iconografía y animación
   (se carga después de styles.css)
   ========================================================= */

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 640ms var(--ease-out-expo),
    transform 640ms var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 90ms);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Las service-cards viven dentro de un carrusel horizontal — cualquier reveal
   con stagger se siente saltón al hacer scroll rápido. Las dejamos siempre
   visibles y sin transform inicial. */
.service-card.reveal {
  opacity: 1;
  transform: none;
  transition: none;
  transition-delay: 0s;
  will-change: auto;
}

/* ---------- Cards: número de orden de la propuesta ---------- */
.service-card { position: relative; }
.service-card__media { position: relative; overflow: hidden; }

.service-card__num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--c-white);
  background: linear-gradient(135deg, var(--c-bugambilia), var(--c-bugambilia-active));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  box-shadow: 0 4px 14px rgba(214, 21, 125, 0.38);
}

/* Foto: paneo lento continuo + zoom al hover */
.service-card__media img {
  transform-origin: 55% 45%;
  animation: cardPan 22s ease-in-out infinite alternate;
  transition: transform 700ms var(--ease-out-expo), filter 700ms var(--ease-out-expo);
}
.service-card:hover .service-card__media img,
.service-card:focus-visible .service-card__media img {
  transform: scale(1.09);
  filter: saturate(1.12) contrast(1.04);
  animation-play-state: paused;
}

@keyframes cardPan {
  from { transform: scale(1.03) translateX(-1.2%); }
  to   { transform: scale(1.08) translateX(1.2%); }
}

/* Icono flotante al hover */
.service-card__icon { transition: transform 420ms var(--ease-out-expo), box-shadow 420ms var(--ease-out-expo); }
.service-card:hover .service-card__icon {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 22px rgba(8, 61, 110, 0.30);
}

/* CTA que “camina” al hover */
.service-card__cta { transition: letter-spacing 300ms var(--ease-standard), color 300ms var(--ease-standard); }
.service-card:hover .service-card__cta { letter-spacing: 0.02em; color: var(--c-bugambilia); }

/* ---------- Strip complementario · Laboratorio ---------- */
.service-lab {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-top: var(--sp-8);
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(120deg, var(--c-celeste-soft), var(--c-fondo-crudo) 55%);
  border: 1px solid var(--c-linea);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: box-shadow 320ms var(--ease-standard), transform 320ms var(--ease-standard), border-color 320ms var(--ease-standard);
}
.service-lab:hover,
.service-lab:focus-visible {
  box-shadow: var(--sh-card-hover);
  transform: translateY(-3px);
  border-color: var(--c-azul);
}
.service-lab__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--c-azul);
  background: var(--c-white);
  border: 1px solid var(--c-linea);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.service-lab__icon svg { width: 26px; height: 26px; }
.service-lab__body { flex: 1 1 auto; }
.service-lab__body h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  color: var(--c-ink);
  margin: 0 0 4px;
}
.service-lab__body p {
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--c-gris);
  margin: 0;
}
.service-lab .cta-link { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 767px) {
  .service-lab { flex-direction: column; align-items: flex-start; }
}

/* ---------- Modal: hero con Ken Burns ---------- */
.service-modal__hero { position: relative; overflow: hidden; }
.service-modal__hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.service-modal__hero-img.is-kb {
  animation: kenburns 16s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.0) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, 1.5%); }
}
/* La posición original de veil/close/hero-content vive en styles.css —
   aquí solo garantizamos que la foto animada quede debajo (z-index 0). */

/* ---------- Modal: stats chips ---------- */
.service-modal__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-4) 0 var(--sp-2);
}
.sm-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--c-azul-oscuro);
  background: var(--c-celeste-soft);
  border: 1px solid rgba(14, 95, 168, 0.18);
  border-radius: var(--r-pill);
  padding: 6px 14px;
}
.sm-stat::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-bugambilia);
}

/* ---------- Modal: bloques acordeón ---------- */
.service-modal__blocks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.sm-acc {
  border: 1px solid var(--c-linea);
  border-radius: var(--r-md);
  background: var(--c-fondo-crudo);
  overflow: hidden;
  transition: border-color 260ms var(--ease-standard), box-shadow 260ms var(--ease-standard);
}
.sm-acc[open] {
  border-color: rgba(14, 95, 168, 0.35);
  box-shadow: var(--sh-sm);
  background: var(--c-white);
}
.sm-acc summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  cursor: pointer;
  padding: var(--sp-4) var(--sp-5);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--c-ink);
  user-select: none;
}
.sm-acc summary::-webkit-details-marker { display: none; }
.sm-acc summary:hover { color: var(--c-azul); }
.sm-acc__chev {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--c-azul);
  background: var(--c-celeste-soft);
  border-radius: 50%;
  transition: transform 320ms var(--ease-out-expo);
}
.sm-acc[open] .sm-acc__chev { transform: rotate(180deg); }
.sm-acc__list {
  margin: 0;
  padding: 0 var(--sp-5) var(--sp-4);
  display: grid;
  gap: 8px;
  animation: accIn 360ms var(--ease-out-expo);
}
@keyframes accIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.sm-acc__list li {
  list-style: none;
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--c-ink-soft);
}
.sm-acc__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-celeste-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5FA8' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/9px no-repeat;
}

/* ---------- Cuadritos iconografiados dentro de cada bloque ---------- */
.sm-acc summary { justify-content: flex-start; }
.sm-acc summary .sm-acc__chev { margin-left: auto; }
.sm-acc__ic {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c-azul), var(--c-azul-oscuro));
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(8, 61, 110, 0.25);
}
.sm-acc__ic svg { width: 16px; height: 16px; }

.sm-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 2px var(--sp-5) var(--sp-4);
}
@media (max-width: 640px) {
  .sm-tiles { grid-template-columns: 1fr; }
}
.sm-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  background: var(--c-fondo-suave);
  border: 1px solid var(--c-linea-soft);
  border-radius: var(--r-sm);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--c-ink-soft);
  animation: tileIn 420ms var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform 240ms var(--ease-out-expo), box-shadow 240ms, border-color 240ms, background 240ms;
}
.sm-tile:hover {
  transform: translateY(-2px);
  background: var(--c-white);
  border-color: rgba(14, 95, 168, 0.35);
  box-shadow: var(--sh-sm);
}
.sm-tile__ic {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--c-azul);
  background: var(--c-celeste-soft);
  border-radius: 8px;
}
.sm-tile__ic svg { width: 17px; height: 17px; }
.sm-tile__tx { padding-top: 3px; }
@keyframes tileIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Modal: quote “por qué AECSA” ---------- */
.service-modal__quote {
  margin: var(--sp-5) 0 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--c-bugambilia);
  background: var(--c-bugambilia-pale);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--c-ink);
  font-weight: 600;
}

/* ---------- Galería: miniaturas animadas ---------- */
.service-modal__gallery button {
  transition: transform 300ms var(--ease-out-expo), box-shadow 300ms var(--ease-out-expo), opacity 300ms;
  opacity: 0.82;
}
.service-modal__gallery button:hover { transform: translateY(-3px) scale(1.04); opacity: 1; }
.service-modal__gallery button.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--c-white), 0 0 0 4px var(--c-bugambilia);
  transform: scale(1.02);
}

/* ---------- Carrusel horizontal con scroll-snap ---------- */
.services__carousel {
  position: relative;
  margin-top: var(--sp-6);
}

.services__grid--v2 {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--grid-gutter);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scroll-padding-left: var(--section-px);
  padding: 14px var(--section-px) 44px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.services__grid--v2::-webkit-scrollbar { display: none; }
.services__grid--v2:focus-visible {
  outline: 2px solid var(--c-azul);
  outline-offset: 4px;
  border-radius: var(--r-lg);
}

.services__grid--v2 > .service-card {
  flex: 0 0 clamp(280px, 26vw, 340px);
  scroll-snap-align: start;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.services__grid--v2 > .service-card .service-card__body { flex: 1 1 auto; }
@media (max-width: 1079px) {
  .services__grid--v2 > .service-card { flex-basis: 300px; }
}
@media (max-width: 879px) {
  .services__grid--v2 > .service-card { flex-basis: 280px; }
}
@media (max-width: 599px) {
  .services__grid--v2 > .service-card { flex-basis: 82vw; max-width: 320px; }
}

/* Pista lateral vertical con manita animada — señal explícita de "arrastra".
   Se pega al costado izquierdo de la primera tarjeta y desaparece al primer scroll. */
.services__nudge {
  position: absolute;
  left: calc(var(--section-px) - 42px);
  top: calc(50% - 22px);
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--c-bugambilia);
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms var(--ease-out-expo);
  animation: nudgeBreath 2.4s ease-in-out infinite;
}
.services__nudge.is-dismissed {
  opacity: 0;
  transform: translateY(-50%) translateX(-10px);
}
.services__nudge-hand {
  width: 32px;
  height: 32px;
  animation: nudgeHand 1.8s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(214, 21, 125, 0.32));
}
.services__nudge-label {
  writing-mode: vertical-rl;
  font-family: var(--ff);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.services__nudge-arrow {
  width: 16px;
  height: 16px;
  animation: nudgeArrow 1.8s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes nudgeHand {
  0%, 100% { transform: translateX(0)  rotate(-6deg); }
  50%      { transform: translateX(8px) rotate(6deg); }
}
@keyframes nudgeArrow {
  0%, 100% { transform: translateX(-3px); opacity: 0.55; }
  50%      { transform: translateX(3px);  opacity: 1; }
}
@keyframes nudgeBreath {
  0%, 100% { filter: none; }
  50%      { filter: drop-shadow(0 0 8px rgba(214, 21, 125, 0.35)); }
}
@media (max-width: 1079px) {
  .services__nudge { left: calc(var(--section-px) - 26px); }
  .services__nudge-hand { width: 28px; height: 28px; }
}
@media (max-width: 767px) {
  /* En móvil el gesto táctil es intuitivo, mantengo sólo el chip central */
  .services__nudge { display: none; }
}

/* Cursor "grab" al pasar sobre el carrusel (drag-to-scroll estilo Google) */
@media (hover: hover) and (pointer: fine) {
  .services__grid--v2 { cursor: grab; }
  .services__grid--v2.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
  .services__grid--v2.is-dragging * { pointer-events: none; user-select: none; }
  .services__grid--v2.is-dragging .service-card { transition: none; }
}

/* Chip animado que invita a deslizar */
.services__hint-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-4);
}
.services__hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--c-celeste-soft);
  color: var(--c-azul-oscuro);
  border: 1px solid rgba(14, 95, 168, 0.22);
  border-radius: var(--r-pill);
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 500ms ease, transform 500ms var(--ease-out-expo);
  animation: hintBreath 2.4s ease-in-out infinite;
}
.services__hint.is-dismissed {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.services__hint-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}
.services__hint-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--c-azul);
  animation: hintHandDrag 2.4s ease-in-out infinite;
  transform-origin: 50% 60%;
}
.services__hint-icon svg { width: 18px; height: 18px; }
@keyframes hintHandDrag {
  0%, 100% { transform: translateX(-6px) rotate(-8deg); }
  50%      { transform: translateX(6px)  rotate(8deg);  }
}
@keyframes hintBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 95, 168, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(14, 95, 168, 0); }
}

/* Puntos de progreso */
.services__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: -12px;
}
.services__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(8, 61, 110, 0.20);
  transition: background 240ms var(--ease-standard), transform 240ms var(--ease-out-expo), width 240ms var(--ease-out-expo);
  cursor: pointer;
}
.services__dot.is-active {
  background: var(--c-bugambilia);
  width: 22px;
  border-radius: 999px;
}

/* Full-bleed: el carrusel ocupa TODO el ancho del viewport para que las tarjetas
   LLENEN la pantalla en monitores anchos (sin margen muerto a los lados). El
   heading sigue centrado en el contenedor; sólo el carrusel se sale a full-width. */
.services__carousel {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}


/* ---------- Card 07 · Laboratorio (media ilustrada) ---------- */
.service-card__media--lab {
  display: grid;
  place-items: center;
  min-height: 180px;
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(127, 209, 255, 0.35), transparent 60%),
    radial-gradient(110% 100% at 90% 90%, rgba(214, 21, 125, 0.16), transparent 55%),
    linear-gradient(150deg, var(--c-celeste-soft), #ffffff 70%);
}
.service-card__media--lab .lab-mark {
  width: 72px;
  height: 72px;
  color: var(--c-azul);
  opacity: 0.85;
  filter: drop-shadow(0 8px 18px rgba(8, 61, 110, 0.25));
  animation: labFloat 5.5s ease-in-out infinite alternate;
}
@keyframes labFloat {
  from { transform: translateY(4px) rotate(-2deg); }
  to   { transform: translateY(-6px) rotate(2deg); }
}

/* ---------- Shine que sigue el cursor ---------- */
.service-card { --mx: 50%; --my: 30%; }
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(127, 209, 255, 0.16), transparent 65%);
  transition: opacity 320ms var(--ease-standard);
  z-index: 1;
}
.service-card.is-shine::after { opacity: 1; }

/* ---------- Botón "Ver fotos" en el hero del modal ---------- */
.service-modal__expand {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--r-pill);
  background: rgba(8, 32, 58, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--c-white);
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.service-modal__expand:hover { background: var(--c-bugambilia); transform: translateY(-2px); }
.service-modal__hero { cursor: zoom-in; }
.service-modal__hero--empty { cursor: default; }

/* ---------- LIGHTBOX fullscreen ---------- */
.lb {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: transparent;
  overflow: hidden;
}
.lb::backdrop {
  background: rgba(4, 16, 30, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lb.is-open { animation: lbIn 260ms var(--ease-out-expo) both; }
.lb.is-closing { animation: lbOut 200ms ease both; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbOut { from { opacity: 1; } to { opacity: 0; } }

.lb__stage {
  position: absolute;
  inset: 0 0 120px 0;
  display: grid;
  place-items: center;
  padding: 56px 72px 12px;
}
.lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  user-select: none;
  touch-action: pan-y;
}
.lb__img--in { animation: lbImgIn 380ms var(--ease-out-expo) both; }
@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.lb__btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.lb__btn:hover { background: var(--c-bugambilia); transform: scale(1.07); }
.lb__close { top: 18px; right: 18px; }
.lb__nav { top: calc(50% - 84px); }
.lb__prev { left: 18px; }
.lb__next { right: 18px; }

.lb__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  color: #fff;
  z-index: 2;
  pointer-events: none;
}
.lb__caption {
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.lb__counter {
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lb__thumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  gap: 8px;
  padding: 6px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 2;
}
/* centrado seguro: se centra sin overflow y permite scroll cuando hay muchas */
.lb__thumbs button:first-child { margin-left: auto; }
.lb__thumbs button:last-child { margin-right: auto; }
.lb__thumbs::-webkit-scrollbar { display: none; }
.lb__thumbs button {
  flex: 0 0 auto;
  width: 74px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.55;
  transition: opacity var(--dur-fast), transform var(--dur-fast), border-color var(--dur-fast);
}
.lb__thumbs button:hover { opacity: 0.9; }
.lb__thumbs button.is-active {
  opacity: 1;
  border-color: var(--c-bugambilia);
  transform: scale(1.06);
}
.lb__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 700px) {
  .lb__stage { inset: 0 0 100px 0; padding: 52px 12px 8px; }
  .lb__nav { display: none !important; } /* en móvil: swipe */
  .lb__bar { bottom: 84px; flex-direction: column; gap: 6px; }
  .lb__thumbs button { width: 58px; height: 42px; }
}

/* ---------- Agua animada (canvas) ---------- */
section[data-water] { position: relative; }
.water-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
section[data-water] > .container { position: relative; z-index: 2; }

/* ---------- Secciones sólidas con bordes ondulados sobre las fotos ----------
   Regla única: TODA sección sólida (blanca, suave u oscura) se recorta con ola
   y se traslapa 44px sobre sus vecinas. Las franjas de foto quedan de borde a
   borde: en los valles de cada ola siempre asoma la FOTO, nunca una banda. */
/* Transiciones entre secciones: LINEALES (decisión de Amós 7/jul).
   El sistema de olas fue retirado por completo. */

/* Blancas (servicios y cotizar viven sobre body blanco) */
#servicios::before, #cotizar::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 288 44' preserveAspectRatio='none'><path d='M0 22 Q36 0 72 22 T144 22 T216 22 T288 22 V44 H0 Z' fill='%23FFFFFF'/></svg>");
}
#servicios::after, #cotizar::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 288 44' preserveAspectRatio='none'><path d='M0 22 Q36 44 72 22 T144 22 T216 22 T288 22 V0 H0 Z' fill='%23FFFFFF'/></svg>");
}
/* Suaves (fondo --c-fondo-suave #F6F9FC) */
#cumplimiento::before, #nosotros::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 288 44' preserveAspectRatio='none'><path d='M0 22 Q36 0 72 22 T144 22 T216 22 T288 22 V44 H0 Z' fill='%23F6F9FC'/></svg>");
}
#cumplimiento::after, #nosotros::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 288 44' preserveAspectRatio='none'><path d='M0 22 Q36 44 72 22 T144 22 T216 22 T288 22 V0 H0 Z' fill='%23F6F9FC'/></svg>");
}

/* ---------- COBERTURA · mapa de México con radar ---------- */
.coverage { overflow: hidden; }
.coverage__layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-10);
  align-items: center;
}
@media (max-width: 900px) {
  .coverage__layout { grid-template-columns: 1fr; gap: var(--sp-6); }
}

.cov-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-dark-surface);
  border: 1px solid var(--c-dark-border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
  transition: transform 320ms var(--ease-out-expo), border-color 320ms;
}
.cov-card:hover { transform: translateY(-4px); border-color: rgba(127, 209, 255, 0.45); }
.cov-card h3 {
  color: var(--c-dark-text);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  margin: 0 0 6px;
}
.cov-card p {
  color: var(--c-dark-muted);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  margin: 10px 0 0;
}
.cov-card__dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
}
.cov-card__dot--live { background: var(--c-bugambilia); box-shadow: 0 0 0 0 rgba(214, 21, 125, 0.5); animation: dotPulse 2.2s infinite; }
.cov-card__dot--soon { background: var(--c-celeste); box-shadow: 0 0 0 0 rgba(127, 209, 255, 0.5); animation: dotPulse 2.2s 1.1s infinite; }
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 12px transparent; opacity: 1; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.cov-card__state {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--r-pill);
}
.cov-card__state--live { background: rgba(214, 21, 125, 0.16); color: #FF7DBE; border: 1px solid rgba(214, 21, 125, 0.4); }
.cov-card__state--soon {
  background: rgba(127, 209, 255, 0.12);
  color: var(--c-celeste);
  border: 1px dashed rgba(127, 209, 255, 0.5);
  animation: soonBlink 1.9s ease-in-out infinite;
}
@keyframes soonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.coverage__map { position: relative; will-change: transform; }
.coverage__map svg { width: 100%; height: auto; display: block; }

/* Puntos del país: aparecen en 3 bandas al hacer scroll */
.map-dots__band {
  stroke: rgba(127, 209, 255, 0.30);
  stroke-width: 4.6;
  fill: none;
  opacity: 0;
  transition: opacity 900ms ease;
}
.is-live .map-dots__band:nth-child(1) { opacity: 1; transition-delay: 0ms; }
.is-live .map-dots__band:nth-child(2) { opacity: 1; transition-delay: 180ms; }
.is-live .map-dots__band:nth-child(3) { opacity: 1; transition-delay: 360ms; }

/* Arco Mexicali → Monterrey que se dibuja */
.map-arc {
  stroke: var(--c-celeste);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.75;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1600ms var(--ease-out-quart) 900ms;
  filter: drop-shadow(0 0 6px rgba(127, 209, 255, 0.5));
}
.is-live .map-arc { stroke-dashoffset: 0; }
.map-traveler {
  fill: #fff;
  opacity: 0;
  transition: opacity 400ms ease 2400ms;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}
.is-live .map-traveler { opacity: 1; }

/* Pins con ondas de radar */
.map-pin { opacity: 0; transition: opacity 500ms ease; }
.is-live .map-pin--mxl { opacity: 1; transition-delay: 600ms; }
.is-live .map-pin--mty { opacity: 1; transition-delay: 2300ms; }
.pin-core { fill: var(--c-bugambilia); stroke: #fff; stroke-width: 2; }
.map-pin--mty .pin-core { fill: var(--c-celeste); }
.pin-halo { stroke: rgba(127, 209, 255, 0.8); stroke-width: 1.6; stroke-dasharray: 4 5; animation: haloSpin 10s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes haloSpin { to { transform: rotate(360deg); } }
.pin-ring {
  fill: none;
  stroke: var(--c-bugambilia);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.map-pin--mty .pin-ring { stroke: var(--c-celeste); }
.is-live .pin-ring { animation: radarPing 3s cubic-bezier(0, 0.4, 0.45, 1) infinite; }
.is-live .pin-ring--2 { animation-delay: 1s; }
.is-live .pin-ring--3 { animation-delay: 2s; }
.is-live .map-pin--mty .pin-ring { animation-delay: 0.5s; }
.is-live .map-pin--mty .pin-ring--2 { animation-delay: 1.5s; }
.is-live .map-pin--mty .pin-ring--3 { animation-delay: 2.5s; }
@keyframes radarPing {
  0% { transform: scale(0.4); opacity: 0.85; }
  100% { transform: scale(4.2); opacity: 0; }
}

/* Etiquetas de ciudad */
.map-label {
  position: absolute;
  transform: translate(14px, -50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  opacity: 0;
  translate: 0 8px;
  transition: opacity 600ms ease, translate 600ms var(--ease-out-expo);
  font-family: var(--ff);
}
.is-live .map-label--mxl { opacity: 1; translate: 0 0; transition-delay: 800ms; }
.is-live .map-label--mty { opacity: 1; translate: 0 0; transition-delay: 2500ms; }
.map-label b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--c-dark-text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.map-label span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-dark-muted);
}
.map-label__soon {
  color: var(--c-celeste) !important;
  animation: soonBlink 1.9s ease-in-out infinite;
}
@media (max-width: 600px) {
  .map-label b { font-size: 11px; }
  .map-label span { font-size: 9px; }
}

/* Relleno visual de Cobertura: retícula radar + sweep giratorio tras el mapa.
   Ambos pseudo-elementos son cajas CUADRADAS centradas con border-radius:50%,
   así el recorte circular funciona en cualquier navegador (sin depender de mask). */
.coverage__map::before {
  content: '';
  position: absolute;
  left: 52%;
  top: 42%;
  width: 150%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(127, 209, 255, 0.07) 0 1.5px, transparent 1.5px 84px),
    radial-gradient(circle, rgba(127, 209, 255, 0.05), transparent 62%);
  -webkit-mask: radial-gradient(circle, #000 40%, transparent 68%);
  mask: radial-gradient(circle, #000 40%, transparent 68%);
  z-index: 0;
  pointer-events: none;
}
.coverage__map::after {
  content: '';
  position: absolute;
  left: 52%;
  top: 42%;
  width: 124%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: conic-gradient(rgba(127, 209, 255, 0.09), transparent 22%);
  -webkit-mask: radial-gradient(circle, #000 42%, transparent 66%);
  mask: radial-gradient(circle, #000 42%, transparent 66%);
  animation: radarSweep 12s linear infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
.coverage__map svg { position: relative; z-index: 1; }
.map-label { z-index: 2; }

/* Stats bajo las tarjetas de ciudad */
.coverage__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.cov-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--c-dark-text);
  background: rgba(127, 209, 255, 0.08);
  border: 1px solid var(--c-dark-border);
  border-radius: var(--r-pill);
  padding: 7px 14px;
}
.cov-stat::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-celeste);
}

/* ---------- Sección scroll-scrub (video que "reproduce" con el scroll) ----------
   La sección mide 300vh; adentro un stage sticky ancla el video al viewport.
   El JS calcula el progreso (0..1) según cuánto de la sección ya scrolleaste
   y setea video.currentTime + traslación del texto. */
.scrub {
  position: relative;
  height: 240vh;
  background: #051426;
}
.scrub__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}
.scrub__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #051426;
  z-index: 0;
  pointer-events: none;
}
.scrub__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 20, 38, 0.9) 0%, rgba(5, 20, 38, 0.55) 42%, rgba(5, 20, 38, 0.10) 100%),
    linear-gradient(180deg, rgba(5, 20, 38, 0.15) 0%, transparent 20%, transparent 80%, rgba(5, 20, 38, 0.25) 100%);
  pointer-events: none;
}
.scrub__text {
  position: absolute;
  left: var(--section-px);
  top: 0;
  z-index: 2;
  width: min(48vw, 620px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  color: var(--c-white);
  will-change: transform, opacity;
  transform: translate3d(0, 40vh, 0);
  opacity: 0;
}
.scrub__text .kicker {
  color: var(--c-bugambilia);
}
.scrub__h {
  color: var(--c-white);
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  text-wrap: balance;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.scrub__sub {
  color: rgba(234, 242, 250, 0.9);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  max-width: 48ch;
  margin: 8px 0 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.scrub__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 3;
}
.scrub__progress > span {
  display: block;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--c-celeste), var(--c-bugambilia));
  box-shadow: 0 0 12px rgba(214, 21, 125, 0.4);
}

@media (max-width: 767px) {
  .scrub { height: 220vh; }
  .scrub__text {
    left: 0;
    right: 0;
    width: auto;
    padding: 0 var(--section-px);
    text-align: left;
  }
  .scrub__h { font-size: clamp(24px, 6vw, 36px); }
}

@media (prefers-reduced-motion: reduce) {
  .scrub { height: auto; min-height: 60vh; }
  .scrub__stage { position: relative; height: auto; min-height: 60vh; padding: var(--sp-16) 0; }
  .scrub__video { display: none; }
  .scrub__text {
    position: relative;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
    padding: 0 var(--section-px);
  }
}

/* ---------- Sección sticky-parallax con imagen (Disponibilidad 24/7) ----------
   Misma trayectoria de texto que .scrub (entra por abajo, se detiene al centro),
   pero en lugar de scrubbing de video la imagen tiene un parallax sutil: se
   desplaza en sentido opuesto al scroll a una velocidad menor. */
.pxsc {
  position: relative;
  height: 220vh;
  background: #051426;
}
.pxsc__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}
.pxsc__img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.pxsc__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 20, 38, 0.88) 0%, rgba(5, 20, 38, 0.55) 42%, rgba(5, 20, 38, 0.10) 100%),
    linear-gradient(180deg, rgba(5, 20, 38, 0.20) 0%, transparent 22%, transparent 78%, rgba(5, 20, 38, 0.30) 100%);
  pointer-events: none;
}
.pxsc__text {
  position: absolute;
  left: var(--section-px);
  top: 0;
  z-index: 2;
  width: min(48vw, 620px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  color: var(--c-white);
  will-change: transform, opacity;
  transform: translate3d(0, 40vh, 0);
  opacity: 0;
}
.pxsc__text .kicker { color: var(--c-bugambilia); }
.pxsc__h {
  color: var(--c-white);
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  text-wrap: balance;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.pxsc__sub {
  color: rgba(234, 242, 250, 0.9);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  max-width: 48ch;
  margin: 8px 0 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.pxsc__cta {
  margin-top: 12px;
  align-self: flex-start;
}

@media (max-width: 767px) {
  .pxsc { height: 200vh; }
  .pxsc__text {
    left: 0;
    right: 0;
    width: auto;
    padding: 0 var(--section-px);
  }
  .pxsc__h { font-size: clamp(24px, 6vw, 36px); }
}

@media (prefers-reduced-motion: reduce) {
  .pxsc { height: auto; min-height: 60vh; }
  .pxsc__stage { position: relative; height: auto; min-height: 60vh; padding: var(--sp-16) 0; }
  .pxsc__img { position: absolute; top: 0; height: 100%; transform: none !important; }
  .pxsc__text {
    position: relative;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
    padding: 0 var(--section-px);
  }
}

/* En ventanas cuadradas o anchas-pero-bajas (desktop redimensionado), la foto/
   video full-bleed se sobre-recortaba (se veía "estirada"/muy zoom). Aquí se
   muestra en proporción real 16:9 (sin recorte lateral), con el texto
   superpuesto abajo. Excluye móviles (<768px), que ya tienen su propio layout. */
@media (min-width: 768px) and (max-aspect-ratio: 3 / 2) {
  .pxsc { height: auto; min-height: 0; }
  .pxsc__stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .pxsc__img {
    position: absolute;
    inset: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
  }
  .pxsc__text {
    position: absolute;
    top: 0;
    height: 100%;
    transform: none !important;
    opacity: 1 !important;
    justify-content: flex-end;
    padding-bottom: clamp(24px, 6vh, 56px);
  }
}

/* ---------- Franjas PARALLAX ---------- */
.px {
  position: relative;
  min-height: 62vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 767px) { .px { min-height: 66vh; } }
.px__img {
  position: absolute;
  left: 0;
  top: -13%;
  width: 100%;
  height: 126%;
  object-fit: cover;
  transform: scale(1.24);
  will-change: transform;
  z-index: -2;
}
.px__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(5, 20, 38, 0.86) 0%, rgba(5, 20, 38, 0.55) 46%, rgba(5, 20, 38, 0.22) 100%);
}
.px__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-20) var(--section-px);
}
@media (max-width: 767px) { .px__inner { padding: var(--sp-14) var(--section-px); } }
.px__h {
  color: var(--c-white);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 14px 0 0;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.px__sub {
  color: rgba(234, 242, 250, 0.85);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  max-width: 52ch;
  margin: 16px 0 0;
}
.px__cta { margin-top: 26px; }

/* ---------- Accesibilidad: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .service-card__media img,
  .service-modal__hero-img.is-kb,
  .service-card__media--lab .lab-mark { animation: none !important; }
  .sm-acc__list,
  .sm-tile,
  .lb__img--in,
  .lb.is-open,
  .lb.is-closing { animation: none; }
  .service-card::after { display: none; }
  .services__hint,
  .services__hint-icon,
  .services__nudge,
  .services__nudge-hand,
  .services__nudge-arrow { animation: none !important; }
  .services__grid--v2 { scroll-behavior: auto; }
  .pin-ring, .pin-halo, .cov-card__dot--live, .cov-card__dot--soon,
  .cov-card__state--soon, .map-label__soon { animation: none !important; }
  .map-dots__band, .map-pin, .map-label { opacity: 1; transition: none; }
  .map-arc { stroke-dashoffset: 0; transition: none; }
  .px__img { transform: none; top: 0; height: 100%; }
}
