/* ===== Design-Tokens ===== */
:root {
  --ivory: #faf7f2;
  --ink: #2b2620;
  --wine: #7c2d3e;
  --sage: #6e7c6b;
  --gold: #c7a75b;
  --white: #ffffff;
  --line: rgba(43, 38, 32, 0.12);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Work Sans", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* Stellt sicher, dass Elemente mit dem hidden-Attribut IMMER ausgeblendet
   sind, auch wenn eine spätere CSS-Regel (z.B. display:flex bei .lightbox)
   sonst gleich hohe Spezifität hätte und das UA-Standardverhalten überschreiben
   würde. Ohne diese Zeile blieb die Lightbox dauerhaft sichtbar. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ===== Passwort-Sperre ===== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory);
  padding: 24px;
}

.gate-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.gate-eyebrow {
  font-size: 0.85rem;
  color: var(--sage);
  margin: 0 0 8px;
}

.gate-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 12px;
}

.gate-text {
  font-size: 0.95rem;
  color: rgba(43, 38, 32, 0.75);
  margin: 0 0 28px;
}

#gate-form {
  display: flex;
  gap: 10px;
}

#gate-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}

#gate-input:focus {
  outline: 2px solid var(--wine);
  outline-offset: 1px;
}

#gate-form button {
  padding: 14px 22px;
  border: none;
  border-radius: 4px;
  background: var(--wine);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#gate-form button:hover { background: #6a2534; }
#gate-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.gate-error {
  margin-top: 16px;
  color: var(--wine);
  font-size: 0.9rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  border-bottom: 1px solid var(--line);
}

.hero-inner { max-width: 640px; }

.hero-kicker {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--sage);
  margin: 0 0 6px;
}

.hero-date {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: rgba(43, 38, 32, 0.6);
  margin: 0 0 22px;
}

.hero-names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.05;
  margin: 0 0 22px;
}

.hero-names .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--wine);
  padding: 0 0.1em;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(43, 38, 32, 0.75);
  max-width: 34ch;
  margin: 0 auto 36px;
}

.hero-scroll {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

.hero-scroll:hover { color: var(--wine); border-color: var(--wine); }

/* ===== Persönlicher Text ===== */
.letter {
  padding: 90px 24px;
  border-bottom: 1px solid var(--line);
}

.letter-inner {
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.75;
  color: var(--ink);
}

/* ===== Galerie ===== */
.gallery-section {
  padding: 90px 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-header h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 8px;
}

.gallery-header p {
  color: rgba(43, 38, 32, 0.6);
  font-size: 0.95rem;
  margin: 0;
}

.gallery-loading {
  text-align: center;
  color: rgba(43, 38, 32, 0.5);
  grid-column: 1 / -1;
}

.gallery-empty {
  text-align: center;
  color: rgba(43, 38, 32, 0.5);
  grid-column: 1 / -1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  background: var(--line);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 4 / 3; }
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 40px 24px 60px;
  font-size: 0.85rem;
  color: rgba(43, 38, 32, 0.5);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 17, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 10px;
}

.lightbox-close { top: 16px; right: 20px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-nav:hover { color: var(--gold); }

@media (max-width: 480px) {
  .lightbox-nav { font-size: 1.8rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-item img { transition: none; }
}
