/* The photograph fills the header. Keep V25's 156 / 128 / 112 px heights.
   At y=41% in the source, both headlights flank the open engine bay.
   object-position percentages apply to leftover space: add 9% of the
   header height to put that line at 50% of the displayed crop. */
@media screen and (min-width: 641px) {
  .header-hero > img {
    width: 100%;
    height: var(--cd25-hero-height);
    object-fit: cover;
    object-position: center calc(41% + var(--cd25-hero-height) * .09);
  }
  .header-hero {
    --cd329-ink: 248, 250, 254;
    --cd329-title-x: max(22px, calc((100% - 1236px) / 2));
    --cd329-label-end: min(calc(var(--cd329-title-x) + 350px), 40%);
  }
  html[data-cd29-theme=dark] .header-hero { --cd329-ink: 14, 23, 36; }
  .header-hero .overlay, html[data-cd29-theme=dark] .header-hero .overlay {
    background: linear-gradient(90deg,
      rgba(var(--cd329-ink), .48),
      rgba(var(--cd329-ink), .88) var(--cd329-title-x),
      rgba(var(--cd329-ink), .82) var(--cd329-label-end),
      rgba(var(--cd329-ink), .12) max(46%, calc(var(--cd329-label-end) + 68px)),
      transparent 63%);
  }
  .header-hero .brand {
    top: 0;
    left: var(--cd329-title-x);
    height: var(--cd25-hero-height);
    justify-content: center;
    max-width: min(350px, calc(40% - var(--cd329-title-x)));
  }
  .header-hero .brand .sub { font-size: 15px; }
}
@media screen and (min-width: 1761px) {
  /* Keep the lamps in frame on ultra-wide displays. Extend the workshop
     at each edge using the same image; leave the car undistorted. */
  .header-hero {
    --cd329-label-end: calc(var(--cd329-title-x) + 350px);
    --cd329-span: calc((100% - 1760px) / 2 + 174px);
  }
  .header-hero .brand { max-width: 350px; }
  .header-hero > img { width: 1760px; margin-inline: auto; }
  .header-hero::before, .header-hero::after {
    content: "";
    position: absolute;
    z-index: 1;
    pointer-events: none;
    top: 0;
    width: var(--cd329-span);
    height: var(--cd25-hero-height);
    background-image: url("/assets/header.jpg");
    background-size: 1011.5% 1173.333px;
    background-position: left -403.07px;
    filter: contrast(1.02) saturate(1.02) brightness(.98);
  }
  .header-hero.cd330-webp::before, .header-hero.cd330-webp::after {
    background-image: url("/assets/header-v330.webp");
  }
  .header-hero::before { left: 0; }
  .header-hero::after { right: 0; background-position: right -403.07px; }
  .header-hero .overlay { z-index: 2; }
  .header-hero .brand { z-index: 3; }
}
@media screen { .header-hero .brand .sub {text-wrap:balance;line-height:1.34} }
