/* =========================================================
   Layout: eine ruhige Spalte über einem hellen, dunstigen Meer,
   Inhalte liegen auf elfenbeinfarbenen Tafeln.
   Farben & Schriften hier oben zentral ändern.
   Blau (Dusty Blue, Navy) nur als Akzent.
   ========================================================= */
:root {
  --weiss: #fbf9f5;          /* Soft White: Seitengrund */
  --elfenbein: #f5efe3;      /* Ivory: Flächen */
  --sand: #dccbb0;           /* Sand Beige: Linien, Felsen */
  --sand-dunkel: #a08d72;    /* Beschriftungen */
  --tinte: #3a342c;          /* Text: warmes Dunkelbraun statt Schwarz */
  --gedaempft: #62584c;      /* Nebentexte: dunkel genug für gute Lesbarkeit */
  --creme: #fff9ef;          /* Schrift auf dem Foto, Countdown-Felder */
  --zahl: #242424;           /* Countdown-Zahlen */
  --beige-label: #86704f;    /* Countdown-Beschriftungen */
  --nav-bg: #f7f4ed;         /* Navigation */
  --nav-text: #252d48;
  --dusty: #8ea2b6;          /* Dusty Blue: kleine Akzente */
  --navy: #1f2f4d;           /* Navy: Buttons, &, Zeiten */
  --auf-navy: #fbf9f5;
  --fehler: #a2483a;

  --tafel: var(--nav-bg);    /* alle Boxen wie die Navigation */
  --linie: rgba(160, 141, 114, .32);

  --f-display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --f-text: "Cormorant Garamond", Garamond, "Times New Roman", serif;

  --max: 46rem;              /* Breite für Ort und Parken */
  --schmal: 46rem;           /* Breite für Willkommen, Ablauf und Anmeldung */
  --radius: 4px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--weiss);
  color: var(--tinte);
  font: 400 1rem/1.65 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

/* Hintergrund-Leinwand */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
#site, .gate { position: relative; z-index: 1; }

/* Hintergrundfoto mit langsamem Zoom und dunklem Schleier für gute Lesbarkeit */
.foto {
  position: fixed;
  inset: -4%;
  z-index: 0;
  background: var(--navy) center 55% / cover no-repeat;
  display: none;
  animation: zoom 40s ease-in-out infinite alternate;
}
.foto::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Fast schwarzer Verlauf mit leichtem Blauton:
     oben 50 %, hinter dem Text bis 65 %, unten beim Wasser heller (35 %) */
  background: linear-gradient(180deg,
    rgba(8, 12, 22, .50) 0%,
    rgba(8, 12, 22, .65) 25%,
    rgba(8, 12, 22, .65) 55%,
    rgba(8, 12, 22, .48) 78%,
    rgba(8, 12, 22, .35) 100%);
}
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.has-foto .foto { display: block; }
.has-foto #bg { display: none; }

/* Auf dem Foto: Hero & Fusszeile in warmem Ivory, mit weichem Schatten,
   damit feine Buchstaben im unruhigen Bild nicht untergehen */
.has-foto .hero,
.has-foto .hero h1,
.has-foto .footer,
.has-foto .footer .muted { color: var(--creme); }
.has-foto .names,
.has-foto .footer-line { text-shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 4px 30px rgba(0, 0, 0, .45); }
.has-foto .names em { color: #ead9bd; }
.has-foto .hero-date { color: var(--creme); font-weight: 500; }
.has-foto .hero-place { color: var(--creme); font-weight: 500; }
.has-foto .kicker { color: #f3e6cf; }
.has-foto .kicker::before { background: #f3e6cf; }
.has-foto .footer .muted { font-weight: 500; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Typografie ---------- */
h1, h2 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
  color: var(--tinte);
}
h2 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); font-weight: 500; margin-bottom: 1rem; }
p { margin: 0; }
.eyebrow, .kicker {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sand-dunkel);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.kicker { font-size: .86rem; letter-spacing: .26em; }
/* feine Linie vor den Überschriften-Labels */
.eyebrow::before, .kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--dusty);
}
.lead { font-size: 1.12rem; max-width: 60ch; }
.muted { color: var(--gedaempft); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.7rem;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: var(--auf-navy);
  font: 500 .92rem/1 var(--f-text);
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); background: #2c4068; border-color: #2c4068; }
.btn-ghost { background: var(--elfenbein); color: var(--tinte); border-color: var(--sand); }
.btn-ghost:hover { background: var(--sand); color: var(--navy); border-color: var(--sand-dunkel); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* ---------- Sprachauswahl ---------- */
.lang-switch { display: flex; gap: .25rem; }
.lang-switch button {
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--nav-text);
  font: 600 .78rem/1 var(--f-text);
  letter-spacing: .12em;
  padding: .5rem .65rem;
  cursor: pointer;
}
.lang-switch button:hover { background: rgba(37, 45, 72, .08); }
.lang-switch button[aria-pressed="true"] { background: var(--nav-text); color: var(--creme); }

/* ---------- Passwort-Sperre ---------- */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(251, 249, 245, .3);
}
.gate-card {
  width: 100%;
  max-width: 27rem;
  display: grid;
  gap: 1rem;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  background: var(--tafel);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(58, 52, 44, .25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.gate-card .lang-switch { justify-content: flex-end; margin: -.5rem -.4rem 0 0; }
.gate-card h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.monogram { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 1.7rem; color: var(--navy); }
.gate-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.gate-row input { flex: 1 1 10rem; min-width: 0; }
.gate-card.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Kopfzeile ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--nav-bg);
}
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .6rem max(16px, env(safe-area-inset-right, 0px)) .6rem max(16px, env(safe-area-inset-left, 0px));
  background: var(--nav-bg);
  border-bottom: 1px solid var(--sand);
}
.brand { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 1.5rem; text-decoration: none; color: var(--nav-text); }
.nav { display: flex; gap: 1.6rem; justify-content: center; }
.nav a { text-decoration: none; font-size: .92rem; font-weight: 500; letter-spacing: .05em; color: var(--nav-text); }
.nav a:hover { text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--dusty); }

@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: .2rem; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav a { white-space: nowrap; font-size: .86rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 12vh, 8rem) clamp(4rem, 16vh, 10rem);
  display: grid;
  justify-items: center;   /* alles im Titelbereich mittig */
  text-align: center;
  gap: .9rem;
}
/* "Wir heiraten": feine Linie links und rechts */
.hero .kicker::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
}

/* Heller Zusage-Button auf dem dunklen Foto */
.btn-hell {
  background: var(--nav-bg);
  color: var(--nav-text);
  border-color: var(--nav-bg);
  font-weight: 600;
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .55);
}
.btn-hell:hover { background: var(--creme); border-color: var(--creme); color: var(--nav-text); }
.names {
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.01em;
  text-shadow: 0 0 30px rgba(251, 249, 245, 1), 0 0 60px rgba(251, 249, 245, .9);
}
.names em { font-style: italic; color: var(--navy); font-weight: 400; padding-inline: .05em; }
.hero-date { font-family: var(--f-display); font-size: clamp(1.35rem, 5vw, 2rem); font-style: italic; font-weight: 500; line-height: 1.3; letter-spacing: .01em; }
.hero-place { color: var(--tinte); font-size: clamp(1.05rem, 3.2vw, 1.2rem); font-weight: 500; letter-spacing: .08em; }
.hero-date, .hero-place, .kicker { text-shadow: 0 0 18px rgba(251, 249, 245, 1); }
.has-foto .hero-date, .has-foto .hero-place, .has-foto .kicker { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 16px rgba(0, 0, 0, .5); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 1.4rem 1.2rem;
  width: min(100%, 34rem);
  justify-self: center;              /* immer mittig, auf jeder Bildschirmgrösse */
  /* leicht durchsichtig, damit der Countdown zurücktritt */
  background: rgba(245, 239, 227, .62);
  border: 1px solid rgba(247, 244, 237, .45);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cd-done { justify-self: center; }
.countdown div {
  display: grid;
  justify-items: center;
  padding: .95rem .25rem .85rem;
  border-left: 1px solid rgba(36, 36, 36, .12);
  min-width: 0;
}
.countdown div:first-child { border-left: 0; }
.countdown span {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 7.5vw, 3.3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--zahl);
  font-variant-numeric: tabular-nums lining-nums;
}
.countdown small {
  margin-top: .45rem;
  font-size: clamp(.62rem, 2.2vw, .74rem);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--beige-label);
  white-space: nowrap;
}
/* Smartphone: kompakt, nichts wird abgeschnitten */
@media (max-width: 420px) {
  .countdown div { padding: .75rem .1rem .7rem; }
  .countdown small { font-size: .58rem; letter-spacing: .08em; }
}
.cd-done { font-family: var(--f-display); font-size: 2rem; font-style: italic; color: var(--navy); }

/* ---------- Abschnitte & Tafeln ---------- */
main { display: grid; gap: clamp(1.25rem, 4vw, 2.5rem); }
.section { scroll-margin-top: 6rem; }
/* Feste Breiten statt Breite nach Inhalt:
   Ort und Parken nutzen die volle Spalte (--max),
   Willkommen, Ablauf und Anmeldung die schmalere Breite (--schmal). */
main > .section { width: 100%; }
main > .section-schmal { max-width: var(--schmal); }
.tafel {
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--tafel);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -36px rgba(58, 52, 44, .3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Ablauf */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; }
.timeline li {
  display: grid;
  grid-template-columns: 4.6rem 2.6rem minmax(0, 1fr);   /* Zeit · Symbol · Text */
  align-items: start;
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--linie);
}
/* Symbol: feine Linienzeichnung in einem Kreis */
.tl-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--sand);
  border-radius: 50%;
  background: var(--weiss);
  color: var(--navy);
}
.tl-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.timeline li > div { padding-top: .35rem; }
@media (max-width: 420px) {
  .timeline li { grid-template-columns: 3.6rem 2.2rem minmax(0, 1fr); gap: .7rem; }
  .timeline time { font-size: 1.3rem; }
  .tl-icon { width: 2.2rem; height: 2.2rem; }
  .tl-icon svg { width: 1.1rem; height: 1.1rem; }
  .timeline li > div { padding-top: .2rem; }
}
.timeline time {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  padding-top: .35rem;
  color: var(--navy);
  font-variant-numeric: tabular-nums lining-nums;
}
.timeline h3 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.timeline p { color: var(--gedaempft); }

/* Location */
.location { display: grid; gap: 2rem; }
@media (min-width: 820px) { .location { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.facts {
  margin: 0;
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--tafel);
  border: 1px solid var(--linie);
}
.facts dt { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sand-dunkel); }
.facts dd { margin: .2rem 0 0; }
.links { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Parkmöglichkeiten: Text, Karte und Button untereinander */
.hinweise:empty { display: none; }
.hinweise { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.hinweise li { position: relative; padding-left: 1.4rem; color: var(--gedaempft); }
.hinweise li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: .7rem;
  height: 1px;
  background: var(--dusty);
}
.karte {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 1.75rem;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--elfenbein);
}
.karte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.parken .btn { margin-top: 1.25rem; }

/* Geschenke & Dresscode: zwei Blöcke nebeneinander, auf dem Handy untereinander */
.zwei {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--linie);
  border: 1px solid var(--linie);
}
.infoblock { display: grid; align-content: start; gap: .6rem; padding: 1.5rem; background: var(--tafel); }
.infoblock h3, .cards h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.infoblock p { color: var(--gedaempft); }
.motto { font-family: var(--f-display); font-style: italic; font-size: 1.25rem; color: var(--navy) !important; }
.konto { display: grid; gap: .15rem; padding-top: .6rem; border-top: 1px solid var(--linie); }
.konto span:first-child { font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--sand-dunkel); }
.konto .mono { color: var(--tinte); }

/* Sehenswürdigkeiten: Karten im Raster */
.cards {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
}
.cards article { display: grid; align-content: start; gap: .45rem; padding: 1.4rem; background: var(--tafel); }
.cards p { color: var(--gedaempft); font-size: .98rem; }
.cards .card-zeit {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand-dunkel);
}
.card-link {
  justify-self: start;
  margin-top: .25rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--dusty);
  text-underline-offset: .3em;
}
.card-link:hover { text-decoration-color: var(--navy); }

/* ---------- Formular ---------- */
.rsvp {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.1rem 1.25rem;
}
.full { grid-column: 1 / -1; }
.gaeste-felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: .9rem 1.25rem;
  margin-top: .5rem;
}
.gaeste-felder label { font-size: .8rem; }
.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.1rem 1.25rem;
}
.field { display: grid; gap: .4rem; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field label, .field legend { font-size: .85rem; font-weight: 500; color: var(--gedaempft); padding: 0; }
input, select, textarea {
  width: 100%;
  padding: .75rem .9rem;
  font: inherit;
  color: var(--tinte);
  background: var(--weiss);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--dusty); outline-offset: 1px; border-color: var(--dusty); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--fehler); }
textarea { resize: vertical; }

.choices { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-block;
  padding: .65rem 1.25rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: var(--weiss);
  color: var(--tinte);
}
.choice input:checked + span { background: var(--navy); color: var(--auf-navy); border-color: var(--navy); }
.choice input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .5rem; }
.form-status { color: var(--navy); }
.form-status.is-error, .form-error { color: var(--fehler); }

/* ---------- Fusszeile ---------- */
.footer { padding-block: clamp(5rem, 20vh, 12rem) 3rem; display: grid; gap: .4rem; }
.footer-line {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 3.5rem);
  text-shadow: 0 0 30px rgba(251, 249, 245, .9);
}

.kontakt { display: grid; gap: .6rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 249, 239, .3); }
.kontakt-titel { font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.kontakt-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; }
.kontakt-liste li { display: grid; gap: .1rem; }
.kontakt-name { font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; }
.kontakt-liste a { font-variant-numeric: tabular-nums; letter-spacing: .04em; text-decoration: none; }
.kontakt-liste a:hover { text-decoration: underline; text-underline-offset: .3em; }
.has-foto .kontakt { color: var(--creme); text-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 14px rgba(0, 0, 0, .45); }
.has-foto .kontakt-titel { color: #f3e6cf; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
