/* ============================================================
   RSVP-Landingpage – viable CI (Rot / Weiß / Cyan / Schwarz)
   Farben können pro Event in config.json -> theme überschrieben werden.
   ============================================================ */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #fb3632;
  --red-dark: #c9201c;
  --cyan: #4fc3d9;
  --ink: #141414;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --field-border: #dcdcdc;
  --radius: 18px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; background: var(--paper); }

body {
  margin: 0;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--paper);
  background: var(--red);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ---------------------------------------------------------------- Hero */

.hero {
  position: relative;
  min-height: clamp(380px, 46vw, 580px);
  /* Bild rechtsbündig in voller Höhe; links geht es nahtlos ins Rot über */
  background: var(--red) var(--hero-img) no-repeat right center / auto 100%;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 40px 72px;
}

.hero__logo { width: 168px; display: block; }

.kicker {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(64px, 11vw, 156px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.headline__sub {
  margin-top: 0.12em;
  padding-left: 0.04em;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.5em;
  letter-spacing: -0.01em;
}

.star { position: absolute; color: var(--paper); }
.hero__stars .star--1 { width: 78px; height: 78px; left: 31%; top: 9%; transform: rotate(8deg); }
.hero__stars .star--2 { width: 52px; height: 52px; left: 39%; top: 30%; transform: rotate(-12deg); }
.hero__stars .star--3 { width: 40px; height: 40px; left: 46%; top: 7%; }

/* ---------------------------------------------------------------- Info + RSVP */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 72px;
  align-items: start;
  padding-bottom: 96px;
}

.info { padding-top: 8px; max-width: 600px; }

.intro {
  margin: 0 0 32px;
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 600;
  line-height: 1.35;
}

.details { margin: 0 0 28px; border-top: 1.5px solid rgba(255, 255, 255, 0.4); }
.details__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
}
.details dt {
  padding-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.details dd { margin: 0; }
.details__value { display: block; font-size: 20px; font-weight: 700; line-height: 1.3; }
.details__sub { display: block; margin-top: 2px; opacity: 0.92; }
.details__link {
  display: inline-block;
  margin-top: 6px;
  color: var(--paper);
  font-weight: 700;
  font-size: 15px;
  text-underline-offset: 3px;
}

.outro { margin: 0 0 16px; font-size: 18px; }

.deadline {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 14px;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 700;
  transform: rotate(-1deg);
}

.cal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--paper);
  font-weight: 700;
  text-underline-offset: 3px;
}
.cal-link svg, .btn svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------------------------------------------------------- Karte (RSVP) */

.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 34px 70px -24px rgba(90, 0, 0, 0.55);
}

.rsvp { margin-top: -96px; position: relative; z-index: 2; }

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.rsvp__heading { margin: 4px 0 6px; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.rsvp__hello { margin: 0 0 4px; color: var(--muted); }

.toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 18px 0 22px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: #f1efee;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label {
  padding: 11px 12px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toggle input:checked + label { background: var(--ink); color: var(--paper); }
.toggle input:focus-visible + label { outline: 3px solid var(--cyan); outline-offset: 2px; }

.field { margin-bottom: 16px; }
.field label, .companions legend {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
}
.optional { font-weight: 500; color: var(--muted); }

input[type='text'], input[type='email'], input[type='tel'], textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* verhindert Zoom auf iOS */
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--field-border);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 28%, transparent);
}
input[aria-invalid='true'] { border-color: var(--red); }

.field__error { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--red-dark); }
.field__error:empty { display: none; }

.companions {
  margin: 4px 0 16px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #ececec;
}
.companions legend { float: left; width: 100%; margin-bottom: 2px; }
.companions__hint { clear: both; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.companions__list { list-style: none; margin: 0; padding: 0; }
.companions__list li { display: flex; gap: 8px; margin-bottom: 8px; }
.companions__remove {
  flex: none;
  width: 44px;
  border: 1.5px solid var(--field-border);
  border-radius: 10px;
  background: var(--paper);
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.companions__remove:hover { color: var(--red); border-color: var(--red); }

.link-btn {
  padding: 6px 0;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  color: var(--red);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn[hidden] { display: none; }

.rsvp__form.is-no .only-yes { display: none; }

/* Honeypot – für Menschen unsichtbar */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff0ef;
  color: var(--red-dark);
  font-weight: 600;
  font-size: 15px;
}
.form-error:empty { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}
.btn--primary { width: 100%; background: var(--red); color: var(--paper); font-size: 17px; }
.btn--primary:hover { background: var(--red-dark); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary[disabled] { opacity: 0.6; cursor: progress; }
.btn--outline { border: 2px solid var(--ink); color: var(--ink); background: transparent; padding: 11px 20px; }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn:focus-visible, .link-btn:focus-visible, a:focus-visible, .map-card:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.privacy { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

.rsvp__success { text-align: center; outline: none; }
.rsvp__success img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.rsvp__success h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; }
.rsvp__success p { margin: 0 0 20px; color: #3d3d3d; }
.rsvp__actions { display: grid; gap: 6px; }

/* ---------------------------------------------------------------- Lageplan */

.map-section {
  position: relative;
  overflow: hidden;
  padding: 104px 0 112px;
  background: var(--paper);
  color: var(--ink);
}
.map-section .star { color: var(--cyan); }
.star--map-1 { width: 64px; height: 64px; left: 4%; top: 48px; transform: rotate(14deg); }
.star--map-2 { width: 36px; height: 36px; left: 10%; top: 140px; }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
  gap: 72px;
  align-items: center;
}

.map-text h2 { margin: 0 0 16px; font-size: clamp(34px, 3.6vw, 46px); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }
.map-text p { margin: 0 0 14px; line-height: 1.6; }
.map-text .btn { margin-top: 10px; }

.map-figure { position: relative; margin: 0; }
/* Pinselstrich-Bild als schräg versetzte Unterlage – Flyer-Look */
.map-figure::before {
  content: '';
  position: absolute;
  inset: 7% -3% -6% 6%;
  background: var(--backdrop) center / cover;
  border-radius: 6px;
  transform: rotate(3deg);
}

.map-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transform: rotate(-1.2deg);
  transition: transform 0.25s;
}
.map-card:hover { transform: rotate(-0.4deg) scale(1.01); }

.map-canvas { position: relative; display: block; }
.map-canvas img { display: block; width: 100%; height: auto; border-radius: 6px; }

.map-zoom {
  position: absolute;
  left: 24px;
  top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
}
.map-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.map-marker { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.map-marker__dot, .map-marker__pulse {
  position: absolute;
  left: -10px;
  top: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
}
.map-marker__dot { border: 3px solid var(--paper); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.map-marker__pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3.6); opacity: 0; }
}
/* Label oberhalb des Punkts – dort liegt nur die Kirchen-Grafik, keine Standnummern */
.map-marker__label {
  position: absolute;
  left: 0;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--red);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.35);
}
.map-marker__label::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--red);
}

/* ---------------------------------------------------------------- Lightbox */

.lightbox {
  width: min(980px, 96vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 20, 20, 0.78); }
.lightbox__scroll { max-height: 92vh; overflow: auto; overscroll-behavior: contain; padding: 12px; }
.lightbox .map-canvas { width: max(100%, 915px); }
.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* ---------------------------------------------------------------- Footer */

.footer { background: var(--paper); color: var(--ink); border-top: 1px solid #eee; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 32px 40px; }
.footer img { width: 104px; display: block; }
.footer p { margin: 0; font-weight: 700; }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; }
  .map-layout { gap: 48px; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 40px; padding-bottom: 64px; }
  .info { max-width: none; }
  .rsvp { margin-top: 0; }
  .map-section { padding: 72px 0 80px; }
  .map-layout { grid-template-columns: 1fr; gap: 40px; }
  .star--map-1 { left: auto; right: 5%; top: 14px; width: 40px; height: 40px; }
  .star--map-2 { left: auto; right: 17%; top: 40px; width: 22px; height: 22px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  /* Bild oben als Banner, Text darunter auf Rot */
  .hero {
    min-height: 0;
    background-size: 135% auto;
    background-position: right top;
  }
  .hero__inner { padding-block: 24px 40px; }
  .hero__logo { width: 120px; }
  .hero__text { padding-top: 54vw; }
  .hero__stars .star--1 { width: 44px; height: 44px; left: 8%; top: 70px; }
  .hero__stars .star--2 { width: 30px; height: 30px; left: 22%; top: 118px; }
  .hero__stars .star--3 { width: 24px; height: 24px; left: 30%; top: 64px; }
  .kicker { font-size: 13px; }
  .details__row { grid-template-columns: 64px 1fr; gap: 10px; }
  .details__value { font-size: 18px; }
  .card { padding: 24px 20px; }
  .rsvp__heading { font-size: 28px; }
  .map-figure::before { inset: 5% -2% -4% 4%; }
  .map-card { padding: 8px; }
  .map-zoom { left: 14px; top: 14px; }
  .map-marker__label { font-size: 12px; padding: 4px 8px; bottom: 16px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-marker__pulse { animation: none; opacity: 0; }
  .map-card, .map-card:hover { transition: none; }
}
