/* ====================================================================
   ENDO GYM
   Idea: el traje de electrofitness. Una silueta con sus electrodos que
   se encienden de a uno, de arriba abajo, sobre la línea de un impulso
   eléctrico; el lema propio del gimnasio como titular. Tinta azulada,
   índigo, cian eléctrico y gris niebla. El único brillo es el de los electrodos.
   ==================================================================== */
:root {
  --tinta: #1A1D2E;
  --tinta-suave: #2B3150;
  --indigo: #4B3CF0;
  --cian: #10C3D3;
  --niebla: #F1F2F7;
  --blanco: #FFFFFF;
  --gris: #5D6380;
  --wa: #25D366;

  --fuente: "Epilogue", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--fuente); background: var(--blanco); color: var(--tinta); line-height: 1.6; }
a { color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--cian); outline-offset: 3px; }

.contenedor { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1rem; }

/* Cabecera */
.cabecera { background: var(--tinta); color: var(--blanco); }
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marca { font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: 0.02em; }
.cabecera-tel { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ====================================================================
   PRESENTACIÓN + TRAJE
   ==================================================================== */
.inicio { position: relative; background: var(--tinta); color: var(--blanco); padding: 2rem 0 0; overflow: hidden; }
.pulso { position: absolute; left: 0; bottom: 150px; width: 100%; height: 160px; fill: none; stroke: var(--indigo); stroke-width: 3; stroke-linejoin: round; }
.pulso path { stroke-dasharray: 100; animation: pulso 1.6s ease-out both; }
@keyframes pulso { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.inicio-grilla { position: relative; display: grid; gap: 1rem; align-items: end; }
.inicio-texto { padding-bottom: 1rem; }
.inicio h1 { font-weight: 800; font-size: clamp(2.2rem, 8.5vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; }
.bajada { max-width: 42ch; margin: 1.1rem 0 1.5rem; color: #BCC1DA; font-size: 1.05rem; }
.boton-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 0.7rem 1.4rem;
  background: var(--wa);
  color: #0B2915;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.boton-wa:hover { background: #1FB855; }

.traje { justify-self: center; width: min(62vw, 260px); height: auto; margin-bottom: -6px; }
.cuerpo { fill: var(--tinta-suave); }
.cinturon { fill: #3A4166; }
.electrodo {
  fill: #3A4166;
  animation: encender 0.5s ease-out both;
  animation-delay: calc(0.5s + var(--n) * 0.22s);
}
@keyframes encender {
  0% { fill: #3A4166; filter: none; }
  40% { fill: var(--blanco); filter: drop-shadow(0 0 10px var(--cian)); }
  100% { fill: var(--cian); filter: drop-shadow(0 0 6px var(--cian)); }
}

@media (min-width: 860px) {
  .inicio { padding-top: 3.2rem; }
  .inicio-grilla { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
  .inicio-texto { padding-bottom: 4rem; }
  .traje { width: 300px; }
  .pulso { left: 52%; width: 48%; bottom: 190px; }
}

/* ====================================================================
   CLASES
   ==================================================================== */
.clases { background: var(--niebla); padding: 3.2rem 0; }
.clases h2, .ubicacion h2 { font-weight: 800; font-size: clamp(1.8rem, 6.5vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.2rem; }
.clases-lista { display: grid; gap: 0.8rem; }
.clases-lista li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--blanco);
  border-left: 5px solid var(--indigo);
  border-radius: 4px 12px 12px 4px;
}
.clases-lista li > div { flex: 1 1 220px; }
.clases-lista h3 { font-size: 1.1rem; font-weight: 800; }
.clases-lista p { color: var(--gris); font-size: 0.95rem; }
.reservar {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--tinta);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.reservar:hover { background: var(--tinta); color: var(--blanco); }
@media (min-width: 860px) { .clases-lista { grid-template-columns: 1fr 1fr; } }

/* ====================================================================
   UBICACIÓN
   ==================================================================== */
.ubicacion { padding: 3.2rem 0; }
.ubicacion-fila { display: grid; gap: 1.6rem; align-items: center; }
.ubicacion h2 { margin-bottom: 0.8rem; }
.ubicacion p { color: var(--gris); margin-bottom: 0.3rem; }
.ubicacion p a { color: var(--indigo); font-weight: 600; }
.boton-contorno {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 0.8rem;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--tinta);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.boton-contorno:hover { background: var(--tinta); color: var(--blanco); }
#mapa-iframe { width: 100%; height: 300px; border: 0; border-radius: 12px; background: var(--niebla); }
@media (min-width: 860px) { .ubicacion-fila { grid-template-columns: 1fr 1.4fr; gap: 3rem; } #mapa-iframe { height: 340px; } }

/* Pie */
.pie { background: var(--tinta); color: #9EA4C0; padding: 2rem 0 6rem; font-size: 0.9rem; }
.pie p + p { margin-top: 0.3rem; }
.demo-aviso { font-style: italic; }

/* Botón flotante */
.flotante {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem;
  background: var(--wa);
  color: #0B2915;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.flotante span { display: none; }
@media (min-width: 640px) { .flotante { padding: 0.85rem 1.25rem; } .flotante span { display: inline; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulso path { animation: none; }
  .electrodo { animation: none; fill: var(--cian); }
}
