:root {
  --bg: #f2ecfb;
  --bg-soft: #e8ddf6;
  --card: #fbf8ff;
  --text: #231b2e;
  --muted: #5f5272;
  --accent: #9a79c6;
  --accent-dark: #7552a4;
  --border: #d8c9ed;
  --shadow: 0 14px 35px rgba(35, 27, 46, 0.14);
}

:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 20%, #fdfaff 0%, var(--bg) 45%, #e0d3f3 100%);
  line-height: 1.5;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.1;
  margin: 0;
  color: var(--accent-dark);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 600;
}

h3 {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}

p {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(130, 103, 165, 0.26);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(117, 82, 164, 0.68);
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  box-shadow: 0 3px 10px rgba(35, 27, 46, 0.14);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  cursor: pointer;
}

.btn-primary {
  border-color: rgba(130, 103, 165, 0.32);
  background: rgba(117, 82, 164, 0.68);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(35, 27, 46, 0.18);
}

.btn:focus-visible {
  outline: 2px solid rgba(117, 82, 164, 0.35);
  outline-offset: 2px;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: rgba(107, 74, 151, 0.76);
}

.btn-secondary {
  border-color: rgba(130, 103, 165, 0.24);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.52);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.62);
}

.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 20, 41, 0.18), rgba(28, 20, 41, 0.18)),
    radial-gradient(circle at 75% 20%, rgba(230, 210, 255, 0.1), transparent 44%);
  backdrop-filter: blur(9px) saturate(125%);
  -webkit-backdrop-filter: blur(9px) saturate(125%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 2px 16px rgba(34, 21, 54, 0.45);
}

.hero-content h1 {
  text-shadow:
    0 0 26px rgba(255, 255, 255, 0.92),
    0 0 10px rgba(255, 255, 255, 0.75),
    0 2px 14px rgba(255, 255, 255, 0.55);
}

.hero-content .eyebrow {
  display: inline-block;
  color: #f9f2ff;
  background: rgba(63, 41, 93, 0.46);
  border: 1px solid rgba(238, 224, 255, 0.55);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  backdrop-filter: blur(2px);
}

.hero-content h1 span {
  font-size: 0.7em;
  font-weight: 500;
}

.hero-date {
  margin-top: 0.8rem;
  font-size: 1.26rem;
  letter-spacing: 0.05em;
}

.hero-copy {
  width: min(660px, 90%);
  margin: 1.5rem auto 2rem;
  font-size: 1.12rem;
  line-height: 1.5;
  color: #f6f1ff;
}

.scroll-cue-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  text-decoration: none;
  color: #f9f2ff;
  opacity: 0.95;
  transition: opacity 220ms ease;
}

.scroll-cue-only:hover,
.scroll-cue-only:focus-visible {
  opacity: 1;
}

.scroll-arrow {
  display: inline-block;
  font-size: 2rem;
  line-height: 1;
  animation: scrollHint 1.2s ease-in-out infinite;
}

@keyframes scrollHint {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

.section-head {
  margin-bottom: 2rem;
}

.program-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: nowrap;
}

.program-head > div {
  min-width: 0;
  flex: 1;
}

#program-calendar-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.program-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.program-practical {
  grid-column: 1 / -1;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.8rem;
}

.value {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
}

.address {
  margin-top: 0;
  color: var(--muted);
}

.place-link {
  color: inherit;
  text-decoration-color: rgba(117, 82, 164, 0.45);
  text-underline-offset: 2px;
}

.place-link:hover,
.place-link:focus-visible {
  color: var(--accent-dark);
}

.practical-list {
  padding-left: 1rem;
  margin: 0;
}

.practical-list li + li {
  margin-top: 0.45rem;
}

.contacts-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.program-map-preview {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(251, 248, 255, 0.85);
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.program-inline-map {
  width: 100%;
  height: 220px;
  min-height: 220px;
  background: transparent;
}

.program-inline-map .maplibregl-map,
.program-inline-map .maplibregl-canvas-container,
.program-inline-map .maplibregl-canvas,
.program-inline-map .mk-map-view,
.program-inline-map .mk-map-view > div {
  width: 100%;
  height: 100%;
}

.map-fallback {
  padding: 1rem;
  color: var(--muted);
}

.guest-gallery-copy {
  color: var(--muted);
  max-width: 60ch;
}

.guest-gallery-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.guest-gallery-head {
  margin-bottom: 0;
}

.gallery-page-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
}

.guest-gallery-topline .btn {
  flex-shrink: 0;
}

.upload-status {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

.guest-gallery-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.72rem;
  padding: 0.1rem;
}

.guest-gallery-grid.is-empty {
  display: block;
  padding: 0;
}

.guest-gallery-grid::-webkit-scrollbar {
  display: none;
}

.guest-photo-card {
  margin: 0;
  position: relative;
  grid-column: span 3;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(114, 93, 144, 0.16);
}

.guest-photo-card::before {
  content: '';
  display: block;
  padding-top: 118%;
}

.guest-photo-card.is-wide {
  grid-column: span 6;
}

.guest-photo-card.is-tall {
  grid-column: span 3;
}

.guest-photo-card.is-wide::before {
  padding-top: 60%;
}

.guest-photo-card.is-tall::before {
  padding-top: 145%;
}

.guest-photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  display: block;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  height: 100%;
  object-fit: cover;
}

.guest-photo-author {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.1rem 0.8rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 251, 255, 0.96);
  background: linear-gradient(to top, rgba(19, 12, 30, 0.62), rgba(19, 12, 30, 0));
  text-shadow: 0 1px 2px rgba(8, 5, 12, 0.35);
  pointer-events: none;
}

.guest-gallery-empty {
  width: 100%;
  margin: 0;
  padding: 1.35rem 1.25rem;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: linear-gradient(160deg, rgba(250, 244, 255, 0.94), rgba(236, 222, 251, 0.92));
  color: var(--muted);
  text-align: center;
}

.guest-gallery-empty strong {
  display: block;
  color: var(--accent-dark);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.guest-gallery-actions {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
}

.gallery-sentinel {
  height: 1px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: rgba(10, 8, 16, 0.88);
  padding: 1rem;
}

.photo-lightbox.is-open {
  display: flex;
}

.author-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 14, 30, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.author-modal.is-open {
  display: flex;
}

.author-modal-dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(133, 109, 166, 0.24);
  background: linear-gradient(160deg, rgba(251, 246, 255, 0.97), rgba(242, 233, 252, 0.94));
  box-shadow: 0 16px 38px rgba(32, 24, 45, 0.2);
}

.author-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(133, 109, 166, 0.26);
  background: rgba(255, 255, 255, 0.65);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.author-modal-copy {
  margin-top: 0.55rem;
  color: var(--muted);
}

.author-modal-form {
  margin-top: 1rem;
}

.author-modal-label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
}

.author-modal-input {
  width: 100%;
  border: 1px solid rgba(133, 109, 166, 0.26);
  border-radius: 12px;
  padding: 0.7rem 0.82rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
}

.author-modal-input:focus-visible {
  outline: 2px solid rgba(117, 82, 164, 0.35);
  outline-offset: 1px;
}

.author-modal-error {
  min-height: 1.2rem;
  margin-top: 0.5rem;
  font-size: 0.83rem;
  color: #9b3552;
}

.author-modal-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.lightbox-frame {
  margin: 0;
  width: min(1100px, 88vw);
  height: min(82vh, 760px);
}

.lightbox-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-nav {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

body.lightbox-open {
  overflow: hidden;
}

body.author-modal-open {
  overflow: hidden;
}

.gift-box {
  text-align: center;
  background: linear-gradient(170deg, rgba(244, 238, 255, 0.88), rgba(230, 218, 248, 0.95));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.gift-box > p {
  color: var(--muted);
  margin-top: 1rem;
}

.iban-box {
  width: min(100%, 700px);
  margin: 1.5rem auto 0;
  padding: 1rem;
  border: 1px dashed var(--accent);
  border-radius: 16px;
  background: rgba(248, 244, 255, 0.78);
}

.iban {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 600;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  color: #b88ef2;
}

.iban-copy {
  cursor: pointer;
}

.iban-sep {
  color: rgba(95, 82, 114, 0.32);
  font-size: 0.72em;
  margin: 0 0.08em;
}

.iban-hint {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: rgba(95, 82, 114, 0.32);
}

.copy-feedback {
  min-height: 1.4rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

.causal {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.check-card {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.check-card ul {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
}

.check-card li + li {
  margin-top: 0.35rem;
}

.footer {
  padding: 2.8rem 0 3.6rem;
  text-align: center;
  color: rgba(95, 82, 114, 0.7);
}

.footer .container {
  display: grid;
  gap: 0.4rem;
}

.footer p {
  margin: 0;
}

.footer p:first-child {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--accent-dark);
  text-shadow: none;
}

.footer p:last-child {
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(95, 82, 114, 0.8);
}

.footer p + p {
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1724;
    --bg-soft: #231d2f;
    --card: #2a2238;
    --text: #f3ecff;
    --muted: #c2b4db;
    --accent: #c6a6f4;
    --accent-dark: #a97ee5;
    --border: #4f4169;
    --shadow: 0 16px 36px rgba(6, 3, 12, 0.5);
  }

  body {
    background: radial-gradient(circle at 12% 20%, #2a2238 0%, var(--bg) 45%, #110e18 100%);
  }

  .btn {
    border-color: rgba(198, 166, 244, 0.28);
    background: rgba(90, 68, 122, 0.58);
    color: #f4eaff;
    box-shadow: 0 4px 12px rgba(5, 3, 10, 0.26);
  }

  .btn-primary {
    border-color: rgba(198, 166, 244, 0.34);
    background: rgba(122, 93, 166, 0.68);
  }

  .btn-primary:hover,
  .btn-primary:focus-visible {
    background: rgba(134, 103, 180, 0.72);
  }

  .btn-secondary {
    border-color: rgba(198, 166, 244, 0.26);
    background: rgba(58, 46, 78, 0.5);
    color: #ecdfff;
  }

  .btn-secondary:hover,
  .btn-secondary:focus-visible {
    background: rgba(66, 52, 90, 0.56);
  }

  .btn:focus-visible {
    outline-color: rgba(198, 166, 244, 0.42);
  }

  .author-modal {
    background: rgba(8, 6, 13, 0.54);
  }

  .author-modal-dialog {
    border-color: rgba(198, 166, 244, 0.28);
    background: linear-gradient(165deg, rgba(45, 36, 61, 0.96), rgba(31, 25, 44, 0.94));
    box-shadow: 0 16px 34px rgba(5, 3, 10, 0.42);
  }

  .author-modal-close {
    border-color: rgba(198, 166, 244, 0.28);
    background: rgba(72, 58, 98, 0.58);
    color: #f4eaff;
  }

  .author-modal-input {
    border-color: rgba(198, 166, 244, 0.32);
    color: #f4eaff;
    background: rgba(75, 60, 103, 0.42);
  }

  .author-modal-error {
    color: #ffb6c9;
  }

  .hero-overlay {
    background:
      linear-gradient(to top, rgba(10, 7, 15, 0.3), rgba(10, 7, 15, 0.3)),
      radial-gradient(circle at 75% 20%, rgba(156, 120, 214, 0.1), transparent 42%);
    backdrop-filter: blur(10px) saturate(128%);
    -webkit-backdrop-filter: blur(10px) saturate(128%);
  }

  .hero-content .eyebrow {
    background: rgba(14, 10, 22, 0.68);
    border-color: rgba(206, 181, 241, 0.58);
  }

  .program-map-preview {
    background: rgba(31, 26, 42, 0.9);
  }

  .guest-gallery-empty {
    border-color: rgba(198, 166, 244, 0.36);
    background: linear-gradient(160deg, rgba(50, 40, 69, 0.94), rgba(35, 28, 48, 0.92));
    color: rgba(226, 212, 249, 0.9);
  }

  .guest-gallery-empty strong {
    color: #dcc6ff;
  }

  .gift-box {
    background: linear-gradient(170deg, rgba(45, 36, 62, 0.92), rgba(30, 24, 42, 0.95));
  }

  .iban-box {
    background: rgba(26, 21, 37, 0.8);
  }

  .iban-sep,
  .iban-hint {
    color: rgba(216, 198, 245, 0.5);
  }

  .footer p:last-child {
    color: rgba(236, 224, 255, 0.9);
  }

  .program-inline-map .maplibregl-ctrl-group {
    background: rgba(24, 20, 33, 0.9);
    border: 1px solid rgba(110, 92, 146, 0.7);
  }

  .program-inline-map .maplibregl-ctrl button .maplibregl-ctrl-icon {
    filter: invert(1) brightness(1.35);
  }
}

@media (max-width: 980px) {
  .program-head {
    align-items: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .program-practical {
    grid-column: auto;
  }

  .guest-photo-card {
    grid-column: span 4;
  }

  .guest-photo-card.is-wide {
    grid-column: span 8;
  }

  .guest-photo-card.is-tall {
    grid-column: span 4;
  }

  .guest-gallery-topline {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .btn {
    padding: 0.62rem 1rem;
    font-size: 0.86rem;
  }

  #program-calendar-cta {
    padding: 0.5rem 0.82rem;
    font-size: 0.78rem;
  }

  .guest-gallery-topline {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.55rem;
  }

  .guest-gallery-head {
    min-width: 0;
  }

  .guest-gallery-topline .btn {
    padding: 0.42rem 0.72rem;
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-copy {
    margin-bottom: 1.4rem;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .guest-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .guest-photo-card {
    grid-column: span 1;
  }

  .guest-photo-card::before {
    padding-top: 100%;
  }

  .guest-photo-card.is-wide,
  .guest-photo-card.is-tall {
    grid-column: span 2;
  }

  .guest-photo-card.is-wide::before {
    padding-top: 62%;
  }

  .guest-photo-card.is-tall::before {
    padding-top: 130%;
  }

  .lightbox-frame {
    width: 100%;
    height: 76vh;
  }

  .lightbox-nav {
    display: none;
  }
}
