/* Full-width photo layers; their cut and their height share one dimension for a true 45° edge. */
.brigade-slider--home .brigade-slider__images { inset: 0; width: auto; height: auto; container-type: size; pointer-events: none; }
/* Keep the text group above the full-width collage after moving it outside the content wrapper. */
.brigade-slider--home .brigade-slider__content { z-index: 2; pointer-events: none; }
.brigade-slider--home .brigade-slider__controls { pointer-events: auto; }
.brigade-slider--home .brigade-slider__image { transform: none; transition: none; will-change: auto; display: none; }
.brigade-slider--home .brigade-slider__image.is-active { display: block; }
.brigade-slider--home .brigade-slider__lightbox-trigger:not([hidden]) { pointer-events: auto; }
.hero-collage__layer { position: absolute; }
.hero-collage__surface { position: absolute; inset: 0; transform: translate(var(--hero-mx, 0px), var(--hero-my, 0px)); }
.brigade-slider--home .hero-collage__surface img { position: static; width: 100%; height: 100%; filter: none; }
.hero-collage__main { left: 56%; top: 7%; width: 28%; height: 53%; z-index: 4; }
.hero-collage__photo { height: var(--hero-photo-height); filter: drop-shadow(-7px -7px 0 #fff); }
.brigade-slider--home .hero-collage__photo .hero-collage__landscape { object-fit: cover; object-position: 50% 56%; }
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint { object-fit: cover; object-position: center 29%; width: calc(100% - clamp(22px, 4cqw, 64px)); }
.hero-collage__photo .hero-collage__surface { clip-path: polygon(var(--hero-photo-height) 0, 100% 0, calc(100% - var(--hero-photo-height)) 100%, 0 100%); }
/* The soft edge-to-edge fill gives the unchanged photo room inside its diagonal crop. */
.brigade-slider--home .hero-collage__photo .hero-collage__backdrop {
  position: absolute; inset: 0; object-fit: cover; object-position: var(--photo-backdrop-position, 50%) 50%;
  transform: scale(1.1); filter: blur(clamp(7px, 1.15cqw, 18px)) brightness(.83);
}
.brigade-slider--home .hero-collage__photo .hero-collage__subject {
  position: absolute; top: var(--photo-focus-y, 50%); left: var(--photo-focus-x, 50%);
  width: auto; height: auto; max-width: var(--photo-focus-width, 77%); max-height: 100%; object-fit: contain;
  transform: translate(-50%, -50%);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
.hero-collage__photo--side {
  --photo-focus-x: calc((37cqw + var(--hero-photo-height) * .5) / 2);
  --photo-focus-width: min(33cqw, 72%);
  --photo-backdrop-position: 32%;
}
.hero-collage__photo--bottom {
  --photo-focus-x: calc((29cqw + var(--hero-photo-height) * .5) / 2);
  --photo-focus-width: min(26cqw, 76%);
  --photo-focus-y: 46%;
  --photo-backdrop-position: 30%;
}
.hero-collage__photo--top { left: 36%; top: -24px; width: 35%; --hero-photo-height: min(31cqh, 30cqw); z-index: 1; }
.hero-collage__photo--side { left: 63%; top: 39%; width: calc(37% + var(--hero-photo-height) + 24px); --hero-photo-height: min(48cqh, 45cqw); z-index: 2; }
.hero-collage__photo--bottom { left: 71%; bottom: -24px; width: calc(29% + var(--hero-photo-height) + 24px); --hero-photo-height: min(29cqh, 39cqw); z-index: 3; }
@media (max-width: 767px), (max-aspect-ratio: 5/4) {
  .brigade-slider--home {
    --hero-gutter: 20px;
    --hero-heading-size: clamp(28px, 9.4vw, 60px);
    --hero-eyebrow-size: clamp(18px, 5.6vw, 28px);
    --hero-title-height: calc(var(--hero-heading-size) * 2.82 + 5px);
    --hero-copy-bottom: 110px;
    --hero-mobile-bottom-photo: min(32cqh, 30cqw);
    height: max(100svh, 650px); min-height: 650px; max-height: none;
  }
  .brigade-slider--home .brigade-slider__images {
    bottom: calc(var(--hero-copy-bottom) + var(--hero-title-height) + var(--hero-eyebrow-size) * 2.16 + 26px);
    height: auto;
  }
  .brigade-slider--home .brigade-slider__stage { top: auto; bottom: var(--hero-copy-bottom); left: var(--hero-gutter); right: 12px; transform: none; }
  .brigade-slider--home .brigade-slider__eyebrow { margin: 0 0 10px; font-size: var(--hero-eyebrow-size); line-height: 1.08; }
  .brigade-slider--home .brigade-slider__titles { height: var(--hero-title-height); }
  .brigade-slider--home .brigade-slider__title,
  .brigade-slider--home #hero-title { left: 4px; max-width: calc(100% - 4px); font-size: var(--hero-heading-size); line-height: .94; letter-spacing: .01em; }
  .brigade-slider--home .brigade-slider__controls { left: var(--hero-gutter); right: auto; bottom: 64px; width: calc(50% - var(--hero-gutter) + 18px); height: 36px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; pointer-events: none; }
  .brigade-slider--home .brigade-slider__controls button { width: 36px; height: 36px; pointer-events: auto; }
  .brigade-slider--home .brigade-slider__controls .brigade-slider__count { font-size: 13px; gap: 6px; }
  .brigade-slider--home .brigade-slider__controls .brigade-slider__count i { flex: 1; min-width: 0; }
  .brigade-slider--home > .manual-scroll-hint--solo { left: 50%; bottom: 8px; transform: translateX(-50%) scale(.56); transform-origin: bottom center; }
  .hero-collage__main { left: var(--hero-gutter); top: auto; bottom: 0; width: 54%; height: min(61cqh, 61cqw); }
  .brigade-slider--home .hero-collage__main img { object-position: left bottom; }
  .hero-collage__photo--top { left: -24px; top: -24px; width: min(86%, 570px); --hero-photo-height: min(59cqh, 67cqw); }
  .hero-collage__photo--top { --photo-focus-x: 44%; --photo-focus-y: 55%; }
  .hero-collage__photo--side { --photo-focus-x: calc((48cqw + var(--hero-photo-height) * .5) / 2); --photo-focus-width: min(46cqw, 80%); }
  .hero-collage__photo--bottom { --photo-focus-x: calc((37cqw + var(--hero-photo-height) * .5) / 2); --photo-focus-width: min(35cqw, 80%); }
  .hero-collage__photo--top .hero-collage__surface { clip-path: polygon(0 0, 100% 0, calc(100% - var(--hero-photo-height)) 100%, 0 100%); }
  .hero-collage__photo--side { left: 52%; top: auto; bottom: calc(var(--hero-mobile-bottom-photo) - 24px); width: calc(48% + var(--hero-photo-height) + 24px); --hero-photo-height: min(40cqh, 37cqw); }
  .hero-collage__photo--bottom { left: 63%; bottom: 0; width: calc(37% + var(--hero-photo-height) + 24px); --hero-photo-height: var(--hero-mobile-bottom-photo); }
}
@media (prefers-reduced-motion: reduce) { .hero-collage__surface { transform: none; } }

/* Use a single sharp photo for outpainted projects. The website's photo mask remains intact. */
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--sv-halle-transporter { object-position: center 63%; width: calc(100% - var(--hero-photo-height) * .73); }
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--koenig-schaufenster { object-position: center 51%; width: 100%; }

/* Focus the narrow masks on each project's actual work. */
.brigade-slider--home .hero-collage__landscape.hero-collage__detail--bandenwerbung,
.brigade-slider--home .hero-collage__landscape.hero-collage__detail--klausbruecke-glasdekor { object-position: center 49%; }
.brigade-slider--home .hero-collage__landscape.hero-collage__detail--gisa-glasdekor { object-position: center 46%; }
@media (max-width: 767px) {
  .brigade-slider--home .hero-collage__photo--top .hero-collage__landscape[src$="/bares-vollfolierung-quer.webp"] { object-position: 70% 56%; }
}

/* Shorten only König’s crop so the expanded facade can be shown at a wider scale. */
.hero-collage__photo--top:has(.hero-collage__outpaint--koenig-schaufenster) { --hero-photo-height: min(25cqh, 25cqw); }
@media (max-width: 767px), (max-aspect-ratio: 5/4) {
  .hero-collage__photo--top:has(.hero-collage__outpaint--koenig-schaufenster) { --hero-photo-height: min(49cqh, 53cqw); }
}
/* Keep the artwork sharp and place it inside the visible part of the diagonal crop. */
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--monsator { width: calc(100% - .68 * var(--hero-photo-height)); object-position: center 52%; }
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--junited-aussenwerbung { width: calc(100% - .68 * var(--hero-photo-height)); object-position: center 52%; }
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--bandenwerbung { width: calc(100% - .78 * var(--hero-photo-height)); object-position: center 54%; }
.brigade-slider--home .hero-collage__photo .hero-collage__outpaint--bergmannstrost-sichtschutz { width: calc(100% - .83 * var(--hero-photo-height)); object-position: center 53%; }
.brigade-slider--home .hero-collage__photo .hero-collage__detail--klausbruecke-glasdekor { width: calc(100% - .7 * var(--hero-photo-height)); object-position: 49% 63%; }
.hero-collage__surface:has(.hero-collage__detail--stiftung-website) { background-color: #dedddb; }
.hero-collage__surface:has(.hero-collage__detail--arztpraxis-website) { background-color: #e5e5e5; }
.brigade-slider--home .hero-collage__landscape:is(.hero-collage__detail--stiftung-website, .hero-collage__detail--arztpraxis-website) {
  position: absolute; left: var(--photo-focus-x, 50%); top: 50%;
  width: var(--photo-focus-width, 76%); height: 90%; object-fit: contain;
  transform: translate(-50%, -50%);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}
