/* All model banners use the Road Glide studio frame. Its desktop height is
   the photo column's 1252:941 frame plus the top and bottom insets. */
html[data-model-collection] {
  --banner-pad: clamp(24px, 5vw, 88px);
  --banner-gap: clamp(32px, 3.4vw, 64px);
  --banner-columns-width: calc(100vw - 2 * var(--banner-pad) - var(--banner-gap));
  --banner-photo-height: min(620px, 42vw, calc(var(--banner-columns-width) * 1.19 / 2.12 * 941 / 1252));
  --banner-height: calc(clamp(48px, 4.8vw, 88px) + max(23.4rem, var(--banner-photo-height)) + 130px);
}

html[data-model-collection] #main :is(.cvo-hero, section.hero, #banner.hero) {
  box-sizing: border-box;
  width: 100%;
  height: var(--banner-height);
  min-height: 0;
  max-height: none;
  grid-template-rows: minmax(0, 1fr);
}

html[data-model-collection] #main #banner.hero > .hero-inner {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

html[data-model-collection] #main [data-cvo-model="cvo-street-glide"] .cvo-hero-photo {
  height: 100%;
  max-height: 100%;
  width: 100%;
  scale: 1;
}

/* Preserve the original GS photograph's full-width crop as the banner grows. */
html[data-model-collection] #main .hero-photo[style*="--hero-image"] {
  align-self: center;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 2400 / 1597;
}

@media (max-width: 1000px) {
  html[data-model-collection] {
    --banner-photo-height: min(620px, 66vw, calc((100vw - 2 * var(--banner-pad)) * 941 / 1252));
    --banner-height: calc(34.375rem + var(--banner-photo-height));
  }
  html[data-model-collection] #main :is(.cvo-hero, section.hero, #banner.hero) {
    grid-template-rows: auto minmax(0, 1fr);
  }
  html[data-model-collection] #main .cvo-hero:has(> .cvo-section-nav) {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  html[data-model-collection] #main #banner.hero > .hero-inner {
    grid-template-rows: auto minmax(0, 1fr);
  }
  html[data-model-collection] #main :is(.cvo-hero-photo, #banner .hero-image) {
    align-self: center;
    min-height: 0;
    max-height: 100%;
  }
}

@media (max-width: 640px) {
  html[data-model-collection] {
    --banner-pad: 24px;
    --banner-height: calc(33.8125rem + var(--banner-photo-height));
  }
}
