/* ==========================================================================
   Danke · Julia & Sergej
   Farbdramaturgie: Nacht (Intro) → Papier (Brief) → Tag → Goldene Stunde → Nacht
   ========================================================================== */

:root {
  --night: #0c0b10;
  --paper: #f6f0e6;
  --ink: #241e29;
  --ink-soft: #5d5262;
  --gold: #d6b17a;
  --gold-deep: #a07636;
  --gold-soft: #ecd6ad;
  --cream: #f7f1e7;
  --cream-dim: rgba(247, 241, 231, .74);

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
  --sans: 'Manrope', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(22px, 6vw, 72px);
  --sv-gap: calc(100lvh - 100svh); /* Höhe der mobilen Browserleiste */

  /* Text über dem Himmel – wird bei Nacht hell */
  --s-ink: #1f1a29;
  --halo: rgba(255, 249, 238, .6);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.scene-dark {
  --s-ink: #f7f1e7;
  --halo: rgba(6, 7, 20, .55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
  overflow-x: clip;
}

body {
  font-family: var(--serif);
  color: var(--cream);
  background: var(--night);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.script { font-family: var(--script); font-weight: 400; font-style: normal; letter-spacing: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
}

main { position: relative; z-index: 1; }

/* ==========================================================================
   Szene: Himmel, Sonne, Mond, Skyline, Sterne & Laternen
   ========================================================================== */

.scene {
  position: fixed;
  left: 0; top: 0;
  width: 100%;
  height: 100lvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --sky1: #a8c8e4; --sky2: #cfe0ec; --sky3: #f2ead9;
  --far: #b4c4d2; --mid: #8ea2b6; --near: #62758a;
  --water1: #9fb7c9; --water2: #6f8aa1;
  --sun: #fff6e0; --sun-o: 1;
  --lit: 0; --dusk: 0; --golden: 0;
}

.sky {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--sky1) 0%, var(--sky2) 50%, var(--sky3) 80%);
}

.sun {
  position: absolute; left: 0; top: 0;
  width: clamp(56px, 12vmin, 112px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fffaf0 0 36%, var(--sun) 60%, transparent 71%);
  box-shadow:
    0 0 50px 20px color-mix(in srgb, var(--sun) 40%, transparent),
    0 0 140px 70px color-mix(in srgb, var(--sun) 20%, transparent);
  opacity: var(--sun-o);
  will-change: transform;
}

.moon {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 74px); right: 13%;
  font-size: clamp(20px, 4.4vmin, 38px);
  width: 1.6em; height: 1.6em;
  border-radius: 50%;
  box-shadow: inset -.34em .16em 0 0 #f4ead2;
  transform: rotate(-18deg);
  filter: drop-shadow(0 0 12px rgba(244, 234, 210, .5));
  opacity: var(--lit);
}

.skyline {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: max(23svh, 15vw);
  overflow: visible;
}
@media (min-width: 900px) { .skyline { height: max(27vh, 15vw); } }

.skyline .far   { fill: var(--far); }
.skyline .mid   { fill: var(--mid); }
.skyline .near  { fill: var(--near); }
.skyline .crane { stroke: var(--mid); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.skyline .wire  { stroke: var(--near); }
.skyline .w1    { stop-color: var(--water1); }
.skyline .w2    { stop-color: var(--water2); }
.skyline .lit   { opacity: var(--lit); }
.skyline .dusk  { opacity: var(--dusk); }
.skyline .golden { opacity: var(--golden); }
.skyline .dayonly { opacity: calc(1 - var(--lit) * .85); }
.skyline .michel-lit { fill: #d8a457; fill-opacity: .55; }
.skyline .bulbs { fill: color-mix(in srgb, #ffd78a calc(var(--dusk) * 100%), #efe6d2); }
.skyline .blink   { animation: blink 2.6s steps(1, end) infinite; }
.skyline .twinkle { animation: twinkle 3.4s steps(3, end) infinite alternate; }
.skyline .shim    { animation: shim 2.8s steps(4, end) infinite alternate; }

@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: .12; } }
@keyframes twinkle { 0% { opacity: 1; } 100% { opacity: .45; } }
@keyframes shim    { 0% { opacity: 1; } 100% { opacity: .2; } }

.scene-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ==========================================================================
   Kopfzeile: Uhr & Sprachwahl
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 0;
  pointer-events: none;
}

.clock, .lang {
  background: rgba(16, 14, 24, .36);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: var(--cream);
}

.clock {
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .55em 1em;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .6s ease, transform .6s ease;
}
.clock.is-on { opacity: 1; transform: none; }
.clock-day { opacity: .8; white-space: nowrap; }
.clock-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); flex: none; }
.clock-time { font-weight: 600; font-size: .86rem; letter-spacing: .05em; }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  margin-left: auto;
  pointer-events: auto;
}
.lang button {
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .14em;
  padding: .55em .9em;
  border-radius: 999px;
  color: rgba(247, 241, 231, .72);
  transition: background .3s, color .3s;
}
.lang button[aria-pressed="true"] { background: rgba(247, 241, 231, .94); color: #1b1720; }
.lang button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ==========================================================================
   1 · Intro & „Danke"
   ========================================================================== */

.hero {
  position: relative;
  z-index: 1;
  height: 275lvh;
  background: var(--night);
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
  background: var(--night);
}

.hero-photo {
  position: absolute; inset: 0;
  transform-origin: 50% 45%;
  will-change: transform;
}
.hero-photo .photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 40% 58%; /* im Hochformat bleibt das Paar im Bild */
}

.hero-shade {
  position: absolute; inset: 0;
  /* oben dunkler für die Bildzeile im Himmel, unten leicht für den Übergang zum Brief */
  background:
    linear-gradient(to bottom, rgba(8, 7, 12, .74) 0%, rgba(8, 7, 12, .4) 22%, rgba(8, 7, 12, 0) 44%),
    linear-gradient(to top, rgba(8, 7, 12, .45) 0%, rgba(8, 7, 12, 0) 24%);
  opacity: 0;
}

.veil {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform-origin: 50% var(--veil-oy, 50%);
  will-change: transform, opacity;
}
.veil-fill { fill: var(--night); }
.veil-word {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.01em;
}
.veil-hole { fill: #000; }
.veil-line { fill: none; stroke: url(#gGold); stroke-width: 1.1; }

.dust {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.intro {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 9vw;
  text-align: center;
  pointer-events: none;
}

.rings-wrap {
  position: relative;
  width: clamp(104px, 30vw, 150px);
  margin-bottom: 2.2rem;
}
.rings { display: block; width: 100%; overflow: visible; }
.rings circle { fill: none; stroke: url(#gGold); stroke-width: 1.3; }

.spark {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff6e0;
  box-shadow: 0 0 12px 4px rgba(255, 220, 160, .9), 0 0 44px 16px rgba(255, 190, 110, .45);
  opacity: 0;
}

.intro-line {
  font-size: clamp(1.55rem, 6.6vw, 2.7rem);
  line-height: 1.22;
  font-weight: 400;
  color: var(--cream);
  max-width: 17ch;
}
.intro-line + .intro-line { margin-top: .9rem; }
.intro-line--em { font-style: italic; color: var(--gold-soft); }
.intro-line .w { display: inline-block; }

.hero-meta { position: absolute; inset: 0; pointer-events: none; }

.hero-names {
  position: absolute;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + 15svh);
  text-align: center;
  font-size: clamp(2.3rem, 10.5vw, 3.8rem);
  color: var(--gold-soft);
  line-height: 1.2;
}

.hero-date {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--sv-gap) + 17svh);
  text-align: center;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.scroll-cue {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--sv-gap) + 3.5svh + env(safe-area-inset-bottom));
  margin: 0 auto;
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  font-family: var(--sans);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(247, 241, 231, .6);
}
.scroll-cue i {
  display: block;
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, rgba(214, 177, 122, 0), var(--gold));
  transform-origin: top;
  animation: cue 2.4s cubic-bezier(.6, 0, .3, 1) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  55% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.hero-outro { position: absolute; inset: 0; pointer-events: none; will-change: transform, opacity; }

.hero-caption {
  position: absolute;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + 11svh); /* im Himmel, über den Köpfen */
  padding: 0 9vw;
  text-align: center;
  font-size: clamp(2rem, 8.6vw, 3.8rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.08;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .4);
  opacity: 0;
}

/* Fehlt ein Foto, verschwindet sein Polaroid – der Moment bleibt als Text */
.polaroid.is-missing { display: none; }

/* ==========================================================================
   2 · Der Brief
   ========================================================================== */

.letter {
  position: relative;
  z-index: 2;
  margin-top: -5svh;
  padding: 16svh var(--gutter) 26svh;
  background: var(--paper) var(--grain);
  color: var(--ink);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -30px 70px rgba(0, 0, 0, .35);
}
.letter::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 34svh;
  background: var(--paper) var(--grain);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .85) 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .85) 30%, transparent 100%);
  pointer-events: none;
}

.letter-inner { max-width: 35rem; margin: 0 auto; }

.letter .eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gold-deep);
  margin-bottom: 2.4rem;
}
.letter .eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }

.salutation {
  font-weight: 500;
  font-size: clamp(2.4rem, 10.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.012em;
  margin-bottom: 2.6rem;
}
.salutation span, .salutation em { display: block; }
.salutation em { color: var(--gold-deep); font-weight: 400; }

.letter-body p {
  font-size: clamp(1.36rem, 5.7vw, 1.9rem);
  line-height: 1.42;
  font-weight: 500;
  margin-bottom: 1.5em;
}
.letter-body .w { transition: none; }

.signoff {
  margin-top: 3.4rem;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--ink-soft);
}
.signature {
  display: block;
  font-size: clamp(3.2rem, 15vw, 5.4rem);
  line-height: 1.15;
  color: var(--gold-deep);
  margin-top: .1em;
  padding-right: .2em;
}

/* ==========================================================================
   3 · Unser Tag
   ========================================================================== */

.day {
  position: relative;
  padding: 30svh var(--gutter) 6svh;
  color: var(--s-ink);
  transition: color .9s ease;
}

.day-head { text-align: center; padding: 4svh 0 12svh; }
.day-head .eyebrow { opacity: .8; }
.day-title {
  font-size: clamp(4.2rem, 23vw, 11rem);
  font-weight: 400;
  font-style: italic;
  line-height: .92;
  letter-spacing: -.025em;
  margin: 1.2rem 0 1.2rem;
  text-shadow: 0 0 40px var(--halo);
}
.day-sub { font-size: clamp(1.2rem, 5vw, 1.5rem); font-style: italic; opacity: .85; }

.moment {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8svh 0 20svh;
  display: grid;
  justify-items: center;
  text-align: center;
}

.moment-time {
  position: relative;
  z-index: 0;
  font-size: clamp(4.8rem, 26vw, 10rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--s-ink);
  margin-bottom: -.3em;
  transition: -webkit-text-stroke-color .9s ease;
}
.moment-time--text {
  font-size: clamp(2.6rem, 13vw, 5.4rem);
  font-style: italic;
  margin-bottom: -.2em;
}

.polaroid {
  position: relative;
  left: var(--x, 0);
  z-index: 1;
  width: min(70vw, 360px);
  padding: 10px 10px 0;
  background: #fbf8f2 var(--grain);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .08),
    0 22px 44px -10px rgba(22, 16, 34, .38),
    0 50px 90px -30px rgba(22, 16, 34, .35);
  transform: rotate(var(--tilt, 0deg));
}
.polaroid::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -13px; left: 50%;
  width: 96px; height: 26px;
  margin-left: -48px;
  background: rgba(236, 224, 200, .78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
  transform: rotate(-4deg);
}
.polaroid--wide { width: min(88vw, 560px); }

/* Fotos im echten Format (2:3 hoch, 3:2 quer) – nichts wird abgeschnitten außer dem Rand für die Parallaxe */
.polaroid-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  padding: 0;
  overflow: hidden;
  background: #d9cbb5;
  cursor: zoom-in;
}
.polaroid--wide .polaroid-photo { aspect-ratio: 3 / 2; }
.polaroid-photo > .photo {
  position: absolute;
  left: 0; top: -5%;
  width: 100%; height: 110%;
  object-fit: cover;
}
.polaroid-photo::after {
  content: "";
  position: absolute;
  right: 8px; bottom: 8px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(16, 14, 22, .42) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.polaroid-photo:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.collage {
  display: grid;
  justify-items: center;
  gap: 2.2rem;
  width: 100%;
}
.collage .polaroid { width: min(62vw, 330px); }
.collage .polaroid--wide { width: min(84vw, 520px); }
.polaroid figcaption {
  font-size: clamp(1.8rem, 7.4vw, 2.3rem);
  color: #3a3140;
  text-align: center;
  line-height: 1.2;
  padding: .32em 0 .42em;
}

.moment-text { max-width: 30rem; margin-top: 2.8rem; text-shadow: 0 0 26px var(--halo), 0 0 2px var(--halo); }
.moment-text h3 {
  font-size: clamp(2.5rem, 11.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}
.moment-text p {
  font-size: clamp(1.24rem, 5.2vw, 1.55rem);
  line-height: 1.45;
  font-weight: 500;
}


@media (min-width: 900px) {
  .moment {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 6vw;
    text-align: left;
    padding: 10vh 0 24vh;
  }
  .moment-time { grid-column: 1 / -1; justify-self: center; }
  .polaroid { grid-column: 1; justify-self: end; left: 0; width: min(30vw, 380px); }
  .polaroid--wide { width: min(42vw, 580px); }
  .moment-text { grid-column: 2; margin-top: 0; }
  .moment--flip .polaroid { grid-column: 2; grid-row: 2; justify-self: start; }
  .moment--flip .moment-text { grid-column: 1; grid-row: 2; justify-self: end; text-align: right; }

  /* Mehrere Fotos: nebeneinander als Collage, Text darunter */
  .moment--multi { grid-template-columns: 1fr; text-align: center; }
  .moment--multi .collage { display: flex; justify-content: center; align-items: flex-start; gap: 3vw; }
  .moment--multi .polaroid { width: min(22vw, 300px); margin-top: var(--dy, 0); }
  .moment--multi .polaroid--wide { width: min(32vw, 440px); }
  .moment--multi .moment-text { grid-column: 1; justify-self: center; margin-top: 4.5rem; }
}

/* ==========================================================================
   4 · Ihr
   ========================================================================== */

.you {
  position: relative;
  padding: 18svh var(--gutter) 12svh;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
}

.you-big {
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 7.8rem);
  line-height: .98;
  letter-spacing: -.018em;
}
.you-big .line { display: block; overflow: hidden; padding: 0 .05em .1em; }
.you-big .line > span { display: inline-block; }
.you-big .line:last-child > span { font-style: italic; color: var(--gold-soft); }

.you-after {
  font-size: clamp(1.35rem, 5.8vw, 2.1rem);
  font-style: italic;
  line-height: 1.3;
  max-width: 22ch;
  margin: 2.2rem auto 0;
  color: var(--cream-dim);
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.8rem 1rem;
  max-width: 46rem;
  margin: 13svh auto 0;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.stats b {
  font-weight: 400;
  font-size: clamp(3.8rem, 17vw, 5.8rem);
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: lining-nums tabular-nums;
}
.stats .inf { font-weight: 300; }
.stats span {
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(247, 241, 231, .66);
}

.marquee {
  margin: 14svh calc(var(--gutter) * -1) 0;
  display: grid;
  font-size: clamp(3.8rem, 18vw, 10rem);
  line-height: 1.08;
  white-space: nowrap;
}
.marquee-row { display: flex; width: max-content; will-change: transform; }
.marquee-row span { padding-right: .3em; }
.marquee-row:first-child { font-style: italic; color: var(--gold-soft); }
.marquee-row--rev { color: transparent; -webkit-text-stroke: 1px rgba(247, 241, 231, .5); }

/* ==========================================================================
   5 · Album
   ========================================================================== */

.album {
  position: relative;
  padding: 10svh var(--gutter) 12svh;
  text-align: center;
  color: var(--cream);
}
.album .eyebrow { color: var(--gold); }
.album h2 {
  font-size: clamp(2.5rem, 10.5vw, 4.6rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  margin: 1rem 0 1rem;
}
.album p:not(.eyebrow) {
  font-size: 1.24rem;
  line-height: 1.4;
  max-width: 26ch;
  margin: 0 auto 2.4rem;
  color: var(--cream-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1.1em 1.9em;
  border-radius: 999px;
  border: 1px solid rgba(214, 177, 122, .7);
  background: rgba(214, 177, 122, .1);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.btn::after { content: "→"; letter-spacing: 0; font-size: 1.1em; }
.btn:hover { background: var(--gold); color: #17121c; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn.is-soon { border-style: dashed; background: transparent; color: var(--cream-dim); pointer-events: none; }
.btn.is-soon::after { content: none; }

/* Fotobox-Galerie: Abzüge zum Durchwischen, mit Datumsstempel wie bei alten Kameras */
.fb {
  --fb-w: min(76vw, 720px); /* Nachbarbilder schauen am Rand hervor → man sieht, dass man wischen kann */
  margin: .4rem calc(var(--gutter) * -1) 2.6rem;
}
.fb[hidden] { display: none; }
.fb-track {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 18px calc((100% - var(--fb-w)) / 2) 28px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fb-track::-webkit-scrollbar { display: none; }
.fb-track:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.fb-slide { flex: 0 0 var(--fb-w); scroll-snap-align: center; scroll-snap-stop: always; }
.fb-card {
  position: relative;
  padding: 8px 8px 30px;
  background: #fbf8f2 var(--grain);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .25);
  transform-origin: 50% 60%;
  will-change: transform;
}
/* Nachbarbilder abdunkeln statt durchsichtig machen (sonst scheinen die Sterne durch) */
.fb-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b0d1e;
  opacity: var(--dim, 0);
  pointer-events: none;
}
.fb-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  background: #2a2438;
  cursor: zoom-in;
}
.fb-photo img { width: 100%; height: 100%; object-fit: cover; }
.fb-photo:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fb-stamp {
  position: absolute;
  right: 18px;
  bottom: 40px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
  color: #ff9a3c;
  text-shadow: 0 0 6px rgba(255, 110, 30, .8), 0 0 1px rgba(255, 170, 90, .9);
  pointer-events: none;
}
.fb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}
.fb-btn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(214, 177, 122, .6);
  background: rgba(214, 177, 122, .08);
  color: var(--cream);
  transition: background .3s, opacity .3s;
}
.fb-btn svg, .lightbox-prev svg, .lightbox-next svg, .lightbox-dl svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.fb-btn:hover { background: rgba(214, 177, 122, .25); }
.fb-btn:disabled { opacity: .3; cursor: default; }
.fb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fb-count {
  min-width: 6.5em;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
  color: var(--cream-dim);
}
.fb-count b { color: var(--gold-soft); font-weight: 600; }
/* Regler zum schnellen Springen – goldene Linie mit Griff, darüber eine Blase mit Nummer und Uhrzeit */
.fb-scrub {
  position: relative;
  width: min(84vw, 460px);
  margin: 2.8rem auto 0; /* Platz für die Blase über dem Griff */
}
.fb-range {
  --p: 0%;
  display: block;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.fb-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold) var(--p), rgba(247, 241, 231, .18) var(--p));
}
.fb-range::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(247, 241, 231, .18); }
.fb-range::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--gold); }
.fb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  margin-top: -11.5px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 4px solid #12111a;
  box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(214, 177, 122, .55);
}
.fb-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 4px solid #12111a;
  box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(214, 177, 122, .55);
}
.fb-range:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.fb-bubble {
  position: absolute;
  bottom: calc(100% + 2px); /* über dem Griff */
  left: 13px;
  padding: .4em .75em;
  border-radius: 7px;
  background: var(--gold-soft);
  color: #17121c;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transform: translate(-50%, 6px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.fb-bubble::after {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--gold-soft);
}
.fb-scrub.is-active .fb-bubble { opacity: 1; transform: translate(-50%, -8px); }
.fb-scale {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .1rem;
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  color: rgba(247, 241, 231, .5);
}
.fb-scale span:nth-child(2) { text-transform: uppercase; letter-spacing: .16em; text-align: center; }
.fb-hint {
  max-width: 32ch;
  margin: 1rem auto 0;
  font-family: var(--sans);
  font-size: .7rem;
  line-height: 1.5;
  letter-spacing: .03em;
  color: rgba(247, 241, 231, .55);
}
@media (min-width: 900px) {
  .fb { --fb-w: min(50vw, 680px, 82svh); }
}

/* ==========================================================================
   6 · Finale
   ========================================================================== */

.finale {
  position: relative;
  min-height: 135svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14svh var(--gutter) 0;
  text-align: center;
  color: var(--cream);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.finale-inner { display: flex; flex-direction: column; align-items: center; margin: auto 0; }

.finale-line {
  font-size: clamp(2.1rem, 9.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.08;
  max-width: 14ch;
}
.finale-line--em { font-style: italic; color: var(--gold-soft); margin-top: .3em; }

.finale-sign { margin-top: 3.2rem; font-size: 1.3rem; font-style: italic; color: var(--cream-dim); }
.finale-sign .signature { color: var(--gold-soft); }

.married { margin-top: 4.2rem; }
.married .eyebrow { color: var(--gold); }
.married-count { display: flex; justify-content: center; gap: clamp(.8rem, 4vw, 1.6rem); margin-top: 1rem; }
.married-count span { display: flex; flex-direction: column; align-items: center; min-width: 2.6em; }
.married-count b {
  font-weight: 400;
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.married-count i {
  font-style: normal;
  font-family: var(--sans);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(247, 241, 231, .58);
  margin-top: .5rem;
}

.lantern-hint {
  margin-top: 4.4rem;
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  max-width: 30ch;
  text-align: left;
  font-family: var(--sans);
  font-size: .74rem;
  line-height: 1.55;
  letter-spacing: .04em;
  color: var(--cream-dim);
}
.lantern-icon {
  flex: none;
  width: 10px; height: 14px;
  border-radius: 3px 3px 5px 5px;
  background: linear-gradient(#ffe3a6, #ff9a46);
  box-shadow: 0 0 14px 4px rgba(255, 170, 80, .55);
  animation: float 2.8s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-4px); } }

.foot {
  width: 100%;
  margin-top: 12svh;
  padding: 0 0 calc(max(23svh, 15vw) + 4svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(247, 241, 231, .6);
}
.foot-rings { width: 44px; overflow: visible; }
.foot-rings circle { fill: none; stroke: url(#gGold); stroke-width: 2.4; }

/* ==========================================================================
   Ohne Animation (Skript nicht geladen oder „Bewegung reduzieren")
   ========================================================================== */

/* ==========================================================================
   Großansicht (Foto antippen)
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 64px) 10px calc(env(safe-area-inset-bottom) + 24px);
  background: rgba(8, 7, 12, .95);
  cursor: zoom-out;
  animation: lb-in .35s ease;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--cream);
  background: rgba(255, 255, 255, .12);
}
.lightbox-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Galerie-Modus: Vor/Zurück, Zähler und Download */
.lightbox { touch-action: pan-y pinch-zoom; }
.lightbox.is-set { padding-bottom: calc(env(safe-area-inset-bottom) + 76px); }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  color: var(--cream);
  background: rgba(16, 14, 22, .55);
  display: none;
}
.lightbox-prev { left: max(10px, env(safe-area-inset-left)); }
.lightbox-next { right: max(10px, env(safe-area-inset-right)); }
.lightbox.is-set .lightbox-prev,
.lightbox.is-set .lightbox-next { display: grid; place-items: center; }
.lightbox-bar {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: var(--cream-dim);
}
.lightbox.is-set .lightbox-bar { display: flex; }
.lightbox-dl {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .7em 1.2em;
  border-radius: 999px;
  border: 1px solid rgba(214, 177, 122, .6);
  color: var(--cream);
  text-decoration: none;
  letter-spacing: .08em;
}
.lightbox-prev:focus-visible, .lightbox-next:focus-visible, .lightbox-dl:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@keyframes lb-in { from { opacity: 0; } }

/* Startzustand vor dem Intro (das Skript blendet ein) */
.intro, .hero-names, .hero-date, .scroll-cue, .veil-line { opacity: 0; }
.veil-hole { fill-opacity: 0; }

.no-motion .intro,
.no-motion .dust,
.no-motion .hero-date,
.no-motion .scroll-cue { display: none; }
.no-motion .hero { height: 100lvh; }
.no-motion .letter { margin-top: 0; }
.no-motion .veil { opacity: 0; }
.no-motion .hero-shade,
.no-motion .hero-caption { opacity: 1; }
