/* ---------- Schriften (lokal, kein Google-Abruf) ---------- */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url(/fonts/nunito/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(/fonts/nunito/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(/fonts/nunito/nunito-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url(/fonts/caveat/caveat-latin-700-normal.woff2) format("woff2"); }

:root {
  --night: #13223b;
  --night-2: #1d3557;
  --forest: #2f6b3f;
  --forest-d: #22502f;
  --fire: #e8742c;
  --fire-d: #c95b18;
  --ember: #f4a940;
  --canvas: #f4ead6;
  --paper: #fffaf0;
  --line: #e7dabf;
  --ink: #2b2118;
  --muted: #7a6a58;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 8px 24px rgba(60, 40, 10, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(rgba(120, 90, 40, .07) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 40, .05) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 17px;
}
h1, h2 { line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; font-weight: 800; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
a { color: var(--forest-d); }
.muted { color: var(--muted); }
em { font-style: normal; color: var(--muted); font-weight: 400; }

/* ---------- Kopfbereich ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff6e0;
  text-align: center;
  background: linear-gradient(180deg, #0a1426 0%, #13223b 35%, #233f63 70%, #4a5f7e 86%, #c9875a 100%);
  padding-top: 52px;
}
.hero .sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .sky .tw { animation: twinkle 3.5s ease-in-out infinite; }
.hero .sky .shooting { opacity: 0; animation: shoot 9s ease-in 3s infinite; }
.hero-inner { position: relative; z-index: 1; padding: 0 20px; }
.kicker {
  display: inline-block;
  margin: 0 0 .6em;
  padding: .25em .9em;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255, 246, 224, .45);
  border-radius: 99px;
}
.hero h1 {
  font-family: "Caveat", "Segoe Print", cursive;
  font-weight: 700;
  font-size: clamp(3.6rem, 15vw, 7rem);
  line-height: .95;
  margin: 0;
  text-shadow: 0 0 30px rgba(255, 179, 71, .35), 0 3px 0 rgba(0, 0, 0, .25);
}
.tagline { font-size: clamp(1.1rem, 4vw, 1.4rem); font-weight: 700; margin: .4em 0 0; opacity: .95; }
.countdown { display: flex; justify-content: center; gap: 10px; margin: 22px 0 0; }
.countdown div {
  min-width: 64px;
  padding: 8px 6px 6px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}
.countdown span { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.landscape { position: relative; display: block; width: 100%; height: clamp(150px, 26vw, 300px); margin-top: 8px; }
.hero-small { padding-top: 40px; }
.hero-small h1 { font-size: clamp(2.8rem, 11vw, 5rem); }
.hero-small .landscape { height: clamp(120px, 18vw, 220px); }

.flames path { transform-box: fill-box; transform-origin: 50% 100%; }
.flames .f1 { animation: flicker 1.3s ease-in-out infinite alternate; }
.flames .f2 { animation: flicker 0.9s ease-in-out infinite alternate-reverse; }
.flames .f3 { animation: flicker 0.7s ease-in-out infinite alternate; }
.glow { animation: glow 2.2s ease-in-out infinite alternate; }
.spark { animation: spark 2.6s linear infinite; opacity: 0; }
.spark.s2 { animation-delay: .9s; }
.spark.s3 { animation-delay: 1.7s; }
.flag { transform-box: fill-box; transform-origin: 0 50%; animation: wave 2.4s ease-in-out infinite alternate; }

@keyframes twinkle { 50% { opacity: .25; } }
@keyframes flicker { 0% { transform: scale(1, 1) skewX(0); } 50% { transform: scale(.96, 1.06) skewX(2deg); } 100% { transform: scale(1.03, .94) skewX(-2deg); } }
@keyframes glow { to { opacity: .7; } }
@keyframes spark { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -70px); } }
@keyframes wave { to { transform: scaleX(.85) skewY(4deg); } }
@keyframes shoot { 0% { opacity: 0; transform: translate(0, 0); } 3% { opacity: 1; } 8% { opacity: 0; transform: translate(260px, 86px); } 100% { opacity: 0; } }

/* ---------- Inhalt ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.wrap.wide { max-width: 1100px; padding-top: 24px; }
.wrap.narrow { max-width: 420px; }
.hero + .wrap { margin-top: -18px; position: relative; }

.card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  margin: 0 0 18px;
}
.intro { font-size: 1.1rem; text-align: center; }

.facts { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0 0 18px; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
  position: relative;
}
.fact h2 { font-family: "Caveat", cursive; font-size: 1.9rem; font-weight: 700; color: var(--fire-d); margin-bottom: .2em; }
.fact-icon {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  background: var(--canvas);
  border-radius: 50%;
}
.link { font-weight: 700; text-decoration: none; display: inline-block; margin-top: .5em; }
.link:hover { text-decoration: underline; }

/* ---------- Formular ---------- */
.rsvp h2 { font-family: "Caveat", cursive; font-size: 2.4rem; color: var(--forest-d); text-align: center; margin-bottom: .1em; }
.rsvp > .muted { text-align: center; }
.rsvp-form { margin-top: 18px; display: grid; gap: 20px; }
.label { display: block; font-weight: 800; margin-bottom: 6px; }
.field { display: block; }
input[type="text"], input:not([type]), input[type="password"], input[type="number"], input[type="date"], input[type="time"], textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 13px 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px rgba(244, 169, 64, .25); }
.hint { display: block; color: var(--muted); font-size: .85rem; margin-top: 5px; }

.choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice legend { padding: 0; grid-column: 1 / -1; }
.choice-btn { position: relative; cursor: pointer; }
.choice-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-btn span {
  display: flex; align-items: center; justify-content: center;
  min-height: 64px;
  padding: 12px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 1.08rem;
  background: #fff;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  transition: all .15s;
}
.choice-btn:hover span { border-color: #d6c39c; transform: translateY(-1px); }
.choice-btn input:focus-visible + span { box-shadow: 0 0 0 4px rgba(244, 169, 64, .35); }
.choice-btn.yes input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; box-shadow: 0 6px 16px rgba(47, 107, 63, .3); }
.choice-btn.no input:checked + span { background: #6f6152; border-color: #6f6152; color: #fff; }

.rsvp-form:not(:has(input[value="yes"]:checked)) .if-yes { display: none; }
.if-yes { display: grid; gap: 20px; padding: 18px; background: #f3f8f1; border: 1.5px dashed #b9d3b9; border-radius: 14px; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  flex: 0 0 52px; height: 52px;
  font: inherit; font-size: 1.6rem; font-weight: 800; line-height: 1;
  color: var(--forest-d);
  background: #fff;
  border: 2px solid #b9d3b9;
  border-radius: 50%;
  cursor: pointer;
}
.stepper button:active { transform: scale(.94); }
.stepper input { width: 84px; text-align: center; font-size: 1.4rem; font-weight: 800; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-primary {
  display: block; width: 100%;
  font: inherit; font-size: 1.2rem; font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #f08a3e, var(--fire));
  border: 0;
  border-radius: 14px;
  padding: 17px 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(232, 116, 44, .35), inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: transform .1s, box-shadow .15s;
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(232, 116, 44, .45), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn-primary:active { transform: translateY(1px); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 16px; border-radius: 12px; background: #fff3d9; border: 1.5px solid #f1d39a; margin: 0 0 16px; }
.notice.error { background: #fde8e4; border-color: #f2b8ab; color: #8a2a17; font-weight: 700; }
.notice.ok { background: #e7f4e8; border-color: #b6dab9; color: #1f5a2c; font-weight: 700; }
.notice.returning { text-align: center; }

/* ---------- Danke-Seite ---------- */
.thanks { text-align: center; }
.dress-hint { margin-top: 12px; padding: 10px 14px; background: var(--canvas); border-radius: 12px; }
.thanks h2 { font-family: "Caveat", cursive; font-size: 2.3rem; color: var(--forest-d); }
.btn-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0; }
@media (min-width: 560px) { .btn-row { grid-template-columns: 1fr 1fr; } }
.btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 12px;
  text-decoration: none;
  color: #fff;
  background: var(--night-2);
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(19, 34, 59, .25);
}
.btn small { font-weight: 400; opacity: .8; font-size: .8rem; }
.btn:hover { background: var(--night); }
.qr { display: flex; gap: 18px; align-items: center; padding: 16px; background: var(--canvas); border-radius: 14px; }
.qr-code { flex: 0 0 150px; background: #fff; padding: 6px; border-radius: 10px; }
.qr-code svg { display: block; width: 100%; height: auto; }
@media (max-width: 480px) { .qr { flex-direction: column; text-align: center; } .qr-code { flex-basis: auto; width: 190px; } }
.copy { display: flex; gap: 8px; margin: 10px 0 12px; }
.copy input { font-size: .9rem; padding: 10px 12px; }
.links { margin-top: 4px; }

.btn-small {
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: .9rem; font-weight: 700;
  padding: 8px 14px;
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-small:hover { background: var(--forest-d); }
.btn-small.ghost { background: transparent; color: inherit; padding: 6px 8px; }
.btn-small.ghost:hover { background: rgba(0, 0, 0, .06); }
.btn-small.ghost.light { color: #fff; border: 1px solid rgba(255, 255, 255, .4); padding: 6px 12px; }
.btn-small.ghost.light:hover { background: rgba(255, 255, 255, .12); }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.confetti span { position: absolute; top: -40px; font-size: 1.8rem; animation: fall 3.2s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(380deg); opacity: .2; } }

.site-footer { text-align: center; padding: 10px 16px 40px; font-weight: 700; color: var(--muted); }

/* ---------- Admin ---------- */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  color: #fff;
  background: var(--night);
}
.admin-bar nav { display: flex; gap: 14px; align-items: center; }
.admin-bar a { color: #fff; font-weight: 700; text-decoration: none; }
.admin-bar form { margin: 0; }
.admin-login { padding-top: 12vh; }
.admin-login h1 { font-family: "Caveat", cursive; font-size: 2.6rem; margin-bottom: 0; }
.admin-login form { display: grid; gap: 16px; margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat span { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.stat small { color: var(--muted); font-weight: 700; }
.stat.big { background: var(--forest); border-color: var(--forest); color: #fff; }
.stat.big small { color: rgba(255, 255, 255, .85); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num, th.num { text-align: center; }
.nowrap { white-space: nowrap; }
.actions { display: flex; gap: 2px; }
.actions form { margin: 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 800; }
.badge.yes { background: #e2f1e4; color: #1f5a2c; }
.badge.no { background: #efe9e2; color: #6f6152; }
.food-notes { margin-top: 14px; }
.food-notes summary { cursor: pointer; font-weight: 700; }
.settings { display: grid; gap: 16px; }
.settings .grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .settings .grid { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* ---------- Mitbringen ---------- */
.bring-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.bring-list small { color: var(--muted); font-weight: 700; margin-right: 2px; }
.bring-list span { font-size: .85rem; padding: 3px 10px; background: #fff; border: 1.5px solid #b9d3b9; border-radius: 99px; }

/* ---------- Private Einladung ---------- */
.locked { text-align: center; }
.locked-icon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.locked h2 { font-family: "Caveat", cursive; font-size: 2.2rem; color: var(--forest-d); }

/* ---------- Admin: Einladungslinks & Schalter ---------- */
.invites { display: grid; gap: 12px; margin: 14px 0; }
.invite { padding: 14px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; }
.invite.off { opacity: .6; background: transparent; }
.invite-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.invite .copy { margin: 10px 0 8px; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.invite-actions form { margin: 0; }
.btn-small.wa { background: #1f9e55; }
.btn-small.wa:hover { background: #17834a; }
.invite-new { display: flex; gap: 8px; }
.invite-new input { padding: 10px 12px; }
.group { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 14px; }
.group legend { font-weight: 800; padding: 0 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input[type="checkbox"] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--forest); flex: 0 0 auto; }
.check .hint { margin-top: 2px; }
