/* Homepage only: portrait headline and collage share a bottom edge. */
@media (max-width: 599px) and (orientation: portrait) {
  .home-hero > div {
    grid-template-rows: auto auto auto auto;
    column-gap: 12px !important; row-gap: 12px !important;
    align-items: stretch;
  }
  .home-hero > div > div:first-child {
    display: grid; grid-area: 1 / 1 / 4 / -1;
    grid-template-columns: subgrid; grid-template-rows: subgrid;
    container-type: normal; min-width: 0;
  }
  .home-hero > div > div:first-child > .reveal:nth-child(1) { grid-area: 1 / 1 / 2 / -1; align-self: start; min-width: 0; }
  .home-hero > div > div:first-child > .reveal:nth-child(2) { grid-area: 2 / 1; min-width: 0; }
  .home-hero > div > div:first-child > .reveal:nth-child(3) { grid-area: 3 / 1 / 4 / -1; min-width: 0; }
  .home-hero > div > div:nth-child(2) { grid-area: 2 / 2 / 3 / 3; padding-top: 0; align-self: stretch; }
  .home-hero > div > div:nth-child(3) { grid-area: 4 / 1 / 5 / -1; }
  :root body :is(.home-hero,#wie-ben-ik,#specialismen,.contact-page-content).home-hero h1.display,
  :root body :is(.home-hero,#wie-ben-ik,#specialismen,.contact-page-content).home-hero h1.fitted-headline {
    margin-top: 0; height: auto; min-height: 0;
    font-size: clamp(22px, 6.2vw, 36px) !important;
    gap: 8px !important; justify-content: flex-start;
    line-height: 1.08 !important;
  }
  :root body .home-hero h1 > span { font-size: var(--headline-line-size, clamp(22px, 6.2vw, 36px)) !important; letter-spacing: -1px; }
  .home-hero > div > div:first-child > .reveal:nth-child(3) > div { margin-top: 0; max-width: none; }
  .home-hero > div > div:nth-child(3) .max-w-xl { max-width: none; }
  :root body :is(.home-hero,#wie-ben-ik,#specialismen,.contact-page-content).home-hero p.eyebrow {
    width: 100%; white-space: nowrap; font-size: clamp(10px, 2.7vw, 14px) !important;
    line-height: 1.3 !important; letter-spacing: 0 !important;
  }
  .home-hero > div > div:first-child > .reveal:nth-child(1) p { white-space: nowrap !important; }
  @supports not (grid-template-columns: subgrid) {
    .home-hero > div > div:first-child { display: contents; }
  }
  /* The headline determines the row height; the collage follows it. */
  .home-hero > div > div:nth-child(2) { contain: size; min-height: 0; }
  .home-hero .hero-collage { display: flex; justify-content: center; height: 100% !important; min-height: 0; }
  .home-hero .hero-collage img { height: 100% !important; width: auto !important; max-width: 100% !important; object-fit: contain; }
  .home-hero .home-collage-animation home-photo-collage { height: 100%; width: auto !important; max-width: 100%; aspect-ratio: 1472 / 1920; }
  :root body :is(.home-hero,#wie-ben-ik,#specialismen,.contact-page-content).home-hero p:not(.eyebrow) { font-size: 15px !important; }
}
