@import url("https://fonts.bunny.net/css?family=Cormorant+Garamond:300,400,500,600,700|Raleway:300,400,500,600&display=swap");

:root {
  --text-font: "Raleway", system-ui, sans-serif;
  --headline-font: "Cormorant Garamond", Georgia, serif;
  --primary: #b8848f;
  --primary-dark: #a56472;
  --text-primary: #94626d;
  --text: #4a3f3f;
  --muted: #8a7d7d;
  --bg: #fffbfa;
  --bg-header: #f5eaeb;
  --bg-alt: #f6ecec;
  --radius: 16px;
  --shadow: 0 2px 4px rgba(74, 63, 63, .05), 0 10px 30px rgba(74, 63, 63, .08);
  --shadow-hover: 0 4px 8px rgba(74, 63, 63, .06), 0 16px 40px rgba(74, 63, 63, .14);
  --nav-h: 60px;
  --gutter: clamp(16px, 4vw, 32px);
  --chevron: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%234a3f3f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 300 clamp(15px, 1.05vw + 12px, 17px)/1.75 var(--text-font); color: var(--text); background: var(--bg); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--headline-font); font-weight: 500; margin: 0; line-height: 1.12; }
p { margin: 0 0 .8em; }
img { max-width: 100%; display: block; }
a { color: var(--text-primary); text-underline-offset: 3px; }
strong { font-weight: 600; }
[hidden] { display: none !important; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Einblenden beim Scrollen (nur wenn JS läuft) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 88vh; min-height: 88svh; display: grid; place-items: center; text-align: center; color: #fff;
  background: linear-gradient(135deg, #c9a0a9, #b8848f 55%, #a56472); overflow: hidden; isolation: isolate;
}
.hero .slide { position: absolute; inset: 0; background-size: cover; background-position: center 30%; opacity: 0; transition: opacity 1.8s ease; z-index: -2; will-change: transform, opacity; }
.hero .slide.active { opacity: 1; }
.hero .slide.active, .hero .slide.leaving { animation: kenburns 16s ease-out both; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.16); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(40, 25, 30, .15), rgba(40, 25, 30, .45)); }
.hero .title { padding: 4rem var(--gutter) 6rem; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); animation: rise 1.2s ease both; }
.eyebrow { margin: 0 0 .6rem; font: 400 clamp(.78rem, 2.4vw, .95rem)/1.4 var(--text-font); letter-spacing: .38em; text-transform: uppercase; opacity: .92; }
.hero h1 { font-size: clamp(3rem, 12vw, 7.2rem); font-weight: 400; letter-spacing: .01em; }
.hero h2 { font-size: clamp(1.25rem, 3.6vw, 2.1rem); font-weight: 300; font-style: italic; margin-top: .4rem; }
.hearts { display: flex; gap: .6rem; align-items: center; justify-content: center; margin: 1.2rem 0; font-size: 1rem; }
.hearts::before, .hearts::after { content: ""; width: clamp(40px, 12vw, 90px); height: 1px; background: currentColor; opacity: .8; }
.scroll-hint { position: absolute; bottom: 1.2rem; left: 50%; translate: -50% 0; color: #fff; opacity: .85; animation: bob 2.4s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero .title, .scroll-hint, .hero .slide { animation: none !important; } }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 20; height: var(--nav-h); display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter); background: rgba(255, 251, 250, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(74, 63, 63, .08), 0 4px 18px rgba(74, 63, 63, .06); }
.nav .names { font: 600 1.5rem var(--headline-font); text-decoration: none; color: var(--text); white-space: nowrap; }
.nav ul { flex: 1; display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%); }
.nav ul::-webkit-scrollbar { display: none; }
.nav li a { display: block; padding: .55rem .85rem; text-decoration: none; color: var(--text); font-size: .93rem; font-weight: 400; white-space: nowrap; border-radius: 99px; transition: background .2s, color .2s; }
.nav li a:hover { background: var(--bg-header); }
.nav li a.active { background: var(--primary); color: #fff; }
.nav .logout { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; font-size: .88rem; padding: .5rem; border-radius: 99px; }
.nav .logout:hover { color: var(--primary-dark); }
@media (max-width: 860px) { .nav .names { display: none; } .nav .logout span { display: none; } .nav ul { margin-left: -6px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section:nth-of-type(even) { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: clamp(1.8rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.section-head hr { width: 72px; border: 0; border-top: 2px solid var(--primary); margin: 1rem auto 0; position: relative; overflow: visible; }
.section-head p { margin: 1rem auto 0; max-width: 600px; color: var(--muted); }
.rich-text { max-width: 720px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem); text-align: center; font-size: 1.08em; white-space: pre-line; }

/* Orte & Unterkünfte */
.place-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(1.2rem, 3vw, 2rem); }
.place { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .3s, transform .3s; }
.place:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.place-map { position: relative; display: block; aspect-ratio: 8 / 5; background: var(--bg-header); overflow: hidden; }
.place-map img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.place:hover .place-map img { transform: scale(1.04); }
.place-map-cta { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; font-size: .82rem; font-weight: 500; color: #fff; background: rgba(74, 63, 63, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-radius: 99px; transition: background .2s; }
a.place-map:hover .place-map-cta { background: var(--primary-dark); }
.place-map.placeholder { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--bg-header), var(--bg-header) 14px, #f0e1e3 14px, #f0e1e3 28px); color: var(--text-primary); text-align: center; padding: 1rem; }
.place-map.placeholder span { display: inline-flex; align-items: center; gap: .5rem; font: 500 1.35rem var(--headline-font); }
.place-body { padding: clamp(1.2rem, 3vw, 1.7rem); display: flex; flex-direction: column; flex: 1; }
.place-when { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.place-when span { padding: .15rem .7rem; font-size: .82rem; font-weight: 500; color: var(--primary-dark); background: var(--bg-header); border-radius: 99px; }
.place h3 { font-size: clamp(1.7rem, 4vw, 2.1rem); color: var(--text-primary); }
.place-name { font-weight: 500; margin: .15rem 0 .8rem; }
.place .description { color: var(--text); }
.route { margin: 0 0 1rem; padding-left: 1.1rem; }
.route li { margin-bottom: .55rem; }
.route li::marker { color: var(--primary); }
.price { font-weight: 500; color: var(--primary-dark); }
.place-address { margin: auto 0 0; padding-top: .6rem; display: inline-flex; align-items: flex-start; gap: .5rem; text-decoration: none; font-weight: 400; color: var(--text-primary); }
.place-address svg { flex: none; margin-top: .25rem; }
a.place-address:hover span { text-decoration: underline; }
p.place-address { margin-bottom: 0; }

/* Bildtrenner */
.separator { min-height: clamp(220px, 40vw, 380px); display: grid; align-content: center; text-align: center; color: #fff; background: linear-gradient(135deg, #c9a0a9, #a56472) center 35%/cover no-repeat; position: relative; }
.separator.dim::before { content: ""; position: absolute; inset: 0; background: rgba(40, 25, 30, .35); }
.separator .container { position: relative; }
.mail-pill { display: inline-block; padding: .8rem 1.8rem; color: var(--text); background: rgba(255, 251, 250, .95); border-radius: 99px; text-decoration: none; font-weight: 500; font-size: clamp(1rem, 3.5vw, 1.3rem); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); transition: transform .2s; }
.mail-pill:hover { transform: translateY(-2px); }
.separator .quote { margin: 0; }

/* Organisatoren */
.organizers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.2rem; }
.org { padding: 1.6rem 1rem; text-align: center; }
.avatar { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto .9rem; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); font: 500 1.6rem var(--headline-font); letter-spacing: .03em; }
.org .name { font: 600 1.5rem var(--headline-font); margin: 0; }
.org .function { margin: 0; color: var(--text-primary); font-size: .92rem; }

/* Wünsche */
.wishes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.2rem; }
.wish { padding: clamp(1.4rem, 3vw, 2rem); border-top: 4px solid var(--primary); }
.wish h3 { font-size: 1.7rem; color: var(--text-primary); margin-bottom: .6rem; }
.wish p { margin: 0; }

/* ---------- Formulare ---------- */
.form-card { max-width: 860px; margin: 0 auto; padding: clamp(1.2rem, 4vw, 2.5rem); display: grid; gap: 1.2rem; }
.data { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2rem); }
.column { display: grid; gap: .9rem; align-content: start; }
@media (max-width: 760px) { .data { grid-template-columns: 1fr; } }
.form-control { width: 100%; font: 400 16px/1.4 var(--text-font); padding: .85rem 1rem; color: var(--text); background: #fff; border: 1.5px solid #e4d6d8; border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.form-control::placeholder { color: #a39696; }
.form-control:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(184, 132, 143, .2); }
textarea.form-control { min-height: 130px; resize: vertical; }
select.form-control { appearance: none; -webkit-appearance: none; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 1rem center; background-size: 14px; padding-right: 2.5rem; }
.field-label { margin: .3rem 0 -.2rem; font-weight: 500; font-size: .95rem; }

.segmented { display: grid; gap: .6rem; }
.seg input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chip span { display: block; padding: .85rem 1rem; text-align: center; border: 1.5px solid #e4d6d8; border-radius: 10px; background: #fff; cursor: pointer; transition: all .2s; user-select: none; }
.seg span:hover, .chip span:hover { border-color: var(--primary); }
.seg input:checked + span { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 500; }
.seg input:focus-visible + span, .chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(184, 132, 143, .3); }
.chips { display: grid; gap: .5rem; }
.chip span { text-align: left; padding: .7rem 1rem .7rem 2.6rem; position: relative; }
.chip span::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 1.05rem; height: 1.05rem; translate: 0 -50%; border: 1.5px solid #cdbcbf; border-radius: 4px; background: #fff; transition: all .2s; }
.chip input:checked + span { background: var(--bg-header); border-color: var(--primary); }
.chip input:checked + span::before { background: var(--primary) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='m3.5 8.5 3 3 6-6.5'/></svg>") center/80% no-repeat; border-color: var(--primary); }
.chips.off, select.off { opacity: .45; pointer-events: none; }

.choice { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.choice input { margin-top: .4rem; width: 1.05rem; height: 1.05rem; accent-color: var(--primary-dark); flex: none; }
.terms { font-size: .9rem; }
.btn { display: block; width: 100%; padding: 1rem 1.5rem; font: 500 1rem var(--text-font); letter-spacing: .02em; color: #fff; background: var(--primary); border: 0; border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; transition: background .2s, transform .15s, box-shadow .2s; box-shadow: 0 4px 14px rgba(165, 100, 114, .35); }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-inline { display: inline-block; width: auto; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { max-width: 860px; margin: 0 auto 1.5rem; padding: 1.4rem 1.5rem; border-radius: var(--radius); text-align: center; }
.alert-success { background: #eaf4ec; color: #2f5d3a; font-size: 1.1rem; }
.error-text { color: #a02b2b; min-height: 1.4em; margin: 0; text-align: center; font-weight: 400; }

footer { padding: 2.5rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); }
footer p { margin: 0 0 .3rem; }
footer .small { font-size: .82rem; }
footer a { color: inherit; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); background: linear-gradient(135deg, #cfa7b0, #b8848f 55%, #a56472); }
.login-box { width: 100%; max-width: 400px; padding: clamp(1.8rem, 6vw, 2.8rem) clamp(1.4rem, 5vw, 2.2rem); background: rgba(255, 251, 250, .97); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); text-align: center; }
.login-box h1 { font-size: 2.8rem; margin-bottom: 1.4rem; }
.login-box form { display: grid; gap: .9rem; }
.login-box .choice { justify-content: center; }

/* ---------- Hero: Punkte ---------- */
.dots { position: absolute; z-index: 3; bottom: 4.6rem; left: 50%; translate: -50% 0; display: flex; gap: .55rem; }
.dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .4s, background .3s; }
.dots button.active { width: 28px; background: #fff; }
.dots button:hover { background: rgba(255, 255, 255, .85); }
/* größere Tippfläche auf Touch-Geräten */
.dots button { position: relative; }
.dots button::after { content: ""; position: absolute; inset: -10px -4px; }
.scroll-hint { z-index: 3; }

/* ---------- Blütenblätter ---------- */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.login-body .petals { position: fixed; }
.petal { position: absolute; top: -30px; width: var(--size); height: calc(var(--size) * 1.25); border-radius: 100% 0 100% 0; background: linear-gradient(135deg, #fff, #f4d9de 70%, #e9b9c3); opacity: var(--alpha); animation: fall var(--dur) linear var(--delay) infinite; will-change: transform; }
@keyframes fall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  50% { transform: translate3d(calc(var(--drift) * .3), 55vh, 0) rotate(calc(var(--spin) * .5)) skewX(12deg); }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)); }
}
.login-box { position: relative; z-index: 1; }

/* ---------- Galerie ---------- */
.polaroids { list-style: none; margin: 0; padding: 0 0 .5rem; columns: 3 250px; column-gap: clamp(1.1rem, 3.2vw, 2.2rem); }
.polaroid { break-inside: avoid; margin: 0 0 clamp(1.3rem, 3.2vw, 2.2rem); --r: 0deg; }
.polaroid:nth-child(3n+1) { --r: -2deg; }
.polaroid:nth-child(3n+2) { --r: 1.4deg; }
.polaroid:nth-child(3n) { --r: -.7deg; }
.polaroid-btn { position: relative; display: block; width: 100%; padding: 10px 10px 38px; border: 0; background: #fff; border-radius: 3px; cursor: zoom-in; box-shadow: 0 2px 4px rgba(74, 63, 63, .08), 0 12px 28px rgba(74, 63, 63, .16); transform: rotate(var(--r)); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s; }
.polaroid-btn::before { content: ""; position: absolute; top: -11px; left: 50%; width: 76px; height: 24px; translate: -50% 0; rotate: -3deg; background: rgba(184, 132, 143, .38); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.polaroid-btn img { width: 100%; height: auto; background: var(--bg-header); }
.polaroid-btn:hover, .polaroid-btn:focus-visible { transform: rotate(0deg) scale(1.04); box-shadow: 0 6px 12px rgba(74, 63, 63, .1), 0 24px 48px rgba(74, 63, 63, .24); z-index: 2; }

.lightbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 1rem; border: 0; background: transparent; color: #fff; overflow: hidden; }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; animation: fadein .3s ease; }
.lightbox::backdrop { background: rgba(28, 18, 22, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox img { grid-column: 2; justify-self: center; max-width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); object-fit: contain; }
.lb-nav, .lb-close { display: grid; place-items: center; width: 48px; height: 48px; padding: 0 0 .15em; font-size: 2rem; line-height: 1; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; cursor: pointer; transition: background .2s; }
.lb-nav:hover, .lb-close:hover { background: rgba(255, 255, 255, .28); }
.lb-nav.prev { grid-column: 1; } .lb-nav.next { grid-column: 3; }
.lb-close { position: absolute; top: max(.8rem, env(safe-area-inset-top)); right: .8rem; z-index: 2; }
.lb-count { position: absolute; bottom: max(.8rem, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; font-size: .85rem; letter-spacing: .1em; opacity: .8; }
@media (max-width: 600px) { .lb-nav { position: absolute; bottom: .6rem; width: 44px; height: 44px; } .lb-nav.prev { left: 1rem; } .lb-nav.next { right: 1rem; } .lightbox img { max-height: 80dvh; } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- Bildbänder: Parallax + Countdown ---------- */
@media (min-width: 900px) and (hover: hover) { .parallax { background-attachment: fixed; } }
.separator .eyebrow { margin-bottom: 1.2rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 2vw, 1.2rem); max-width: 640px; margin: 0 auto; }
.countdown > div { padding: clamp(.8rem, 2.5vw, 1.4rem) .4rem; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .38); border-radius: 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.countdown span { display: block; font: 500 clamp(2rem, 8vw, 3.8rem)/1 var(--headline-font); font-variant-numeric: lining-nums tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.countdown small { display: block; margin-top: .45rem; font-size: clamp(.62rem, 2vw, .8rem); letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.countdown-done { grid-column: 1 / -1; margin: 0; font: italic 500 clamp(1.6rem, 6vw, 2.6rem) var(--headline-font); }
.separator .quote { margin-top: .2rem; }
