/* Einladungsseite – dunkel, ruhig, mobil zuerst. */

:root {
  --bg:        #0a0a0c;
  --bg-soft:   #101014;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.10);
  --line-2:    rgba(255, 255, 255, 0.18);
  --text:      #ece8e1;
  --muted:     #9c958a;
  --accent:    #d8a657;
  --accent-lt: #eccd94;
  --accent-dk: #8a6a2f;
  --danger:    #e08b7a;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --page: 40rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Warmer Lichtschein oben, damit die Fläche nicht tot wirkt. */
.glow {
  position: fixed;
  inset: -30vh 0 auto 0;
  height: 90vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 50% 25%, rgba(216, 166, 87, 0.16), transparent 70%),
    radial-gradient(45% 40% at 15% 5%, rgba(120, 90, 200, 0.10), transparent 70%);
  filter: blur(10px);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

.page, .gate { position: relative; z-index: 2; }

a { color: var(--accent-lt); text-decoration-color: rgba(236, 205, 148, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; }

.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;
}

/* ---------- Bausteine ---------- */

.eyebrow {
  margin: 0 0 1.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-lt), var(--accent));
  color: #1a1206;
  box-shadow: 0 8px 30px -12px rgba(216, 166, 87, 0.8);
}
.btn-primary:hover { box-shadow: 0 12px 38px -12px rgba(216, 166, 87, 0.95); color: #1a1206; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-wide { width: 100%; padding: 1.1rem 1.6rem; font-size: 1rem; }

.hint { display: block; margin-top: 0.5rem; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.hint.center { text-align: center; margin-top: 1.4rem; }

.form-error {
  margin: 1.1rem 0 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(224, 139, 122, 0.35);
  border-radius: 10px;
  background: rgba(224, 139, 122, 0.08);
  color: var(--danger);
  font-size: 0.9rem;
}
.form-error p { margin: 0.2rem 0; }

/* ---------- Passwort-Seite / Danke-Seite ---------- */

.gate-page { display: flex; }

.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem 1.25rem;
}

.gate-card {
  width: 100%;
  max-width: 27rem;
  padding: 2.6rem 2rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  backdrop-filter: blur(8px);
  text-align: center;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.gate-title {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.gate-text { margin: 0 0 1.8rem; color: var(--muted); font-size: 0.95rem; }
.gate-note { margin: 1.4rem 0 0; font-size: 0.85rem; color: var(--accent); }

.gate-form { display: flex; flex-direction: column; gap: 0.8rem; }
.gate-card .btn-ghost { margin-top: 1.8rem; }

/* ---------- Eingabefelder ---------- */

input[type="password"],
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;  /* verhindert das Zoomen auf iPhones */
  font-weight: 300;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder { color: #6c675f; }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent-dk);
  box-shadow: 0 0 0 3px rgba(216, 166, 87, 0.14);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239c958a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  padding-right: 2.6rem;
}
select option { background: #16161a; color: var(--text); }

/* ---------- Einladung ---------- */

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 12vw, 7rem) 1.4rem 4rem;
}

.hero { text-align: center; }

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-title > span { display: block; }

.hero-kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Die Zahl ist das Motiv der Einladung – entsprechend groß. */
.hero-num {
  margin: 0.2em 0 0;
  font-size: clamp(7rem, 42vw, 15rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  background: linear-gradient(155deg, #fff5e2 8%, var(--accent-lt) 38%, var(--accent) 62%, #96702f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 90px rgba(216, 166, 87, 0.18);
}

.hero-em {
  margin-top: 0.35em;
  font-size: clamp(1.5rem, 6.5vw, 2.4rem);
  font-style: italic;
  color: #d9d3c9;
}

.hero-date {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 2rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 2.6rem 0 0;
  padding: 1.2rem 0.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.unit { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.num {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lbl {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro {
  margin: 3.2rem 0 0;
  font-size: 1.12rem;
  line-height: 1.75;
  color: #cfc9c0;
  text-align: center;
}
.intro p { margin: 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin: 3.2rem 0 0;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.fact-label {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}
.fact-value { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.fact-note { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.note {
  margin: 1.6rem 0 0;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(216, 166, 87, 0.07), transparent 70%);
}
.note-title {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}
.note p { margin: 0; color: #c3bdb4; font-size: 0.97rem; }

/* ---------- Antwort ---------- */

.rsvp { margin: 3.5rem 0 0; }

.deadline {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(216, 166, 87, 0.3);
  border-radius: var(--radius);
  background: rgba(216, 166, 87, 0.07);
  text-align: center;
}
.deadline-label {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}
.deadline-date { font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; }
.deadline-reason { font-size: 0.88rem; color: #bdb7ae; line-height: 1.55; }
.deadline-left:not(:empty) {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.rsvp-title {
  margin: 2.8rem 0 1.6rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 2.8rem);
  text-align: center;
  letter-spacing: -0.015em;
}

.rsvp-form { display: flex; flex-direction: column; gap: 1.3rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field > label {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.choice { display: grid; gap: 0.7rem; margin: 0.4rem 0 0; padding: 0; border: 0; }
.choice legend {
  padding: 0 0 0.7rem;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.opt {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.opt input {
  appearance: none;
  flex: 0 0 auto;
  width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.opt input:checked {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 5px var(--accent);
}
.opt input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.opt-body { display: flex; flex-direction: column; }
.opt-title { font-size: 1rem; font-weight: 400; }
.opt-sub { font-size: 0.82rem; color: var(--muted); }
.opt:has(input:checked) {
  border-color: rgba(216, 166, 87, 0.55);
  background: rgba(216, 166, 87, 0.09);
  box-shadow: 0 0 0 1px rgba(216, 166, 87, 0.18);
}

.guests[hidden] { display: none; }
.guests { animation: slide-in 0.3s ease both; }

.foot {
  margin: 4.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.foot p { margin: 0.35rem 0; }
.foot-small { font-size: 0.78rem; opacity: 0.7; }

/* ---------- Admin ---------- */

.admin { max-width: 56rem; margin: 0 auto; padding: 3rem 1.4rem 4rem; position: relative; z-index: 2; }
.admin-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem;
}
.admin-head h1 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 2.2rem; }
.admin-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-bottom: 2rem; }
.kpi {
  padding: 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.kpi--main { border-color: rgba(216, 166, 87, 0.4); background: rgba(216, 166, 87, 0.08); }
.kpi-num { display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; }
.kpi--main .kpi-num { color: var(--accent-lt); }
.kpi-lbl { display: block; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.85rem 1rem; text-align: left; white-space: nowrap; }
th {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; background: rgba(255,255,255,0.03);
}
tbody tr { border-top: 1px solid var(--line); }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 100px;
  font-size: 0.72rem; letter-spacing: 0.06em;
}
.tag-yes { background: rgba(216, 166, 87, 0.16); color: var(--accent-lt); }
.tag-no  { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Bewegung ---------- */

.reveal { animation: rise 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.32s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 30rem) {
  .facts { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .countdown { gap: 0.2rem; padding: 1rem 0; }
  .gate-card { padding: 2.2rem 1.4rem; }
}
