/* Home — carrossel hero com crossfade + Ken Burns */

.hero-carousel--cinematic .carousel-item--brand {
  background: #fff;
}

.hero-slide-brand-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: #fff;
}

.hero-brand-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand-glow {
  position: absolute;
  inset: -20% -15%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(193, 0, 22, 0.16) 0%,
    rgba(193, 0, 22, 0.05) 42%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.55);
  pointer-events: none;
  z-index: 0;
}

.hero-brand-line {
  position: absolute;
  left: 50%;
  bottom: -0.65rem;
  width: 0;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #c10016 20%, #c10016 80%, transparent);
  opacity: 0;
  z-index: 2;
}

.hero-carousel--cinematic .carousel-item--brand .hero-slide-brand-img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(72vw, 760px);
  max-height: min(46vh, 300px);
  object-fit: contain;
  object-position: center center;
  transform: none;
  will-change: transform, opacity, filter;
}

.hero-carousel--cinematic .carousel-item--brand.active .hero-brand-glow {
  animation: heroBrandGlow 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hero-carousel--cinematic .carousel-item--brand.active .hero-slide-brand-img {
  animation: heroBrandEmerge 1.2s cubic-bezier(0.34, 1.15, 0.64, 1) 0.08s both;
}

.hero-carousel--cinematic .carousel-item--brand.active .hero-brand-line {
  animation: heroBrandLine 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both;
}

@keyframes heroBrandEmerge {
  0% {
    opacity: 0;
    filter: blur(16px);
    transform: scale(0.76) translateY(32px);
  }
  50% {
    opacity: 1;
    filter: blur(3px);
    transform: scale(1.05) translateY(-6px);
  }
  75% {
    filter: blur(0);
    transform: scale(0.98) translateY(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1) translateY(0);
  }
}

@keyframes heroBrandGlow {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroBrandLine {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: min(260px, 54vw);
    opacity: 1;
  }
}

.hero-carousel--cinematic .carousel-item--brand::after {
  display: none;
}

.hero-carousel--cinematic.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1.35s cubic-bezier(0.45, 0, 0.15, 1);
  transform: none !important;
}

.hero-carousel--cinematic.carousel-fade .carousel-item.active,
.hero-carousel--cinematic.carousel-fade .carousel-item-next.carousel-item-start,
.hero-carousel--cinematic.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  z-index: 1;
}

.hero-carousel--cinematic .carousel-item img {
  transform: scale(1);
}

/* Fotos — zoom suave (só transform, sem opacity — evita piscada com crossfade) */
.hero-carousel--cinematic .hero-slide-photo {
  transform: scale(1) translate3d(0, 0, 0);
}

.hero-carousel--cinematic .hero-slide-photo.hero-slide-photo--run {
  animation: heroPhotoMotion 5.5s ease-out forwards;
}

@keyframes heroPhotoMotion {
  0% {
    transform: scale(1.045) translate3d(0, 8px, 0);
  }
  22% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.065) translate3d(0, 0, 0);
  }
}

.hero-carousel-indicators {
  z-index: 4;
  margin-bottom: 1.1rem;
  gap: 0.35rem;
}

.hero-carousel-indicators [data-bs-target] {
  width: 2.25rem;
  height: 4px;
  border: none;
  border-radius: 999px;
  margin: 0;
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  opacity: 1;
  transition: width 0.35s ease, background-color 0.35s ease, transform 0.35s ease;
}

.hero-carousel-indicators [data-bs-target].active {
  width: 3rem;
  background-color: #fff;
  box-shadow: 0 0 0 1px rgba(193, 0, 22, 0.35);
  transform: scaleY(1.15);
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
  z-index: 4;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.hero .carousel-control-prev:hover,
.hero .carousel-control-next:hover {
  transform: translateY(-50%) scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel--cinematic .carousel-item--brand.active .hero-brand-glow,
  .hero-carousel--cinematic .carousel-item--brand.active .hero-brand-line,
  .hero-carousel--cinematic .carousel-item--brand.active .hero-slide-brand-img {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .hero-carousel--cinematic.carousel-fade .carousel-item {
    transition-duration: 0.01ms !important;
  }

  .hero-carousel--cinematic .hero-slide-photo.hero-slide-photo--run {
    animation: none;
  }

  .hero-carousel--cinematic .carousel-item.active:not(.carousel-item--brand) .hero-slide-photo {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-carousel--cinematic .carousel-item.active:not(.carousel-item--brand) img {
    animation: none;
    transform: scale(1);
  }
}

/* ===== HOME INTRO — animações de entrada ===== */
@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introFadeRight {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes introScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes broadcastPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.18);
  }
}

@keyframes valueIconPop {
  0% {
    transform: scale(0.6) translateY(6px);
    opacity: 0;
  }
  70% {
    transform: scale(1.08) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.home-intro-stack .stats-banner-row,
.home-intro-stack .stats-realtime,
.home-intro-stack .values-item,
.home-coverage .coverage-panel,
.home-coverage .coverage-locations li {
  opacity: 0;
}

.home-intro-stack.is-inview .stats-banner-row {
  animation: introFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-intro-stack.is-inview .stats-hero .stats-years {
  display: inline-block;
}

.home-intro-stack.is-inview .stats-realtime {
  animation: introScaleIn 0.65s 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-intro-stack.is-inview .stats-realtime i {
  animation: broadcastPulse 2.4s ease-in-out 0.9s infinite;
}

.home-intro-stack.is-inview .values-item:nth-child(1) { animation: introFadeUp 0.55s 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.home-intro-stack.is-inview .values-item:nth-child(2) { animation: introFadeUp 0.55s 0.46s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.home-intro-stack.is-inview .values-item:nth-child(3) { animation: introFadeUp 0.55s 0.54s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.home-intro-stack.is-inview .values-item:nth-child(4) { animation: introFadeUp 0.55s 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.home-intro-stack.is-inview .values-item:nth-child(5) { animation: introFadeUp 0.55s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

.home-intro-stack.is-inview .values-item i {
  animation: valueIconPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.home-intro-stack.is-inview .values-item:nth-child(1) i { animation-delay: 0.42s; }
.home-intro-stack.is-inview .values-item:nth-child(2) i { animation-delay: 0.5s; }
.home-intro-stack.is-inview .values-item:nth-child(3) i { animation-delay: 0.58s; }
.home-intro-stack.is-inview .values-item:nth-child(4) i { animation-delay: 0.66s; }
.home-intro-stack.is-inview .values-item:nth-child(5) i { animation-delay: 0.74s; }

.home-intro-stack .values-item {
  transition: transform 0.28s ease, background 0.28s ease;
}

.home-intro-stack .values-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.home-intro-stack .values-item i {
  transition: transform 0.28s ease;
}

.home-intro-stack .values-item:hover i {
  transform: scale(1.15);
}

.home-coverage.is-inview .coverage-panel {
  animation: introFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-coverage.is-inview .coverage-card--port .coverage-locations li:nth-child(1) { animation: introFadeRight 0.45s 0.2s ease both; }
.home-coverage.is-inview .coverage-card--port .coverage-locations li:nth-child(2) { animation: introFadeRight 0.45s 0.28s ease both; }
.home-coverage.is-inview .coverage-card--port .coverage-locations li:nth-child(3) { animation: introFadeRight 0.45s 0.36s ease both; }
.home-coverage.is-inview .coverage-card--port .coverage-locations li:nth-child(4) { animation: introFadeRight 0.45s 0.44s ease both; }
.home-coverage.is-inview .coverage-card--port .coverage-locations li:nth-child(5) { animation: introFadeRight 0.45s 0.52s ease both; }

.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(1) { animation: introFadeRight 0.45s 0.24s ease both; }
.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(2) { animation: introFadeRight 0.45s 0.32s ease both; }
.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(3) { animation: introFadeRight 0.45s 0.4s ease both; }
.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(4) { animation: introFadeRight 0.45s 0.48s ease both; }
.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(5) { animation: introFadeRight 0.45s 0.56s ease both; }
.home-coverage.is-inview .coverage-card--agency .coverage-locations li:nth-child(6) { animation: introFadeRight 0.45s 0.64s ease both; }

.home-coverage .coverage-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-coverage.is-inview .coverage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .home-intro-stack .stats-banner-row,
  .home-intro-stack .stats-realtime,
  .home-intro-stack .values-item,
  .home-coverage .coverage-panel,
  .home-coverage .coverage-locations li {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .home-intro-stack.is-inview .stats-realtime i {
    animation: none;
  }
}
