/* ============================================================
   HERO — Asymmetric split, copy left / platforms visual right
============================================================ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--space-20);
  overflow: hidden;
  /* Hard clip: nothing escapes the hero boundary */
  max-width: 100vw;
}

/* Background: warm gradient with orange blob */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 72% 20%, rgba(239, 77, 35, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(239, 77, 35, 0.04) 0%, transparent 60%),
    linear-gradient(160deg, #FDFCFA 0%, #F4F3F1 100%);
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* --- Grid layout: 58/42 split — copy gets more room --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: var(--space-12);
}

/* --- Blur reveal keyframe --- */
@keyframes blurReveal {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* --- Copy block (left) --- */
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Staggered blur reveal on each hero element */
.hero-copy .eyebrow-badge {
  animation: blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-headline {
  animation: blurReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.headline-accent {
  animation: blurReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  display: block;
}

.hero-tagline {
  animation: blurReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both;
}

.hero-subtext {
  animation: blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.62s both;
}

.hero-actions {
  animation: blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
}

.hero-trust {
  animation: blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.78s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy .eyebrow-badge,
  .hero-headline,
  .headline-accent,
  .hero-subtext,
  .hero-actions,
  .hero-trust {
    animation: none;
  }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7.5vw, 6rem);
  font-weight: var(--weight-extrabold);
  color: var(--color-ink);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-top: var(--space-2);
}

.headline-accent {
  color: var(--color-accent);
  display: block;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: var(--space-1);
}

.hero-subtext {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* --- Trust strip --- */
.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-strong);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-ink-80);
}

.trust-icon {
  flex-shrink: 0;
}

/* --- Visual block (right): 3D carousel --- */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Carousel: terremoto MIENTRAS está borroso, luego se enfoca limpio --- */
@keyframes carouselReveal {
  0%   { opacity: 0; filter: blur(20px); transform: translateX(0)    rotate(0deg);    }
  10%  { opacity: 1; filter: blur(18px); transform: translateX(-10px) rotate(-1.5deg); }
  20%  { filter: blur(16px); transform: translateX(9px)  rotate(1.2deg);  }
  30%  { filter: blur(13px); transform: translateX(-7px) rotate(-1deg);   }
  40%  { filter: blur(10px); transform: translateX(6px)  rotate(0.8deg);  }
  50%  { filter: blur(7px);  transform: translateX(-4px) rotate(-0.5deg); }
  60%  { filter: blur(4px);  transform: translateX(3px)  rotate(0.3deg);  }
  75%  { filter: blur(1px);  transform: translateX(-1px) rotate(-0.1deg); }
  100% { filter: blur(0px);  transform: translateX(0)    rotate(0deg);    }
}

.carousel-3d {
  animation: carouselReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-3d { animation: none; }
}

/* ---- 3D CAROUSEL ---- */
.carousel-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
  max-width: 380px;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: 100px;
  perspective: 700px;
  perspective-origin: 50% 50%;
}

/* Individual card */
.c-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 230px;
  margin-left: -115px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-xl);
  box-shadow: 4px 4px 0px 0px var(--color-ink);
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.55s cubic-bezier(0.32, 0.72, 0, 1),
    opacity   0.55s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.3s var(--ease-out);
  transform-origin: center center;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

/* Image-only card variant */
.c-card--img {
  padding: var(--space-2);
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 100px;
  margin-left: -100px;
}

.c-card--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(var(--radius-xl) - 4px);
  display: block;
}

/* ---- Card position classes (set by JS) ---- */

/* Center — facing forward, full size */
.c-card.pos-active {
  transform: translateZ(60px) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 4;
  box-shadow: 6px 6px 0px 0px var(--color-ink);
}

/* Left — rotated away to the left */
.c-card.pos-left {
  transform: translateX(-145px) translateZ(-30px) rotateY(42deg) scale(0.87);
  opacity: 0.72;
  z-index: 3;
}

/* Right — rotated away to the right */
.c-card.pos-right {
  transform: translateX(145px) translateZ(-30px) rotateY(-42deg) scale(0.87);
  opacity: 0.72;
  z-index: 3;
}

/* Hidden — behind, invisible */
.c-card.pos-hidden {
  transform: translateZ(-100px) scale(0.65);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---- Navigation dots ---- */
.carousel-dots {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-ink-30);
  border: none;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-spring);
}

.carousel-dot--active {
  background-color: var(--color-accent);
  transform: scale(1.4);
}

.carousel-dot:hover:not(.carousel-dot--active) {
  background-color: var(--color-ink-60);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }

  .hero-copy {
    align-items: center;
  }

  .hero-subtext {
    max-width: 56ch;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 90px;
    padding-bottom: var(--space-16);
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .c-card {
    width: 200px;
    margin-left: -100px;
  }

  .c-card.pos-left  { transform: translateX(-128px) translateZ(-30px) rotateY(42deg) scale(0.85); }
  .c-card.pos-right { transform: translateX(128px)  translateZ(-30px) rotateY(-42deg) scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .c-card {
    transition: opacity 0.2s linear;
  }
}
