/* ===============
   René & Stefanie – Hochzeitsalbum
   Mobile-first, dark theme, elegant serif, gold accents
   =============== */

:root {
  --bg: #0e0f12;
  --bg-soft: #14161a;
  --fg: #e9e6df;
  --muted: #b7b3a9;
  --gold: #cfb53b;
  --accent: var(--gold);
  --gap: 0.85rem;
  /* Kartenabstand */
  --radius: 14px;
  --maxw: 1200px;
  --shadow: 0 6px 25px rgba(0, 0, 0, .45);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -200px, #191b20 0%, var(--bg) 47%) fixed;
  color: var(--fg);
  font: 17px/1.6 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(6px);
  background: linear-gradient(to bottom, rgba(14, 15, 18, .85), rgba(14, 15, 18, .55));
  border-bottom: 1px solid rgba(212, 175, 55, .18);
}

.title {
  font-size: clamp(1.6rem, 5vw, 3rem);
  letter-spacing: .02em;
  margin: .75rem 0 0;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(212, 175, 55, .12);
  font-weight: 700;
}

.subtitle {
  margin: .1rem 0 1rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .95rem;
}

.intro .wrap {
  padding: 1rem 1rem 0
}

.intro p {
  margin: 0 0 .75rem;
  color: var(--muted)
}

.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .25rem 0 1rem;
}

.filter {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, .35);
  background: linear-gradient(180deg, rgba(212, 175, 55, .08), rgba(212, 175, 55, .02));
  color: var(--fg);
  border-radius: 999px;
  padding: .35rem .8rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .02em;
}

.filter:is(:hover, :focus) {
  outline: none;
  border-color: var(--gold)
}

.filter.is-active {
  background: rgba(212, 175, 55, .15)
}

/* ==== Masonry via CSS Columns (robust, mobile-first) ==== */
.gallery {
  column-width: 20rem;
  /* Ziel-Spaltenbreite */
  column-gap: var(--gap);
  max-width: var(--maxw);
  padding: 0 1rem 3rem;
  margin: 0 auto;
}

.card {
  break-inside: avoid;
  display: block;
  margin: 0 0 var(--gap);
  background: linear-gradient(180deg, var(--bg-soft), rgba(20, 22, 26, .7));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(212, 175, 55, .12);
  transform: translateZ(0);
}

.card a {
  display: block;
  text-decoration: none;
  color: inherit
}

.card figure {
  margin: 0
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  background: #0d0e11;
  transition: transform .35s ease, filter .35s ease;
  will-change: transform;
}

.card:hover img {
  transform: scale(1.02)
}

.card .caption {
  padding: .6rem .8rem;
  color: var(--muted);
  border-top: 1px solid rgba(212, 175, 55, .12);
  font-size: 1rem;
}

/* Noscript message */
.noscript {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(212, 175, 55, .18);
  padding: 1rem 0;
  color: var(--muted);
  text-align: center
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 11, .92);
}

.lightbox.is-open {
  display: flex
}

.lb-figure {
  margin: 0;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  align-items: center
}

.lb-picture {
  position: relative;
  display: inline-block
}

.lb-picture img {
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lb-caption {
  color: var(--muted);
  text-align: center;
  max-width: min(90ch, 90vw)
}

.lb-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: .5rem;
  z-index: 10;
}

.lb-download {
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, .4);
  color: var(--accent);
  padding: .5rem .8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: all 0.2s ease;
}

.lb-close-inline {
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, .4);
  color: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  transition: all 0.2s ease;
}

.lb-download:is(:hover, :focus) {
  outline: none;
  background: rgba(212, 175, 55, .15);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(212, 175, 55, .2);
}

.lb-close-inline:is(:hover, :focus) {
  outline: none;
  background: rgba(212, 175, 55, .15);
  transform: scale(1.05);
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(212, 175, 55, .35);
  color: var(--fg);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
}

.lb-prev {
  left: 16px
}

.lb-next {
  right: 16px
}

.lb-prev:is(:hover, :focus),
.lb-next:is(:hover, :focus) {
  outline: none;
  background: rgba(212, 175, 55, .18)
}

@media (min-width: 900px) {
  .lb-prev {
    left: 24px
  }

  .lb-next {
    right: 24px
  }
}