.startseite-kopf {
  display: contents;
}

.startseite-kopf .startseite-titel,
.startseite-kopf .startseite-name,
.startseite-kopf .startseite-ueber,
.startseite-kopf .startseite-sprache,
.projektlauftext,
.raster__projekt-titel {
  font-size: clamp(0.8125rem, calc(0.53125rem + 0.46875vw), 0.875rem);
}

.projektlauftext > .projekt-jahr {
  display: block;
  margin-top: 16px;
}

@media (max-width: 960px), (max-height: 500px) and (pointer: coarse) {
  body {
    --raster-abstand: clamp(8px, 3vw, 16px);
    --overlay-abstand: clamp(12px, 4vw, 24px);
    --overlay-titelgroesse: clamp(2rem, min(12.82vw, 17dvh), 5.5rem);
    --overlay-textgroesse: clamp(0.5625rem, min(2.56vw, calc(0.5rem + 0.52vw)), 0.8125rem);
    --spaltenbreite: clamp(100px, 34vw, 210px);
    height: 100dvh;
  }

  .raster {
    --spaltenbreite-geoeffnet: var(--spaltenbreite);
    height: 100dvh;
    padding-top: calc(60px + env(safe-area-inset-top));
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .raster__spalte {
    height: 100%;
  }

  .raster__projekt-titel,
  .raster__pfeil,
  .overlay-scrollbar {
    display: none;
  }

  .overlay-pfeil-unten,
  .ueber-overlay__inhalt .ueber-startbild .overlay-pfeil-unten {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 10;
    visibility: hidden;
  }

  .overlay-pfeil-unten.mobile-pfeil-sichtbar,
  .ueber-overlay__inhalt .ueber-startbild .mobile-pfeil-sichtbar {
    visibility: visible;
  }

  .startseite-kopf {
    position: fixed;
    inset: 0 0 auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(5px, 2vw, 12px);
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(var(--raster-abstand), env(safe-area-inset-right)) 0 max(var(--raster-abstand), env(safe-area-inset-left));
    background: #000;
  }

  .startseite-kopf > * {
    position: static;
    transform: none;
    white-space: nowrap;
  }

  .startseite-kopf .startseite-titel,
  .startseite-kopf .startseite-name,
  .startseite-kopf .startseite-ueber,
  .startseite-kopf .startseite-sprache {
    font-size: clamp(0.625rem, calc(0.375rem + 1.75vw), 0.8125rem);
  }

  .startseite-ueber,
  .startseite-sprache a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .start-scrollbar {
    bottom: env(safe-area-inset-bottom);
    height: 28px;
  }

  .start-scrollbar__thumb {
    top: 11px;
  }

  .projekt-overlay,
  .ueber-overlay__fenster {
    width: 100%;
    height: 100dvh;
    padding: max(var(--overlay-abstand), env(safe-area-inset-top)) max(var(--overlay-abstand), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(var(--overlay-abstand), env(safe-area-inset-left));
    overscroll-behavior-y: contain;
  }

  .projekt-overlay__schliessen,
  .ueber-overlay__fenster > .projekt-overlay__schliessen {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    z-index: 11;
  }

  .projekt-overlay .overlay-grid {
    display: flex;
    flex-direction: column;
    gap: var(--overlay-abstand);
  }

  .projekt-overlay .overlay-grid,
  #masterabschluss-overlay-inhalt {
    align-items: stretch;
  }

  .overlay-grid .projekt-text,
  #masterabschluss-overlay-inhalt > .masterabschluss-titel,
  .ueber-overlay__inhalt .projekt-text {
    min-height: 0;
    margin: 0;
    padding: clamp(14px, 5vw, 32px) 0;
    font-size: var(--overlay-titelgroesse);
    overflow-wrap: anywhere;
  }

  .overlay-grid .prozess-titel {
    margin-top: clamp(16px, 6vw, 40px);
    font-size: var(--overlay-titelgroesse);
  }

  .projekt-overlay .overlay-grid > .projektlauftext {
    position: static;
    margin: 0 0 var(--overlay-abstand);
    font-size: var(--overlay-textgroesse);
    line-height: 1.5;
  }

  .projekt-overlay #heat-overlay-inhalt > .projektlauftext {
    transform: translateY(-12px);
  }

  .projekt-overlay .overlay-grid .projektlauftext-nachfolge,
  #schweben-overlay-inhalt > .motion-dreierreihe.projektlauftext-nachfolge,
  #semantische-overlay-inhalt .semantische-paar,
  #heat-overlay-inhalt > .heat-sugar-poster-reihe,
  #masterabschluss-overlay-inhalt > .masterabschluss-media {
    margin-top: 0;
  }

  .overlay-grid .motion-dreierreihe,
  #einzigartigkeit-overlay-inhalt > .overlay-bild-zoom.projektlauftext-nachfolge,
  #heat-overlay-inhalt > .heat-sugar-poster-reihe {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }

  #heat-overlay-inhalt .heat-sugar-poster-reihe .heat-sugar,
  #heat-overlay-inhalt .heat-sugar-poster-reihe .heat-poster {
    grid-column: auto;
    height: auto;
  }

  #heat-overlay-inhalt .heat-lightbox,
  #heat-overlay-inhalt .heat-truck,
  #semantische-overlay-inhalt .semantische-paar {
    height: auto;
  }

  .overlay-grid .prozess-flaechen {
    container-type: inline-size;
    width: 100%;
    min-height: 0;
    margin-bottom: 76px;
  }

  .overlay-grid .prozess-flaechen[id] .prozess-flaeche {
    height: min(240px, 56vw, calc(72cqw / var(--prozess-seitenverhaeltnis, 1))) !important;
    max-width: none !important;
  }

  .overlay-grid .prozess-nach-oben {
    top: calc(100% + 20px);
  }

  #schweben-overlay-inhalt .schweben-pfeil-nach-oben {
    top: auto;
  }

  .ueber-overlay__inhalt {
    display: flex;
    flex-direction: column;
    gap: var(--overlay-abstand);
    min-height: 0;
  }

  #ueber-mich-titel {
    top: auto;
  }

  .ueber-overlay__inhalt .ueber-beschreibung,
  .ueber-overlay__inhalt .ueber-sprache,
  .ueber-overlay__inhalt .ueber-programme,
  .ueber-overlay__inhalt .ueber-portrait--rechts {
    margin: 0;
    transform: none;
  }

  .ueber-overlay__inhalt .ueber-beschreibung,
  .ueber-overlay__inhalt .ueber-sprache,
  .ueber-overlay__inhalt .ueber-programme {
    font-size: clamp(0.6875rem, calc(0.5rem + 1.4vw), 0.875rem);
    line-height: 1.5;
  }

  .ueber-overlay__inhalt .ueber-portrait--rechts {
    height: auto;
  }

  .ueber-overlay__inhalt .ueber-portrait-ausschnitt {
    position: relative;
    width: 100%;
  }

  .ueber-overlay__inhalt .ueber-pfeil-nach-oben {
    position: relative;
    inset: auto;
    align-self: center;
    transform: none;
  }

  .ueber-overlay__fenster .mail {
    top: auto;
    overflow-wrap: anywhere;
  }
}
