/* =========================================================
   LAYOUT BASE (estructura real del documento)
   ========================================================= */

html{
  height:100%;
}

body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* el contenido empuja al footer */
main{
  flex:1;
  display:block;
}


/* =========================================================
   HERO (NO ROMPE EL FLUJO)
   ========================================================= */

.hero{
  position:relative;
  width:100%;
  min-height:clamp(520px,72vh,720px);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  isolation:isolate;
  z-index:0;
}

/* capas de fondo */

.hero-bg{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  transition:opacity 1.2s ease, transform 6s ease;
  transform:scale(1.06);
  z-index:0;
}

.hero-bg-a{opacity:1;}
.hero-bg-b{opacity:0;}

.hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,.55));
}

.hero.is-switching .hero-bg-b{
  opacity:1;
  transform:scale(1);
}

.hero.is-switching .hero-bg-a{
  opacity:0;
  transform:scale(1.12);
}


/* contenido */

.hero-content{
  position:relative;
  z-index:2;
  width:100%;
}

.hero-wrap{
  max-width:750px;
  padding:120px 20px 60px;
}

/* texto */

.hero h1{
  color:#fff;
  font-size:clamp(34px,4.2vw,60px);
  line-height:1.05;
  margin-bottom:16px;
  text-shadow:0 10px 40px rgba(0,0,0,.55);
  opacity:0;
  transform:translateY(25px);
  transition:opacity .8s ease, transform .8s ease;
}

.hero.show-text h1{
  opacity:1;
  transform:translateY(0);
}

.lead{
  color:#fff;
  max-width:65ch;
  margin-bottom:22px;
  font-size:clamp(16px,2vw,18px);
  opacity:0;
  transform:translateY(25px);
  transition:opacity .9s ease .25s, transform .9s ease .25s;
}

.hero.show-text .lead{
  opacity:1;
  transform:translateY(0);
}

.actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  opacity:0;
  transform:translateY(25px);
  transition:opacity .9s ease .45s, transform .9s ease .45s;
}

.hero.show-text .actions{
  opacity:1;
  transform:translateY(0);
}


/* =========================================================
   NEXT TILE (no rompe altura del hero)
   ========================================================= */

.next-tile{
  position:absolute;
  right:14px;
  bottom:50px;
  display:flex;
  width:clamp(260px,30vw,420px);
  height:clamp(100px,15vh,140px);
  z-index:1;
  background:#ffffff00;
}



.next-content{
  background:#fff;
  padding:16px;
  border-radius:18px 0 0 18px;
  box-shadow:-10px 20px 40px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.next-label{
  font-size:12px;
  text-transform:uppercase;
  color:#64748b;
  font-weight:600;
}

.next-content h3{
  font-size:18px;
  font-weight:700;
  color:#020617;
}

.next-image{
  width:100%;
  overflow:hidden;
}

.next-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}


/* =========================================================
   SECCIONES (todas vuelven al flujo normal)
   ========================================================= */

section{
  position:relative;
  z-index:1;
  background:#fff;
}

.services,
.why,
.cta{
  position:relative;
  z-index:1;
}


/* =========================================================
   CTA
   ========================================================= */

/* .cta{
  background:linear-gradient(135deg,#020617,#1e293b);
  color:#fff;
  text-align:center;
  padding:80px 20px;
}

.cta-buttons{
  margin-top:25px;
  display:flex;
  flex-wrap:wrap; 
  justify-content:center;
  gap:12px;
}
 */

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:768px){

  .hero{min-height:58vh}

  .hero-wrap{padding:110px 18px 50px}

  .next-tile{display:none}

  .cta-buttons{flex-direction:column}
}




/* ========== BOTÓN WHATSAPP (GLOBAL) ========== */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  z-index: 9999;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

@media (max-width: 700px) {
  .whatsapp-float {
    bottom: 90px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}

/* ========== PREFERENCIAS ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

