/* Pagina de inicio: cabecera del sitio + portada con carrusel de imagenes. */

/* Cabecera transparente encima de la foto: sin fondo ni linea, solo logos e iconos. */
body.home .site-header{
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  background: transparent;
}
body.home .site-header .page-wrap::after{ display: none; }
body.home .center-logo{ filter: brightness(0) invert(1); }
body.home .zelemar-logo,
body.home .zelemar-word{ filter: brightness(0) invert(1); }
body.home .zelemar-caption{ color: #fff; }
/* En la pagina de inicio el logo de Zelemar va sin el icono: solo el nombre y la frase. */
body.home .zelemar-logo{ display: none; }
/* Sin el icono la cabecera se achica: se mantiene su altura de antes para que el logo del centro no se corra. */
body.home .topbar{ min-height: 84px; }
body.home .icon-btn{ color: #fff; }
body.home .burger:not(.open) span{ background: #fff; }

/* La portada ocupa toda la pantalla (--first), sin sobrar de largo; la
   cabecera queda encima. El texto, las flechas y los puntos se ubican
   dentro de esa misma pantalla. */
.hero{
  --hero-fade: 1.8s;
  --first: max(100svh, 560px);
  position: relative;
  height: var(--first);
  overflow: hidden;
  background: #2a2420;
  isolation: isolate;
}

/* ---- Carrusel: fundido suave + zoom lento (efecto Ken Burns) ---- */
.hero__slides{ position: absolute; inset: 0; }
.hero__slide{
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--hero-fade) ease-in-out;
}
.hero__slide.is-active{ opacity: 1; z-index: 1; }
.hero__slide img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transform: scale(1.02);
  will-change: transform;
}
.hero__slide.is-active img{ animation: heroDrift 9s ease-out forwards; }
@keyframes heroDrift{
  from{ transform: scale(1.02) translate3d(0, 0, 0); }
  to{ transform: scale(1.10) translate3d(-1.2%, -0.8%, 0); }
}

/* Velo oscuro para que el texto blanco se lea sobre cualquier foto. */
.hero__shade{
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20,14,10,.55), rgba(20,14,10,0) 22%),
    radial-gradient(ellipse at 50% calc(var(--first) * .58), rgba(20,14,10,.42), rgba(20,14,10,0) 62%),
    linear-gradient(to bottom, rgba(20,14,10,.06), rgba(20,14,10,.28));
}

/* ---- Texto y boton ---- */
.hero__content{
  position: absolute; z-index: 3;
  left: 50%; top: calc(var(--first) * .30);
  transform: translate(-50%, -50%);
  width: min(92%, 900px);
  display: flex; flex-direction: column; align-items: center; gap: 34px;
  text-align: center;
}
.hero__title{
  margin: 0;
  font-family: 'Jost', sans-serif; font-weight: 300;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.1; letter-spacing: -.005em;
  color: #fff; text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0,0,0,.35);
}

.hero__btn{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 17px 26px; min-width: 126px;
  border-radius: 999px;
  background: #f6e9df; color: #221b16;
  font-family: 'Jost', sans-serif; font-size: 18px; font-weight: 400; text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.hero__btn:hover{ background: #fff; transform: translateY(-2px); }

/* ---- Flechas y puntos ---- */
.hero__nav{
  position: absolute; z-index: 3; top: calc(var(--first) * .5); transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255,255,255,.55); background: rgba(20,14,10,.18); color: #fff;
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s ease, background .2s ease;
}
.hero:hover .hero__nav, .hero__nav:focus-visible{ opacity: 1; }
.hero__nav:hover{ background: rgba(20,14,10,.4); }
.hero__nav svg{ width: 18px; height: 18px; }
.hero__nav--prev{ left: 22px; }
.hero__nav--next{ right: 22px; }

.hero__dots{
  position: absolute; z-index: 3; left: 50%; bottom: 48px; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.hero__dot{
  width: 34px; height: 3px; padding: 0; border: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255,255,255,.4); overflow: hidden; position: relative;
}
.hero__dot::after{
  content: ""; position: absolute; inset: 0; background: #fff;
  transform: scaleX(0); transform-origin: left;
}
.hero__dot.is-active::after{ animation: heroTimer var(--hero-interval, 6s) linear forwards; }
@keyframes heroTimer{ to{ transform: scaleX(1); } }
.hero.is-paused .hero__dot.is-active::after{ animation-play-state: paused; }

/* ---- Boton flotante de contacto ---- */
.wa-float{
  position: fixed; z-index: 40; right: 26px; bottom: 26px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: rgba(250,250,250,.92); color: #555; text-decoration: none;
  font-family: 'Jost', sans-serif; font-size: 13px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  transition: transform .2s ease;
}
.wa-float:hover{ transform: translateY(-2px); }
.wa-float svg{ width: 28px; height: 28px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: #25d366; color: #fff; }

@media (max-width: 720px){
  .hero{ min-height: 420px; }
  .hero__content{ top: calc(var(--first) * .30); gap: 26px; }
  .hero__btn{ font-size: 16px; padding: 14px 22px; }
  .hero__nav{ display: none; }
  .hero__dots{ bottom: 36px; }
  .wa-float{ right: 14px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce){
  .hero{ --hero-fade: .01s; }
  .hero__slide.is-active img{ animation: none; }
  .hero__dot.is-active::after{ animation: none; transform: scaleX(1); }
}
