:root {
  --mtr-black: #080808;
  --mtr-panel: #121212;
  --mtr-rule: #2a2a2a;
  --mtr-red: #ed1c24;
}

/* Restore source-site artwork that is broken or severely cropped in the
   currently published preview. Full artwork uses contain; no focal subject is
   cut off on desktop or mobile. */
.hero-image {
  aspect-ratio: 1284 / 1157 !important;
  background: var(--mtr-black) url("source-assets/038.jpg") center / contain no-repeat !important;
}

.hero-image > img,
.about-image > img {
  opacity: 0;
}

main > section.bg-ink:not(.source-showcase) img {
  content: url("source-assets/002.jpg");
  object-fit: contain !important;
  background: var(--mtr-black);
}

.about-image {
  aspect-ratio: 1 / 1 !important;
  background: var(--mtr-black) url("source-assets/042.jpg") center / contain no-repeat !important;
}

/* The source image is naturally 3:2, so the partnership panel can show it
   edge-to-edge without cutting off the rider, motorcycle, or sponsor marks. */
main > section.bg-ink:not(.source-showcase) img {
  aspect-ratio: 1284 / 849;
  width: 100%;
  height: auto;
}

article header img[alt="MOTO-TRON Racing"] {
  width: min(17rem, 72vw) !important;
  max-width: min(17rem, 72vw) !important;
  height: auto !important;
}

article header > div > img:last-child {
  content: url("source-assets/038.jpg");
  max-height: 34rem;
  object-fit: contain !important;
  object-position: center;
}

.story-image {
  content: url("source-assets/042.jpg");
  object-fit: contain !important;
  object-position: center;
  background: var(--mtr-black);
}

article > section.bg-ink:last-of-type img {
  content: url("source-assets/044.jpg");
  object-fit: contain !important;
  object-position: center;
  background: var(--mtr-black);
}

.source-showcase {
  border-block: 1px solid var(--mtr-rule);
  background: var(--mtr-black);
  color: #fff;
  padding: 5rem 1.5rem;
}

.source-showcase__inner {
  max-width: 1152px;
  margin: 0 auto;
}

.source-showcase__eyebrow {
  color: var(--mtr-red);
  font: 700 0.76rem/1.2 Inter, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.source-showcase h2 {
  max-width: 800px;
  margin: 0.75rem 0 1rem;
  font: 700 clamp(2.2rem, 5vw, 4.4rem)/0.95 "Barlow Condensed", sans-serif;
  text-transform: uppercase;
}

.source-showcase__intro {
  max-width: 720px;
  color: #c8c8c8;
  line-height: 1.7;
}

.source-showcase__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-top: 2.5rem;
}

.source-showcase__tile {
  position: relative;
  grid-column: span 4;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--mtr-rule);
  background: var(--mtr-panel);
}

.source-showcase__tile--wide {
  grid-column: span 8;
  aspect-ratio: 3 / 2;
}

.source-showcase__tile--portrait {
  grid-column: span 4;
  aspect-ratio: 4 / 5;
}

.source-showcase__tile--square {
  aspect-ratio: 1;
}

.source-showcase__tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--mtr-black);
  display: block;
  transition: transform 0.35s ease;
}

.source-showcase__tile:hover img {
  transform: scale(1.015);
}

.source-showcase__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.75rem 1.15rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  font: 600 1rem/1.2 "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-showcase__link {
  display: inline-flex;
  margin-top: 2rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.source-showcase__link:hover,
.source-showcase__link:focus-visible {
  background: #fff;
  color: var(--mtr-black);
}

@media (max-width: 760px) {
  .hero-image,
  .about-image {
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
  }

  .source-showcase {
    padding: 3.5rem 1rem;
  }

  .source-showcase__grid {
    grid-template-columns: 1fr;
  }

  .source-showcase__tile,
  .source-showcase__tile--wide,
  .source-showcase__tile--portrait,
  .source-showcase__tile--square {
    grid-column: auto;
    aspect-ratio: auto;
  }

  .source-showcase__tile img {
    width: 100%;
    height: auto;
    max-height: none;
  }
}
