/* Category hero banner (data: assets/hero-slider.json) */

.hero.section {
  --hero-banner-bg: url("../assets/background/banner-bg.webp");
  background-color: var(--white);
  background-image: var(--hero-banner-bg);
  background-repeat: repeat;
  background-position: center top;
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  .hero.section {
    background-attachment: scroll;
  }
}

.hero-banner {
  position: relative;
  z-index: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(12px, 2.5vw, 28px);
  align-items: stretch;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-banner .hero-copy {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 100%;
  }

  .hero-banner .hero-copy-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-4);
    min-width: 0;
    min-height: 0;
  }

  .hero-banner .hero-cta {
    padding-top: var(--space-5);
    flex-shrink: 0;
  }
}

.hero-banner .hero-copy-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.hero-banner .hero-copy .eyebrow {
  margin-bottom: calc(var(--space-3) / 2);
}

.hero-banner .hero-copy .hero-text {
  min-height: 5.25em;
  margin: calc(var(--space-4) / -2) 0 0;
}

.hero-banner-visual {
  position: relative;
  min-width: 0;
  align-self: center;
}

.hero-banner-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: min(48vh, 460px);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.hero-banner-media.is-dragging {
  cursor: grabbing;
}

.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: none;
  pointer-events: none;
}

.hero-banner-img.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 1;
}

.hero-banner-controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(8px, 2vw, 16px);
  pointer-events: none;
}

.hero-banner-btn {
  pointer-events: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--navy) 12%, #fff);
  border-radius: 0;
  background: rgb(255 255 255 / 0.92);
  color: var(--navy);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.06);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.hero-banner-btn:hover,
.hero-banner-btn:focus-visible {
  border-color: var(--navy);
  color: var(--red);
  background: #fff;
}

.hero-banner-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  .hero-banner {
    display: contents;
  }

  .hero-banner-visual {
    grid-area: visual;
    padding-inline: clamp(20px, 4vw, 40px);
    padding-bottom: var(--space-4);
  }

  .hero-banner-media {
    max-height: none;
    aspect-ratio: 4 / 3;
  }

}
