html[data-yamaha-product][data-model-collection] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
  --yamaha-header: 106px;
  --hero-text: #fff;
  --scene-ratio: 2.4;
  --scene-min-width: 144cqw;
  --scene-bike-center: .49;
  --scene-bike-right: .67;
  --scene-center-x: 70.5cqw;
  --scene-center-y: 46cqh;
  display: grid;
  grid-template-columns: minmax(0, 29%) 1fr;
  min-height: calc(100svh - var(--yamaha-header));
  align-items: center;
  align-content: center;
  isolation: isolate;
  height: auto;
  gap: 0;
  padding: 0 var(--banner-pad);
  background: #9fa5ae;
}

html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"]::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgb(10 15 23 / .79), rgb(10 15 23 / .61) 26%, transparent 53%);
  content: "";
  pointer-events: none;
}

html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] > .hero-copy {
  z-index: 2;
  max-width: 440px;
  color: var(--hero-text);
  text-shadow: none;
}

html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] :is(h1, h1 span, p, .text-link) {
  color: var(--hero-text);
}

html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] .text-link {
  border-color: currentColor;
}

html[data-yamaha-product] #main .hero .yamaha-banner-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  grid-area: auto;
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  z-index: 0;
}

html[data-yamaha-product] #main .yamaha-banner-photo picture,
html[data-yamaha-product] #main .yamaha-banner-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

html[data-yamaha-product] #main .hero .yamaha-banner-photo img {
  object-fit: cover;
  max-height: none;
}

html[data-yamaha-product][data-model-collection="r6"] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
  --hero-text: #101b24;
  --wide-image-cap: 345cqh;
  --wide-bike-y: .55;
  background: #c8d8e5;
}

html[data-yamaha-product][data-model-collection="r6"] #main .hero[data-banner-layout="full-bleed"]::before {
  background: linear-gradient(90deg, rgb(231 240 247 / .89), rgb(231 240 247 / .73) 24%, transparent 48%);
}

html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .hero-copy > p:not(.hero-brand) {
  max-width: 31ch;
}

html[data-yamaha-product][data-model-collection="r3"] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
  --scene-bike-center: .464;
  --scene-bike-right: .66;
  --scene-center-x: 68cqw;
  --scene-center-y: 43cqh;
  --wide-image-cap: 388cqh;
  --wide-bike-y: .60;
}

html[data-yamaha-product][data-model-collection="r9"] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
  --scene-ratio: 1.5;
  --scene-min-width: 100cqw;
  --scene-bike-center: .42;
  --scene-bike-right: .67;
  --scene-center-x: 42cqw;
  --scene-center-y: 50cqh;
  --wide-image-cap: 267cqh;
  --wide-bike-y: .52;
}

html[data-yamaha-product] #main #quote-section .front-title {
  font-size: clamp(32px, 4.3vw, 70px);
  white-space: nowrap;
}

html[data-yamaha-product] #main #quote-section .front-title span {
  display: inline;
}

html[data-yamaha-product][data-model-collection="r1-r1m"] #main #quote-section .front-title {
  font-size: clamp(28px, 3.45vw, 58px);
}

html[data-yamaha-product] #main #quote-section .front-photo img {
  transform: scale(1.30);
}

html[data-yamaha-product][data-model-collection="r6"] #main #quote-section .front-photo img {
  transform: scale(1.36);
}

@media (min-width: 900px) and (aspect-ratio > 4/3) {
  html[data-yamaha-product] #main .hero .yamaha-banner-photo {
    container-type: size;
  }

  html[data-yamaha-product] #main .hero .yamaha-banner-photo img {
    --width-to-cover: calc(100cqh * var(--scene-ratio));
    --scene-width: max(var(--scene-min-width), var(--width-to-cover));
    --scene-height: calc(var(--scene-width) / var(--scene-ratio));
    --scene-left: calc(var(--scene-center-x) - var(--scene-width) * var(--scene-bike-center));
    --scene-right-limit: calc(97cqw - var(--scene-width) * var(--scene-bike-right));
    position: absolute;
    top: clamp(calc(100cqh - var(--scene-height)), calc(var(--scene-center-y) - var(--scene-height) / 2), 0px);
    left: clamp(calc(100cqw - var(--scene-width)), min(var(--scene-right-limit), var(--scene-left)), 0px);
    width: var(--scene-width);
    height: auto;
    max-width: none;
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
    grid-template-columns: minmax(0, 24.5%) 1fr;
    min-height: max(calc(100svh - var(--yamaha-header)), 37vw);
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .hero-copy > p:not(.hero-brand) {
    max-width: 27ch;
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .yamaha-banner-photo > picture {
    --photo-width: max(83cqw, 150cqh);
    --photo-height: calc(var(--photo-width) / 1.5);
    --photo-left: calc(62.5cqw - var(--photo-width) * .505);
    --photo-top: clamp(calc(100cqh - var(--photo-height)), calc(51cqh - var(--photo-height) * .453), 0px);
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .yamaha-banner-photo img {
    top: var(--photo-top);
    left: var(--photo-left);
    width: var(--photo-width);
  }

  /* Extend only the empty scenery to keep the motorcycle at its original proportions. */
  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .yamaha-banner-photo > picture::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(var(--photo-left) + var(--photo-width) * .17 + 12px);
    background: url("/assets/yamaha-review/r1m/r1-racetrack-banner.webp") 0 var(--photo-top) / calc(var(--photo-width) + var(--photo-left) / .17) var(--photo-height) no-repeat;
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    content: "";
  }

  html[data-yamaha-product][data-model-collection="r9"] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
    grid-template-columns: 1fr minmax(250px, 24%);
    min-height: max(calc(100svh - var(--yamaha-header)), 38vw);
  }

  html[data-yamaha-product][data-model-collection="r9"] #main .hero[data-banner-layout="full-bleed"]::before {
    background: linear-gradient(270deg, rgb(10 15 23 / .85), rgb(10 15 23 / .70) 22%, transparent 47%);
  }

  html[data-yamaha-product][data-model-collection="r9"] #main .hero[data-banner-layout="full-bleed"] > .hero-copy {
    grid-column: 2;
    justify-self: end;
  }

  html[data-yamaha-product][data-model-collection="r9"] #main .hero .yamaha-banner-photo > picture {
    --road-width: max(93cqw, 150cqh);
    --road-height: calc(var(--road-width) / 1.5);
    --road-left: min(0px, calc(42cqw - var(--road-width) * .42));
    --road-top: clamp(calc(100cqh - var(--road-height)), calc(50cqh - var(--road-height) * .52), 0px);
    --road-extra: max(0px, calc(100cqw - var(--road-left) - var(--road-width)));
  }

  html[data-yamaha-product][data-model-collection="r9"] #main .hero .yamaha-banner-photo img {
    top: var(--road-top);
    left: var(--road-left);
    width: var(--road-width);
  }

  /* Continue the scenery at right so the photo need not zoom to fill wide screens. */
  html[data-yamaha-product][data-model-collection="r9"] #main .hero .yamaha-banner-photo > picture::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(calc(var(--road-extra) + var(--road-width) * .21 + 12px), calc(var(--road-extra) * 9999));
    background: url("/assets/yamaha-review/r9/r9-banner-detail-desktop.jpg") right var(--road-top) / calc(var(--road-width) + var(--road-extra) / .21) var(--road-height) no-repeat;
    mask-image: linear-gradient(to right, transparent, #000 24px);
    content: "";
  }
}

@media (min-width: 900px) and (min-aspect-ratio: 17/10) {
  html[data-yamaha-product] #main .hero .yamaha-banner-photo img {
    --scene-width: max(100cqw, var(--width-to-cover), min(var(--scene-min-width), var(--wide-image-cap)));
    top: clamp(calc(100cqh - var(--scene-height)), calc(50cqh - var(--scene-height) * var(--wide-bike-y)), 0px);
  }
}

@media (max-width: 899px), (max-aspect-ratio: 4/3) {
  html[data-yamaha-product][data-model-collection] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100svh - var(--yamaha-header));
    align-content: start;
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"]::before {
    background: linear-gradient(180deg, rgb(10 15 23 / .78), rgb(10 15 23 / .62) 44%, transparent 62%);
  }

  html[data-yamaha-product][data-model-collection="r6"] #main .hero[data-banner-layout="full-bleed"]::before {
    background: linear-gradient(180deg, rgb(231 240 247 / .43), rgb(231 240 247 / .18) 31%, transparent 52%);
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] > .hero-copy {
    padding: clamp(24px, 5vh, 52px) 0 20px;
  }

  html[data-yamaha-product] #main .hero .yamaha-banner-photo img {
    object-position: center 48%;
  }

  html[data-yamaha-product] #main #quote-section .front-title {
    font-size: clamp(26px, 8.9vw, 50px);
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main #quote-section .front-title {
    font-size: clamp(22px, 7.1vw, 44px);
  }
}

@media (max-width: 899px) {
  html[data-yamaha-product][data-model-collection] #main :is(section.hero, #banner.hero)[data-banner-layout="full-bleed"] {
    --yamaha-header: 78px;
  }
}

@media (max-width: 380px) and (max-aspect-ratio: 9/20) {
  html[data-yamaha-product][data-model-collection="r9"] #main .hero .yamaha-banner-photo img {
    object-position: 62% 48%;
  }
}

@media (max-width: 450px) {
  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] > .hero-copy {
    padding: 24px 0 12px;
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] .hero-copy h1 {
    margin: 12px 0 14px;
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] .hero-copy h1 span {
    margin-top: 8px;
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] .hero-copy > p:not(.hero-brand) {
    margin: 0;
    line-height: 1.45;
  }

  html[data-yamaha-product] #main .hero[data-banner-layout="full-bleed"] .hero-actions {
    margin-top: 13px;
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero[data-banner-layout="full-bleed"] > .hero-copy {
    padding-top: 18px;
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .hero-actions {
    margin-top: 8px;
  }

  html[data-yamaha-product][data-model-collection="r1-r1m"] #main .hero .hero-actions .text-link {
    min-height: 35px;
  }
}
