/* =============================================================================
   FOTOS — Rahmen und Seitenverhaeltnisse fuer die gelieferten Bilder
   -----------------------------------------------------------------------------
   Ersetzt die Bildplatzhalter (`.ph`). Die Box verhaelt sich exakt wie der
   Platzhalter, damit beim Austausch nichts springt: gleiches Seitenverhaeltnis,
   gleiches Zuschneiden (`object-fit: cover`), gleicher Radius.

   Verwendung:
     <img class="foto foto--r32" src="assets/images/fotos/…-700.jpg"
          srcset="assets/images/fotos/…-700.jpg 700w, assets/images/fotos/…-1400.jpg 1400w"
          sizes="(max-width: 760px) 92vw, 600px"
          alt="…" width="1400" height="933" loading="lazy" decoding="async">
   ========================================================================== */

.foto {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background-color: var(--c-mint-light);
  border-radius: var(--r-lg);
}

/* Seitenverhaeltnisse — dieselben Raten wie bei den Platzhaltern */
.foto--r11  { aspect-ratio: 1 / 1; }
.foto--r32  { aspect-ratio: 3 / 2; }
.foto--r43  { aspect-ratio: 4 / 3; }
.foto--r34  { aspect-ratio: 3 / 4; }
.foto--r169 { aspect-ratio: 16 / 9; }
.foto--r167 { aspect-ratio: 16 / 7; }

/* Im Hero und im FAQ-Band liegt das Bild auf dunklem Grund. Dort soll kein
   heller Platzhalter-Rahmen stehen, sondern nur das Foto. */
.ed-hero__media > .foto,
.ed-band__frame > .foto {
  background-color: var(--c-green-ink);
}

/* Das FAQ-Band bewegt die Bildflaeche beim Scrollen (main.js setzt
   --band-shift). Muss auch fuer das echte Foto gelten, sonst steht das Band
   still, obwohl ein Foto drin ist. */
.ed-band__frame > .foto {
  position: absolute;
  inset: calc(var(--s-9) * -1) 0;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: 0;
  transform: translate3d(0, var(--band-shift, 0px), 0);
  will-change: transform;
}

/* Bei reduzierter Bewegung steht auch das echte Bild still. */
@media (prefers-reduced-motion: reduce) {
  .ed-band__frame > .foto {
    transform: none;
    will-change: auto;
  }
}