/* Landgoedgroen: de effen kleur van foto 5. */
:root {
  --landgoedgroen: #24392c;
  --wissel: 2s;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--landgoedgroen);
  overflow: hidden;
}

.verborgen {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.dias {
  position: fixed;
  inset: 0;
}

.dia {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--wissel) ease-in-out;
}

/* De nieuwe foto vervaagt bovenop de vorige, die er volledig onder blijft liggen; zo schemert er
   halverwege de wissel geen groen doorheen. */
.dia.actief {
  z-index: 2;
  opacity: 1;
}

.dia.vorige {
  z-index: 1;
  opacity: 1;
  transition: none;
}

/* Staand, vierkant-achtig of heel breed scherm: de hele foto tonen op landgoedgroen. Met cover
   viel het woordmerk dan buiten beeld (bij foto 1 staat het links, bij foto 2 hoog). */
@media (max-aspect-ratio: 4 / 3), (min-aspect-ratio: 2 / 1) {
  .dia {
    object-fit: contain;
  }
}

/* Staand scherm tot 3:4 (telefoons, ook een kleine iPhone met de Safari-balken in beeld): index.html
   levert dan via <picture> een staande uitsnede (9:16) met het woordmerk in het midden, en die mag
   het scherm vullen. Bovenaan uitgelijnd: bij 3:4 valt er dan alleen onderaan iets af, en het
   woordmerk staat bij elke foto in de bovenste 75% (bij foto 9 helemaal bovenaan). */
@media (max-aspect-ratio: 3 / 4) {
  .dia {
    object-fit: cover;
    object-position: 50% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dia {
    transition: none;
  }
}

.pauze {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 50%;
  background: rgb(36 57 44 / 0.8);
  color: #fff;
  cursor: pointer;
}

.pauze[hidden] {
  display: none;
}

.pauze:hover {
  background: var(--landgoedgroen);
}

/* Twee ringen, wit en groen, zodat de focus op lichte en donkere foto's even goed te zien is. */
.pauze:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--landgoedgroen);
}

.pauze svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icoon-speel,
.pauze.gepauzeerd .icoon-pauze {
  display: none;
}

.pauze.gepauzeerd .icoon-speel {
  display: block;
}
