/* Carrusel de la portada (public/js/hero-carousel.js). Se carga después de theme-pico.css. */

.hero.has-carousel .hero-bg {
  background: #12052e !important;
  transform: none;
}

/* El parlante dibujado de la portada sobra cuando hay imágenes: cada una ya trae su arte. */
.hero.has-carousel::after { display: none; }

.hero-slides { position: absolute; inset: 0; overflow: hidden; }

.hero-slide {
  position: absolute;
  inset: 0;
  background: #12052e center right / cover no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.1s ease;
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  animation: heroKen calc(var(--hero-interval, 7s) + 1.5s) ease-out both;
}

@keyframes heroKen {
  from { transform: scale(1.03); }
  to { transform: scale(1.1) translateX(-1.2%); }
}

/* Deja ver el arte a la derecha y oscurece solo donde va el texto. */
.hero.has-carousel .hero-overlay {
  background:
    radial-gradient(ellipse at 12% 45%, rgba(255, 45, 149, 0.28), transparent 50%),
    linear-gradient(90deg, rgba(18, 5, 46, 0.9) 0%, rgba(18, 5, 46, 0.7) 34%, rgba(18, 5, 46, 0.12) 62%, rgba(18, 5, 46, 0) 100%),
    linear-gradient(0deg, var(--bg) 1%, transparent 26%);
}

.hero h1.is-long { font-size: clamp(2.2rem, 4.8vw, 4.2rem); }

.hero-swap { animation: heroTextIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-subtitle.hero-swap { animation-delay: 0.08s; }

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-cta.hidden { display: none; }
.hero-cta {
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(18, 5, 46, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-cta:hover { border-color: var(--pk-yellow, #ffd400); color: var(--pk-yellow, #ffd400); }

/* Controles: anterior, puntos con barrita de tiempo, siguiente y pausa. */
.hero-carousel-ui {
  position: absolute;
  z-index: 3;
  right: max(16px, calc(50% - 600px));
  bottom: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(18, 5, 46, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-carousel-ui.hidden { display: none; }

.hc-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.hc-btn:hover { background: var(--pk-yellow, #ffd400); color: #12052e; }
.hc-btn:active { transform: scale(0.92); }
.hc-btn:focus-visible, .hc-dot:focus-visible { outline: 3px solid var(--pk-cyan, #00e0ff); outline-offset: 2px; }

.hc-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hc-btn .hc-play { fill: currentColor; stroke: none; display: none; }
.is-paused .hc-btn .hc-pause { display: none; }
.is-paused .hc-btn .hc-play { display: block; }

.hc-dots { display: flex; align-items: center; gap: 0.4rem; }

.hc-dot {
  position: relative;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.35s ease, background 0.2s;
}

.hc-dot:hover { background: rgba(255, 255, 255, 0.65); }
.hc-dot.is-active { width: 42px; background: rgba(255, 255, 255, 0.22); }

.hc-dot i {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--pk-yellow, #ffd400), var(--pk-fuchsia, #ff2d95));
}

.hc-dot.is-active i { animation: hcFill var(--hero-interval, 7s) linear forwards; }
.is-holding .hc-dot.is-active i { animation: none; transform: scaleX(1); }

@keyframes hcFill { to { transform: scaleX(1); } }

@media (max-width: 900px) {
  .hero-slide { background-position: 72% center; }
  .hero.has-carousel .hero-overlay {
    background:
      linear-gradient(180deg, rgba(18, 5, 46, 0.6) 0%, rgba(18, 5, 46, 0.72) 45%, rgba(18, 5, 46, 0.9) 100%),
      linear-gradient(0deg, var(--bg) 1%, transparent 20%);
  }
  .hero-carousel-ui { left: 50%; right: auto; transform: translateX(-50%); bottom: 1rem; }
  .hero.has-carousel .scroll-hint { display: none; }
}

@media (max-width: 620px) {
  .hc-btn[data-hc="prev"], .hc-btn[data-hc="next"] { display: none; }
  .hero.has-carousel .hero h1.is-long, .hero.has-carousel h1.is-long { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active { animation: none; transform: none; }
  .hero-slide { transition-duration: 0.01s; }
  .hero-swap { animation: none; }
}

/* Letra normal para el título grande (Apariencia → Letra del título): respeta mayúsculas y minúsculas. */
.hero.hero-font-clean h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
