/* ==========================================================================
   Hochzeitsalbum
   Palette aus den Bildern selbst: warmes Elfenbein, Salbei, Staubblau,
   gebranntes Gold, dazu ein tiefes warmes Braun als Schriftfarbe.
   ========================================================================== */

:root {
  --paper:        #faf6f0;
  --paper-deep:   #f2ece3;
  --card:         #ffffff;
  --ink:          #2c2621;
  --ink-soft:     #6f6459;
  --ink-faint:    #9a8e81;
  --line:         #e4dbcd;
  --line-soft:    #efe8dc;
  --sage:         #8b9a7d;
  --blue:         #8ba0b6;
  --gold:         #b2924f;
  --gold-soft:    #d8c49a;
  --dark:         #17120f;
  --shadow-sm:    0 1px 2px rgba(44, 38, 33, .05), 0 6px 16px rgba(44, 38, 33, .06);
  --shadow-md:    0 2px 6px rgba(44, 38, 33, .07), 0 18px 44px rgba(44, 38, 33, .12);
  --shadow-lg:    0 6px 18px rgba(44, 38, 33, .10), 0 40px 90px rgba(44, 38, 33, .18);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Hoefler Text", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --gap: 10px;
  --wrap: 1280px;
  --measure: 34rem;
}

* { box-sizing: border-box; }

/* gilt auch fuer Elemente mit eigenem display-Wert */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* feine Papierstruktur, rein aus Verlaeufen */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background:
    radial-gradient(1200px 600px at 12% -8%,  rgba(216, 196, 154, .16), transparent 62%),
    radial-gradient(900px 520px at 92% 4%,    rgba(139, 160, 182, .12), transparent 60%),
    radial-gradient(1000px 700px at 50% 108%, rgba(139, 154, 125, .12), transparent 62%);
}

body > * { position: relative; z-index: 1; }

img, video { display: block; max-width: 100%; }
a { color: inherit; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
@media (max-width: 640px) { .wrap { width: min(100% - 1.75rem, var(--wrap)); } }

.eyebrow {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.rule {
  width: 42px;
  height: 1px;
  background: var(--gold-soft);
  border: 0;
  margin: 1.4rem auto;
}

/* ---------------------------------------------------------------- Titel -- */

.cover {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(4.5rem, 9vh, 6rem);
  text-align: center;
}

.cover__type { max-width: 44rem; margin-inline: auto; padding-inline: 1.25rem; }

.cover__kicker {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
  text-indent: .38em;
}

.cover__names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0;
}

.cover__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  color: var(--ink-soft);
  margin: .7rem 0 0;
}

.cover__meta {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: .2rem 0 0;
}

/* das Titelbild sitzt wie ein aufgezogener Abzug auf dem Papier */
.plate {
  margin: clamp(1.8rem, 4vh, 2.8rem) auto 0;
  padding: clamp(.55rem, 1.1vw, .85rem);
  background: var(--card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
  max-width: min(100% - 2.5rem, 880px);
  line-height: 0;
}
.plate img {
  width: 100%;
  height: auto;
  max-height: 58svh;
  object-fit: contain;
  background: var(--paper-deep);
}

.cover__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(1.2rem, 3.5vh, 2.2rem);
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .66rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  padding: .4rem .6rem;
}
.cover__scroll svg { animation: nudge 2.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .cover__scroll svg { animation: none; } }

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

.intro {
  text-align: center;
  padding: clamp(3rem, 9vh, 6rem) 0 clamp(1rem, 3vh, 2rem);
}
.intro p {
  font-family: var(--serif);
  font-size: clamp(1.06rem, 2.4vw, 1.28rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 auto;
  text-wrap: pretty;
}
.intro p.intro__stats {
  margin: clamp(1.4rem, 3vh, 2.2rem) auto 0;
  font-family: var(--sans);
  font-size: .7rem;
  line-height: 1.6;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ----------------------------------------------------------- Kapitelleiste */

.chapternav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 240, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.chapternav.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(44, 38, 33, .05);
}
.chapternav__inner {
  display: flex;
  align-items: center;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: .55rem 0;
  scroll-padding-inline: 1rem;
}
.chapternav__inner::-webkit-scrollbar { display: none; }

.chapternav a {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  padding: .42rem .8rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.chapternav a:hover { background: var(--paper-deep); color: var(--ink); }
.chapternav a.is-active { background: var(--ink); color: var(--paper); }

.chapternav__tools {
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding-inline-start: .6rem;
  border-inline-start: 1px solid var(--line);
}

/* -------------------------------------------------------------- Kapitel -- */

.chapter { padding: clamp(3.5rem, 10vh, 7rem) 0 0; scroll-margin-top: 4rem; }

.chapter__head {
  text-align: center;
  max-width: var(--measure);
  margin: 0 auto clamp(1.8rem, 4vh, 2.8rem);
  padding-inline: 1rem;
}
.chapter__no {
  font-size: .64rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .85rem;
  text-indent: .3em;
}
.chapter__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 5.2vw, 2.75rem);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
.chapter__when {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: .7rem 0 0;
}
.chapter__story {
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 1.3rem 0 0;
  text-wrap: pretty;
}

.chapter__lead {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0 0 var(--gap);
  line-height: 0;
  cursor: zoom-in;
  background: var(--paper-deep);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.chapter__lead:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chapter__lead img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 42%;
}
@media (min-width: 900px) {
  .chapter__lead img { aspect-ratio: 16 / 7; }
}

/* Galerie: Zeilen im Blocksatz, damit kein Kachelraster entsteht */
.gallery { display: flex; flex-direction: column; gap: var(--gap); }
.grow { display: flex; gap: var(--gap); }

/* noch nicht aufgebaute Kapitel bekommen eine ruhige Flaeche statt Leere */
.gallery:empty {
  background: repeating-linear-gradient(
    115deg,
    var(--paper-deep) 0 180px,
    rgba(242, 236, 227, .45) 180px 360px);
  opacity: .55;
}

.tile {
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--paper-deep);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s ease, transform .5s ease;
}
.tile img.is-in { opacity: 1; }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.035); }
}
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.tile__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.tile__play span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(23, 18, 15, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .3);
}
.tile__play svg { fill: #fff; margin-inline-start: 3px; }
.tile__dur {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: .62rem;
  letter-spacing: .06em;
  color: #fff;
  background: rgba(23, 18, 15, .55);
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.6;
  pointer-events: none;
}


/* ----------------------------------------------------------- Kommentare -- */

.btn {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--card); border-color: var(--gold-soft); color: var(--ink); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #40372f; border-color: #40372f; color: var(--paper); }
.btn--ghost { border-color: transparent; }
.btn[disabled] { opacity: .45; cursor: default; }

/* -------------------------------------------------------------- Leuchte -- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #17120f;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: #f3ece2;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lb__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem clamp(.7rem, 2vw, 1.2rem);
  font-size: .74rem;
  letter-spacing: .1em;
  color: rgba(243, 236, 226, .72);
}
.lb__counter { font-variant-numeric: tabular-nums; }
.lb__chapter { text-transform: uppercase; letter-spacing: .2em; font-size: .66rem; color: rgba(243, 236, 226, .5); }
.lb__spacer { margin-inline-start: auto; }

.lb__icon {
  border: 0;
  background: rgba(255, 255, 255, .07);
  color: #f3ece2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .18s ease;
}
.lb__icon:hover { background: rgba(255, 255, 255, .16); }
.lb__icon.is-on { background: var(--gold); color: #1b1611; }
.lb__icon svg { fill: currentColor; }

.lb__stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
}
.lb__frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 clamp(.4rem, 4vw, 3.6rem);
  touch-action: pan-y;
}
.lb__frame img, .lb__frame video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.lb__frame img { transition: opacity .18s ease; }
.lb__frame img.is-loading { opacity: .25; }

.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #f3ece2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease, opacity .18s ease;
  z-index: 2;
}
.lb__nav:hover { background: rgba(255, 255, 255, .2); }
.lb__nav[disabled] { opacity: .2; cursor: default; }
.lb__nav--prev { left: clamp(.3rem, 1.4vw, 1rem); }
.lb__nav--next { right: clamp(.3rem, 1.4vw, 1rem); }
.lb__nav svg { fill: currentColor; }
@media (max-width: 720px) { .lb__nav { display: none; } }

.lb__caption {
  text-align: center;
  padding: .7rem 1.2rem clamp(.9rem, 3vh, 1.4rem);
  font-size: .76rem;
  color: rgba(243, 236, 226, .55);
  letter-spacing: .04em;
  min-height: 2.6rem;
}
.lb__hint { font-size: .66rem; color: rgba(243, 236, 226, .3); margin-top: .25rem; }

@media (hover: none) {
  .lb__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox, .tile img, .lb__frame img { transition: none; }
}

/* ---------------------------------------------------------------- Fusszeile */

.foot {
  text-align: center;
  padding: clamp(4rem, 11vh, 7rem) 0 clamp(2.5rem, 6vh, 4rem);
  color: var(--ink-faint);
  font-size: .76rem;
}
.foot__mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 .9rem;
}
.foot__links { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

.totop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
.totop.is-on { opacity: 1; visibility: visible; }
.totop svg { fill: currentColor; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  background: #fff6e8;
  border: 1px solid #eddcc0;
  border-radius: 3px;
  padding: .8rem 1rem;
  font-size: .82rem;
  color: #7a5f2c;
  margin: 1.5rem auto;
  max-width: var(--measure);
  line-height: 1.6;
}
