/* ==========================================================================
   galerie.css · Ergänzungen für den echten Betrieb, die im Entwurf nicht vorkamen:
   ZIP-Knopf je Bereich, Abmelden, Hinweisseite, Sprungziele unter der Kopfzeile.
   Nur Tokens aus tokens.css, keine neuen Farben.
   ========================================================================== */

/* Sprungziele (Rückkehr aus der Lightbox, Bereiche-Links) nicht unter der Sticky-Kopfzeile */
.kapitel,
.kachel,
.box,
.fotobox-bereich {
  scroll-margin-top: 140px;
}

/* Kleiner Knopf, z. B. „Alle Fotos aus Trauung herunterladen“ (nur Brautpaar) */
.knopf--klein {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.kapitel__laden {
  margin-top: 16px;
}

/* Fotobox: Zähler und ZIP-Knopf in einer Zeile */
.fotobox-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.fotobox-zeile .fotobox-anzahl {
  margin-bottom: 0;
}

.fotobox-bereich + .fotobox-bereich {
  margin-top: var(--abstand-abschnitt);
}

.fotobox-bereich__titel {
  font-size: clamp(2rem, 7vw, 3.5rem);
  margin-bottom: 16px;
}

/* Abmelden im Fuß, unaufdringlich */
.fuss__abmelden {
  margin: 0;
}

.fuss__abmelden button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Hinweisseite (z. B. „Gerade laufen schon drei Downloads“) */
.hinweis-seite {
  padding-top: 56px;
}

.hinweis-seite h1 {
  font-size: clamp(3rem, 13vw, 6rem);
}

.hinweis-seite .einleitung {
  margin-top: 16px;
}

.hinweis-seite__stand {
  margin-top: 12px;
}

.hinweis-seite__aktion {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Alle Fotos herunterladen (seit 0.1.11, nur Brautpaar): Bereiche mit ihren Paketen als ruhige Liste,
   je Paket Inhalt und Größe links, der Knopf rechts (schmal: darunter). */
.laden-seite {
  padding-top: 40px;
}

.laden-seite__zurueck {
  font-size: 0.875rem;
}

.laden-seite__zurueck a {
  color: var(--farbe-text-leise);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.laden-seite h1 {
  margin-top: 12px;
  font-size: clamp(2.75rem, 11vw, 5.5rem);
}

.laden-seite .einleitung {
  margin-top: 16px;
  max-width: 62ch;
}

/* body trennt automatisch; hier keine Trennung mitten in „Fotos“ oder Dateigrößen */
.laden-seite {
  hyphens: manual;
}

.laden-seite__tipps {
  max-width: 62ch;
  margin-top: 24px;
  padding-left: 1.2em;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--farbe-text-leise);
}

.laden-seite__tipps li + li {
  margin-top: 6px;
}

.laden-bereich {
  margin-top: 56px;
}

.laden-bereich__kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--farbe-linie);
}

.laden-bereich__titel {
  font-family: var(--schrift-akzent);
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.1;
}

.laden-bereich__meta {
  font-size: 0.8125rem;
  color: var(--farbe-text-leise);
}

.laden-bereich__hinweis {
  max-width: 62ch;
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--farbe-text-leise);
}

.pakete {
  margin: 0;
  padding: 0;
  list-style: none;
}

.paket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--farbe-linie);
}

/* Knopf immer rechts, am Handy bricht stattdessen der Text um (gleiches Bild in jeder Zeile) */
.paket__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin: 0;
}

.paket__knopf {
  flex: none;
}

.paket__titel {
  font-weight: 500;
}

.paket__meta {
  font-size: 0.8125rem;
  color: var(--farbe-text-leise);
}

@media (min-width: 1024px) {
  .laden-seite {
    padding-top: 56px;
  }

  .laden-bereich__titel {
    font-size: 2.5rem;
  }
}

/* Lightbox: Wischen soll die Seite nicht seitlich verschieben */
.lb-mitte {
  touch-action: pan-y pinch-zoom;
}

/* ZIP-Downloads vorerst aus (Peter, 09.11.2026): Knopf bleibt sichtbar, ist aber ausgegraut
   und nicht klickbar (natives disabled). Daneben ein kurzer Hinweis. */
.knopf:disabled {
  opacity: 0.45;
  box-shadow: none;
  filter: grayscale(1);
  pointer-events: none;
}

.laden-spaeter {
  margin-left: 10px;
  font-size: 0.875rem;
  color: var(--farbe-text-leise);
}

/* Schwarzweiß-Fotos: weißer Rand rundum wie ein Abzug im Fotobuch (Peter, 09.11.2026).
   Der Innenabstand in Prozent bezieht sich immer auf die Breite, darum ist der Rand oben und
   unten genauso breit wie seitlich, und er wächst mit der Kachel. object-fit füllt nur die
   Fläche innerhalb des Randes. Kein Zoom beim Überfahren, sonst wandert das Foto in den Rand. */
.kachel--sw .kachel__link {
  background: var(--farbe-weiss);
  /* seit 0.1.14 wie ein Abzug (Peter, 11.11.2026): Weiß allein hob sich vom Cremeweiß kaum ab */
  box-shadow: 0 1px 2px rgba(64, 52, 40, 0.08), 0 8px 20px -12px rgba(64, 52, 40, 0.28);
}

/* Die feine Kante sitzt innen am Bild (der Link schneidet ab); border-radius: inherit, damit sie
   den runden Ecken folgt statt dort abgeschnitten zu werden. */
.kachel--sw .kachel__link img {
  padding: clamp(8px, 4%, 28px);
  background: var(--farbe-weiss);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(64, 52, 40, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .kachel--sw .kachel__link:hover img {
    transform: none;
  }
}

/* Fotonummer (Peter, 09.11.2026): klein unten links auf jedem Foto, aus dem Dateinamen
   (pkphoto-412.JPG → 412). So können Peter und das Brautpaar ein Foto per Nummer benennen.
   Bewusst leise: kleine Schrift, leicht transparent, weicher Schatten für helle Motive. */
.kachel__nr {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 1;
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: rgb(255 255 255 / 0.85);
  text-shadow: 0 0 3px rgb(0 0 0 / 0.5), 0 1px 1px rgb(0 0 0 / 0.3);
  pointer-events: none;
}

/* Bei Schwarzweiß mit weißem Rand: Nummer aufs Foto rücken, nicht in den Rand
   (sonst weiß auf weiß). Gleicher Abstand wie der Rand (4 % der Breite) plus Luft. */
.kachel--sw .kachel__nr {
  left: calc(clamp(8px, 4%, 28px) + 8px);
  bottom: calc(clamp(8px, 4%, 28px) + 7px);
  /* genau wie der Rand (4 % der Kachelbreite), wo Container-Einheiten gehen */
  left: calc(clamp(8px, 4cqw, 28px) + 8px);
  bottom: calc(clamp(8px, 4cqw, 28px) + 7px);
}

/* Fotostrecke seit 0.1.6: Rand genau 3,5 % der Kachelbreite. PKG_Raster rechnet das
   Seitenverhältnis der Kachel samt Rand vor (K_SW), mit clamp() ginge das nicht mehr auf. */
.fb-flaeche .kachel--sw .kachel__link img,
.ed .kachel--sw .kachel__link img {
  padding: 3.5%;
}

.fb-flaeche .kachel--sw .kachel__nr,
.ed .kachel--sw .kachel__nr {
  left: calc(3.5cqw + 8px);
  bottom: calc(3.5cqw + 7px);
}

/* Schmale Kacheln (Handy, kleine Rasterplätze): Der Herunterladen-Knopf ist dort fast so breit
   wie die Kachel und würde die Nummer verdecken, darum steht sie dort oben links.
   Alle Kacheln sind Rasterzellen, die Breite kommt vom Raster, darum ist die Container-Abfrage
   ohne Nebenwirkung. */
.kachel {
  container-type: inline-size;
}

@container (max-width: 219px) {
  .kachel__nr {
    top: 9px;
    bottom: auto;
  }

  .kachel--sw .kachel__nr {
    top: calc(clamp(8px, 4cqw, 28px) + 7px);
    bottom: auto;
  }

  .fb-flaeche .kachel--sw .kachel__nr,
  .ed .kachel--sw .kachel__nr {
    top: calc(3.5cqw + 7px);
    bottom: auto;
  }
}

/* Sehr schmale Kacheln (Mosaik am Handy): Herunterladen nur als Symbol, der Text bleibt für
   Screenreader. Sonst deckt der Knopf das halbe Foto ab. */
@container (max-width: 179px) {
  .laden.auf-bild {
    justify-content: center;
    min-width: 36px;
    padding: 6px;
  }

  .laden.auf-bild > span:not(.sr-only) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Großansicht und Diashow: Nummer neben dem Zähler, „12 / 1120 · Nr. 412“ */
.lb-nr:not(:empty)::before {
  content: "·";
  margin: 0 0.5em;
  opacity: 0.6;
}
