/* ─── Hero Cinematográfico — Ken Burns Slideshow ─── */
.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-xl);
  transform: translateZ(0);
  will-change: transform;
}

/* ─── Slideshow container ─── */
.hero__slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateZ(0);
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: center center;
  will-change: transform;
}

/* ─── Seamless 20 s cycle — 4 slides × 5 s, 1.25 s crossfade ─── */
.hero__slide:nth-child(1)     { animation: hs-fade-1 20s ease-in-out infinite; }
.hero__slide:nth-child(1) img { animation: hs-zoom-1 20s linear     infinite; }

.hero__slide:nth-child(2)     { animation: hs-fade-2 20s ease-in-out infinite; }
.hero__slide:nth-child(2) img { animation: hs-zoom-2 20s linear     infinite; }

.hero__slide:nth-child(3)     { animation: hs-fade-3 20s ease-in-out infinite; }
.hero__slide:nth-child(3) img { animation: hs-zoom-3 20s linear     infinite; }

.hero__slide:nth-child(4)     { animation: hs-fade-4 20s ease-in-out infinite; }
.hero__slide:nth-child(4) img { animation: hs-zoom-4 20s linear     infinite; }

/* Opacity — each slide owns its 25 % window, with overlap crossfade */
@keyframes hs-fade-1 {
  0%   { opacity: 1; }
  20%  { opacity: 1; }
  25%  { opacity: 0; }
  95%  { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes hs-fade-2 {
  0%   { opacity: 0; }
  20%  { opacity: 0; }
  25%  { opacity: 1; }
  45%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes hs-fade-3 {
  0%   { opacity: 0; }
  45%  { opacity: 0; }
  50%  { opacity: 1; }
  70%  { opacity: 1; }
  75%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes hs-fade-4 {
  0%   { opacity: 0; }
  70%  { opacity: 0; }
  75%  { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Ken Burns — each slide pans/zooms in a different direction */
@keyframes hs-zoom-1 {
  0%   { transform: scale(1.00) translate( 0%,    0%   ); }
  100% { transform: scale(1.08) translate(-1.5%, -0.5% ); }
}
@keyframes hs-zoom-2 {
  0%   { transform: scale(1.07) translate( 1.5%,  0.5% ); }
  100% { transform: scale(1.00) translate( 0%,    1.5% ); }
}
@keyframes hs-zoom-3 {
  0%   { transform: scale(1.00) translate(-1%,    0.8% ); }
  100% { transform: scale(1.07) translate( 0.8%, -0.5% ); }
}
@keyframes hs-zoom-4 {
  0%   { transform: scale(1.06) translate( 0.5%, -1%   ); }
  100% { transform: scale(1.00) translate(-0.8%,  0.5% ); }
}

/* ─── Overlay ─── */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(5, 5, 5, 0.72) 0%,
      rgba(5, 5, 5, 0.18) 32%,
      transparent 62%),
    linear-gradient(to bottom,
      rgba(5, 5, 5, 0.28) 0%,
      transparent 24%);
}

/* ─── Content — buttons only, centered ─── */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-up var(--dur-slow) var(--ease-out) 0.6s forwards;
}

/* ─── Scroll indicator ─── */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: rgba(245, 245, 240, 0.5);
  opacity: 0;
  animation: hero-fade-up var(--dur-slow) var(--ease-out) 1.0s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(245, 245, 240, 0.5));
  animation: scroll-pulse 2s ease-in-out infinite;
}

.hero__scroll-indicator span {
  font-family: var(--font-sans);
  font-size: var(--size-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

@keyframes hero-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

@media (max-width: 768px) {
  .hero { padding-bottom: var(--space-lg); }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__scroll-indicator { display: none; }
}
