/* Fotostrecke: Zeitleiste mit Fotos und großer Bildansicht für Fotoalben-Seiten (README.md). */

/* Text on top of a photo (hero, photo viewer) stays light in both themes, so these do not follow the theme. */
.thomaschristl-fotostrecke,
.thomaschristl-fotostrecke-viewer {
  --thomaschristl-fotostrecke-on-photo: #eef7fc;
  --thomaschristl-fotostrecke-on-photo-accent: #9fcff4;
  --thomaschristl-fotostrecke-photo-overlay: rgba(13, 24, 33, 0.9);
}

.thomaschristl-fotostrecke {
  display: grid;
  gap: 0;
  color: var(--ink);
}

/* ---------- Hero ---------- */

.thomaschristl-fotostrecke-hero {
  position: relative;
  display: grid;
  min-height: min(88vh, 760px);
  overflow: hidden;
  isolation: isolate;
  color: var(--thomaschristl-fotostrecke-on-photo);
}

.thomaschristl-fotostrecke-hero-media,
.thomaschristl-fotostrecke-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.thomaschristl-fotostrecke-hero-media {
  z-index: -2;
}

.thomaschristl-fotostrecke-hero-media img {
  object-fit: cover;
  object-position: center 35%;
}

.thomaschristl-fotostrecke-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 100%, var(--thomaschristl-fotostrecke-photo-overlay) 0%, rgba(13, 24, 33, 0.55) 45%, rgba(13, 24, 33, 0.25) 100%),
    linear-gradient(180deg, rgba(13, 24, 33, 0.35) 0%, rgba(13, 24, 33, 0) 30%);
}

.thomaschristl-fotostrecke-hero-copy {
  align-self: end;
  justify-self: center;
  width: min(920px, 100% - 32px);
  padding: 120px 0 56px;
  text-align: center;
}

.thomaschristl-fotostrecke-eyebrow {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}

.thomaschristl-fotostrecke-hero .thomaschristl-fotostrecke-eyebrow {
  color: var(--thomaschristl-fotostrecke-on-photo-accent);
}

.thomaschristl-fotostrecke-hero h1 {
  margin: 0;
  font-family: "Playfair Display", "Newsreader", Georgia, serif;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.thomaschristl-fotostrecke-lead {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.6;
  color: var(--thomaschristl-fotostrecke-on-photo);
}

.thomaschristl-fotostrecke-scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thomaschristl-fotostrecke-on-photo-accent);
}

.thomaschristl-fotostrecke-scroll-hint svg {
  width: 22px;
  height: 22px;
}

/* ---------- Intro ---------- */

.thomaschristl-fotostrecke-intro {
  width: min(760px, 100% - 32px);
  margin: 0 auto;
  padding: 88px 0 40px;
  text-align: center;
}

.thomaschristl-fotostrecke-intro h2,
.thomaschristl-fotostrecke-farewell h2 {
  margin: 0 0 18px;
  font-family: "Playfair Display", "Newsreader", Georgia, serif;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1.15;
}

.thomaschristl-fotostrecke-intro p {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- Timeline ---------- */

.thomaschristl-fotostrecke-timeline {
  --thomaschristl-fotostrecke-progress: 1;
  position: relative;
  display: grid;
  gap: 72px;
  width: min(1180px, 100% - 32px);
  margin: 24px auto 0;
  padding: 24px 0 96px;
  list-style: none;
}

.thomaschristl-fotostrecke-timeline::before,
.thomaschristl-fotostrecke-timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 11px;
  width: 2px;
  border-radius: 2px;
}

.thomaschristl-fotostrecke-timeline::before {
  background: var(--line);
}

.thomaschristl-fotostrecke-timeline::after {
  background: linear-gradient(180deg, var(--sky), var(--navy));
  transform: scaleY(var(--thomaschristl-fotostrecke-progress));
  transform-origin: top;
}

.thomaschristl-fotostrecke-moment {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 44px;
}

.thomaschristl-fotostrecke-moment::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 6px var(--accent-soft-strong);
}

.thomaschristl-fotostrecke-moment-text h2 {
  margin: 4px 0 10px;
  font-family: "Playfair Display", "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.2;
}

.thomaschristl-fotostrecke-moment-text p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.thomaschristl-fotostrecke-moment-text .thomaschristl-fotostrecke-time {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--navy);
}

.thomaschristl-fotostrecke-moment-photos {
  display: grid;
  gap: 16px;
}

.thomaschristl-fotostrecke-moment--portrait .thomaschristl-fotostrecke-moment-photos {
  justify-items: start;
}

.thomaschristl-fotostrecke-moment--portrait .thomaschristl-fotostrecke-photo {
  width: min(380px, 100%);
}

/* ---------- Photo cards ---------- */

.thomaschristl-fotostrecke-photo {
  margin: 0;
}

.thomaschristl-fotostrecke-photo button {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.thomaschristl-fotostrecke-photo button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

.thomaschristl-fotostrecke-photo picture,
.thomaschristl-fotostrecke-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.thomaschristl-fotostrecke-photo picture {
  overflow: hidden;
}

/* ---------- Farewell ---------- */

.thomaschristl-fotostrecke-farewell {
  position: relative;
  overflow: hidden;
  padding: 104px 16px 112px;
  background: var(--tinted-section-bg);
  color: var(--tinted-section-text);
  text-align: center;
}

.thomaschristl-fotostrecke-farewell > * {
  position: relative;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

.thomaschristl-fotostrecke-farewell h2 {
  font-size: clamp(2.3rem, 6vw, 4rem);
}

.thomaschristl-fotostrecke-farewell p {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.75;
  color: var(--tinted-section-text-soft);
}

.thomaschristl-fotostrecke-farewell .thomaschristl-fotostrecke-eyebrow {
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--navy);
}

.thomaschristl-fotostrecke-farewell .thomaschristl-fotostrecke-signature {
  margin-top: 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--navy);
}

.thomaschristl-fotostrecke-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 40px;
}

.thomaschristl-fotostrecke-button {
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-solid);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.thomaschristl-fotostrecke-link {
  align-self: center;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.thomaschristl-fotostrecke-button:focus-visible,
.thomaschristl-fotostrecke-link:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

/* ---------- Photo viewer ---------- */

.thomaschristl-fotostrecke-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--thomaschristl-fotostrecke-on-photo);
  cursor: zoom-out;
}

.thomaschristl-fotostrecke-viewer::backdrop {
  background: rgba(13, 24, 33, 0.94);
}

.thomaschristl-fotostrecke-viewer-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 64px 16px 24px;
}

.thomaschristl-fotostrecke-viewer-figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0;
  max-width: 100%;
}

.thomaschristl-fotostrecke-viewer-image {
  max-width: min(1400px, 100%);
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.thomaschristl-fotostrecke-viewer-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.thomaschristl-fotostrecke-viewer-count {
  color: var(--thomaschristl-fotostrecke-on-photo-accent);
}

.thomaschristl-fotostrecke-viewer-nav,
.thomaschristl-fotostrecke-viewer-close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(238, 247, 252, 0.35);
  border-radius: 50%;
  background: rgba(15, 27, 37, 0.7);
  color: var(--thomaschristl-fotostrecke-on-photo);
  font-size: 1.4rem;
  cursor: pointer;
}

.thomaschristl-fotostrecke-viewer-nav:focus-visible,
.thomaschristl-fotostrecke-viewer-close:focus-visible {
  outline: 3px solid var(--thomaschristl-fotostrecke-on-photo-accent);
  outline-offset: 3px;
}

.thomaschristl-fotostrecke-viewer-close {
  top: 12px;
  right: 12px;
}

.thomaschristl-fotostrecke-viewer-prev,
.thomaschristl-fotostrecke-viewer-next {
  bottom: 18px;
}

.thomaschristl-fotostrecke-viewer-prev {
  left: 12px;
}

.thomaschristl-fotostrecke-viewer-next {
  right: 12px;
}

/* ---------- Larger screens ---------- */

@media (min-width: 768px) {
  .thomaschristl-fotostrecke-moment-photos--pair,
  .thomaschristl-fotostrecke-moment-photos--trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thomaschristl-fotostrecke-moment-photos--trio .thomaschristl-fotostrecke-photo:first-child {
    grid-column: 1 / -1;
  }

  .thomaschristl-fotostrecke-viewer-prev,
  .thomaschristl-fotostrecke-viewer-next {
    top: 50%;
    bottom: auto;
    margin-top: -24px;
  }

  .thomaschristl-fotostrecke-viewer-frame {
    padding: 64px 80px 32px;
  }
}

@media (min-width: 1024px) {
  .thomaschristl-fotostrecke-timeline {
    gap: 112px;
  }

  .thomaschristl-fotostrecke-timeline::before,
  .thomaschristl-fotostrecke-timeline::after {
    left: 50%;
    margin-left: -1px;
  }

  .thomaschristl-fotostrecke-moment {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 72px;
    padding-left: 0;
  }

  .thomaschristl-fotostrecke-moment::before {
    top: 50%;
    left: 50%;
    margin: -11px 0 0 -11px;
  }

  .thomaschristl-fotostrecke-moment-text {
    text-align: right;
  }

  .thomaschristl-fotostrecke-moment:nth-child(even) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .thomaschristl-fotostrecke-moment:nth-child(even) .thomaschristl-fotostrecke-moment-text {
    order: 2;
    text-align: left;
  }

  .thomaschristl-fotostrecke-moment--portrait .thomaschristl-fotostrecke-moment-photos {
    justify-items: center;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .thomaschristl-fotostrecke-hero-media img {
    animation: thomaschristl-fotostrecke-ken-burns 22s ease-out both;
  }

  .thomaschristl-fotostrecke-hero-copy {
    animation: thomaschristl-fotostrecke-rise 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }

  .thomaschristl-fotostrecke-scroll-hint svg {
    animation: thomaschristl-fotostrecke-bob 2.4s ease-in-out infinite;
  }

  .thomaschristl-fotostrecke--animate .thomaschristl-fotostrecke-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .thomaschristl-fotostrecke--animate .thomaschristl-fotostrecke-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .thomaschristl-fotostrecke--animate .thomaschristl-fotostrecke-moment-photos.thomaschristl-fotostrecke-reveal {
    transition-delay: 0.12s;
  }

  .thomaschristl-fotostrecke-photo img {
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .thomaschristl-fotostrecke-photo button {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }

  .thomaschristl-fotostrecke-moment::before {
    transition: transform 0.5s ease;
  }

  .thomaschristl-fotostrecke-moment:has(.is-visible)::before {
    transform: scale(1.15);
  }

  .thomaschristl-fotostrecke-button {
    transition: transform 0.25s ease;
  }

  .thomaschristl-fotostrecke-viewer[open] .thomaschristl-fotostrecke-viewer-image {
    animation: thomaschristl-fotostrecke-fade-in 0.35s ease both;
  }

  @media (hover: hover) and (pointer: fine) {
    .thomaschristl-fotostrecke-photo button:hover {
      transform: translateY(-6px) rotate(-0.4deg);
    }

    .thomaschristl-fotostrecke-photo button:hover img {
      transform: scale(1.04);
    }

    .thomaschristl-fotostrecke-button:hover {
      transform: translateY(-2px);
    }
  }
}

@keyframes thomaschristl-fotostrecke-ken-burns {
  from {
    transform: scale(1.14) translateY(2%);
  }

  to {
    transform: scale(1) translateY(0);
  }
}

@keyframes thomaschristl-fotostrecke-rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes thomaschristl-fotostrecke-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

@keyframes thomaschristl-fotostrecke-fade-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
