.hero {
  position: relative;
  width: 100%;
  margin: 0;
}

.hero__track {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 320px;
  max-height: min(78dvh, 42rem);
  background: #1a2332;
}

.hero__slide {
  position: absolute;
  inset: 0;
}

.hero__slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 42%;
  transform: translate3d(0, 0, 0);
  animation: hero-drift 22s var(--ease-drift) alternate infinite;
}

@keyframes hero-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, 0, 0) scale(1.06);
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--grad-hero-overlay);
  pointer-events: none;
}

.hero__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--c-text-inverse);
  padding: calc(var(--sp-6) + var(--safe-top)) calc(var(--sp-5) + var(--safe-right))
    calc(var(--sp-8) + var(--safe-bottom)) calc(var(--sp-5) + var(--safe-left));
}

.hero__content-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero__eyebrow {
  margin: 0 0 var(--sp-2);
  font-family: var(--ff-base);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  line-height: var(--lh-snug);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero__title {
  margin: 0 0 var(--sp-3);
  max-width: 14ch;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: 0.005em;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero__subtitle {
  margin: 0;
  max-width: 38ch;
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: var(--lh-snug);
  color: rgba(255, 255, 255, 0.62);
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  width: 100%;
}

.btn.btn--hero {
  position: relative;
  min-height: 44px;
  padding: 0.75rem 1.85rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  color: var(--c-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  transition:
    background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn.btn--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.btn.btn--hero:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  color: var(--c-text-inverse);
}

.btn.btn--hero-ghost {
  background: transparent;
  background-image: none;
  border-color: rgba(255, 255, 255, 0.42);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.btn.btn--hero-ghost::before {
  opacity: 0;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn.btn--hero {
    background: rgba(255, 255, 255, 0.88);
    color: var(--c-accent);
  }

  .btn.btn--hero-ghost {
    background: transparent;
    color: var(--c-text-inverse);
    border-color: rgba(255, 255, 255, 0.7);
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn.btn--hero:hover,
  .btn.btn--hero:focus-visible {
    background: rgba(var(--c-accent-rgb), 0.38);
    color: var(--c-text-inverse);
    border-color: rgba(255, 255, 255, 0.46);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .btn.btn--hero-ghost:hover,
  .btn.btn--hero-ghost:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    background-image: none;
    color: var(--c-text-inverse);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
  }
}

@media (hover: none) {
  .btn.btn--hero:active {
    background: rgba(var(--c-accent-rgb), 0.38);
    color: var(--c-text-inverse);
  }

  .btn.btn--hero-ghost:active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--c-text-inverse);
  }
}

@media (min-width: 768px) {
  .hero__track {
    aspect-ratio: 16 / 9;
    min-height: 360px;
    max-height: min(70dvh, 38rem);
  }

  .hero__img {
    object-position: center 48%;
  }

  .hero__subtitle {
    font-size: var(--fs-md);
  }
}

@media (max-width: 479px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 18rem;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .hero__track {
    max-height: 36rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__img {
    animation: none;
    transform: none;
  }

  .btn.btn--hero,
  .btn.btn--hero:hover,
  .btn.btn--hero-ghost,
  .btn.btn--hero-ghost:hover {
    transition: none;
    transform: none;
  }
}
