/* ===========================
   HERO — LABRIEGO
   =========================== */

#hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background-color: #000000; /* cercano al tono de los bordes de la imagen */
  display: flex;
  align-items: center;
}

/* Spacer que ocupa el espacio del hero en el flujo de scroll */
#hero-spacer {
  height: 100vh;
  position: relative;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

/* Secciones que se deslizan encima del hero fijo */
#valor,
#interactiva,
#video,
#testimonios,
#contextos,
#cierre,
#footer {
  position: relative;
  z-index: 1;
}

/* ===========================
   LAYOUT DOS COLUMNAS
   =========================== */

.hero-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  gap: 0;
  position: relative;
  z-index: 2;
  height: 100%;

  /* Animación de entrada del conjunto */
  animation: heroLayoutIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;

  /* Preparado para la salida por scroll (JS modifica estas props) */
  will-change: opacity, transform;
}

@keyframes heroLayoutIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* ===========================
   TEXTO — LADO IZQUIERDO
   =========================== */

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: center;
  padding: 70px 32px 72px 0; /* respiro arriba/abajo, separación antes de imagen */
  max-width: 380px;
  margin-left: 70px;
}

.hero-tag {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--coral);
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-title {
  font-size: 62px;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--white);
  margin-bottom: 16px;
  animation: heroFadeIn 0.9s ease forwards;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 340px;
  animation: heroFadeIn 0.9s ease 0.15s both;
}

.hero-cta {
  background: var(--white);
  color: #0A0A0A;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 40px;
  letter-spacing: 0.5px;
  border-radius: 2px;
  display: inline-block;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  animation: heroFadeIn 0.9s ease 0.3s both;
}

.hero-cta:hover {
  background: var(--gray-200);
  transform: translateY(-2px);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   IMAGEN — LADO DERECHO
   =========================== */

.hero-image {
  margin-top: 70px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end; /* imagen pegada al borde inferior */
}

.hero-img {
  width: 100%;
  max-width: none;
  height: 91vh; /* ocupa casi todo el alto sin espacio vacío arriba */
  object-fit: contain;
  object-position: bottom center;
  display: block;
  animation: heroFadeIn 1s ease 0.2s both;

  /* Difumina bordes: más agresivo en top y laterales */
  mask-image: radial-gradient(
    ellipse 80% 90% at 55% 58%,
    black 30%,
    rgba(0, 0, 0, 0.45) 58%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 90% at 55% 58%,
    black 30%,
    rgba(0, 0, 0, 0.45) 58%,
    transparent 100%
  );
}

/* ===========================
   SPOTLIGHT OVERLAY
   — encima de imagen (z-index: 3)
   — mix-blend-mode: screen ilumina la foto
   =========================== */

.spotlight-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

.spotlight {
  position: absolute;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
  will-change: transform;
  filter: blur(55px);
  opacity: 0.65;
  transform-origin: top center;
}

/* Spotlight principal — blanco cálido, sobre la imagen */
.spotlight-left {
  width: 340px;
  height: 680px;
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.55) 0%, transparent 100%);
  top: -180px;
  left: 54%;
  animation: spotlightLeft 12s ease-in-out infinite;
}

/* Spotlight secundario — blanco neutro */
.spotlight-mid {
  width: 260px;
  height: 580px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.40) 0%, transparent 100%);
  top: -130px;
  left: 70%;
  animation: spotlightMid 15s ease-in-out 3s infinite;
}

/* Spotlight de toque — azul muy suave */
.spotlight-right {
  width: 300px;
  height: 620px;
  background: linear-gradient(180deg, rgba(200, 225, 255, 0.35) 0%, transparent 100%);
  top: -160px;
  right: 2%;
  left: auto;
  animation: spotlightRight 18s ease-in-out 5s infinite;
}

@keyframes spotlightLeft {
  0%   { transform: translate(-10%, 0%)  rotate(0deg);   }
  25%  { transform: translate(5%,  5%)   rotate(12deg);  }
  50%  { transform: translate(-20%, 8%)  rotate(-10deg); }
  75%  { transform: translate(8%,  3%)   rotate(6deg);   }
  100% { transform: translate(-10%, 0%)  rotate(0deg);   }
}

@keyframes spotlightMid {
  0%   { transform: translate(0%,  0%)  rotate(-15deg); }
  33%  { transform: translate(15%, 10%) rotate(0deg);   }
  66%  { transform: translate(-10%, 5%) rotate(18deg);  }
  100% { transform: translate(0%,  0%)  rotate(-15deg); }
}

@keyframes spotlightRight {
  0%   { transform: translate(0%,  0%)   rotate(8deg);   }
  33%  { transform: translate(-20%, -10%) rotate(-8deg); }
  66%  { transform: translate(8%,  15%)  rotate(20deg);  }
  100% { transform: translate(0%,  0%)   rotate(8deg);   }
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    align-items: flex-end;
    text-align: center;
    padding: 0 24px;
    gap: 0;
  }

  .hero-text {
    align-items: center;
    order: 2;
    padding: 20px 0 48px;
    margin-left: 0;
    max-width: 100%;
  }

  .hero-image {
    order: 1;
    justify-content: center;
    margin-top: 0;
  }

  .hero-img {
    height: auto;
    max-height: clamp(220px, 46vh, 380px);
    max-width: 280px;
    width: auto;
  }

  .hero-title {
    font-size: 44px;
    letter-spacing: -1.5px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .spotlight-left,
  .spotlight-mid,
  .spotlight-right {
    left: 50%;
    right: auto;
    transform-origin: top center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 34px;
    letter-spacing: -1px;
  }

  .hero-img {
    max-width: 220px;
    max-height: clamp(200px, 42vh, 340px);
  }
}

/* ===========================
   HERO CAROUSEL
   =========================== */

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ── Slides ── */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

/* ── Full-bleed photo slides ── */
.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.hero-slide.active .hero-slide-img {
  transform: scale(1.0);
}

/* Ponchos (slide 2) — anclar arriba para ver la cara */
[data-slide="2"] .hero-slide-img {
  object-position: top center;
}

/* ── Gradient overlays ── */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-slide-overlay--left {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.42) 40%,
    transparent 75%
  );
}

.hero-slide-overlay--top {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.38) 42%,
    transparent 70%
  );
}

.hero-slide-overlay--center {
  background: rgba(0, 0, 0, 0.34);
}

.hero-slide-overlay--bottom {
  background: linear-gradient(
    180deg,
    transparent 25%,
    rgba(0, 0, 0, 0.42) 58%,
    rgba(0, 0, 0, 0.78) 100%
  );
}

/* ── Slide text content ── */
.slide-content {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.slide-content--left {
  top: 50%;
  left: clamp(40px, 8vw, 140px);
  transform: translateY(-50%);
  align-items: flex-start;
  max-width: 440px;
}

.slide-content--top {
  top: clamp(96px, 14vh, 152px);
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
  max-width: 560px;
  width: 90%;
}

.slide-content--center-glass {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  text-align: center;
  padding: 36px 48px;
  border-radius: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 460px;
  width: 90%;
}

.slide-content--bottom-right {
  bottom: clamp(80px, 12vh, 140px);
  right: clamp(40px, 8vw, 140px);
  align-items: flex-end;
  text-align: right;
  max-width: 420px;
}

/* ── Slide text elements — fast exit, staggered entry ── */
.slide-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--coral);
  display: block;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hero-slide.active .slide-eyebrow {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.35s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}

.slide-title {
  font-size: clamp(36px, 5vw, 70px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: clamp(-1.5px, -0.25vw, -2px);
  color: var(--white);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hero-slide.active .slide-title {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease 0.5s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.slide-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hero-slide.active .slide-sub {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.65s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.65s;
}

.slide-cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--white);
  color: #0A0A0A;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.2s ease;
}

.hero-slide.active .slide-cta {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.8s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s, background 0.2s ease;
}

.hero-slide.active .slide-cta:hover {
  background: rgba(240, 240, 240, 1);
  transform: translateY(-2px);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0s;
}

/* ── Navigation dots ── */
.hero-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.3s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease;
}

.hero-dot.active {
  background: var(--white);
  width: 22px;
  border-radius: 4px;
}

/* ── Arrows ── */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-arrow--prev { left: 24px; }
.hero-arrow--next { right: 24px; }

/* ── Counter ── */
.hero-counter {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 10;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.hero-counter-current {
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
}

/* ── Progress bar ── */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--coral);
  z-index: 10;
  width: 0;
}

/* ── Carousel responsive ── */
@media (max-width: 768px) {
  .hero-arrow { display: none; }
  .hero-counter { display: none; }

  .slide-content--left {
    left: 24px;
    max-width: calc(100% - 48px);
  }

  .slide-content--bottom-right {
    bottom: 64px;
    right: 24px;
    max-width: calc(100% - 48px);
  }

  .slide-content--center-glass {
    padding: 28px 24px;
    width: calc(100% - 48px);
    max-width: 100%;
  }

  .slide-title {
    font-size: clamp(32px, 9vw, 46px);
  }

  .hero-nav {
    bottom: 20px;
  }
}
