/* ============================================================
   Geburtstags-RSVP – elegant & modern
   Ink-Schwarz · Champagner-Gold · Fraunces / Hanken Grotesk
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400&family=Hanken+Grotesk:wght@300;400;500;600&display=swap');

:root {
  --accent: #e6c790;
  --accent-deep: #c39a55;
  --accent-2: #d8a392;            /* dezenter Rosé/Kupfer als Zweitton */
  --accent-soft: rgba(230, 199, 144, 0.12);
  --grad: linear-gradient(118deg, #f3e0b6, #e0bd80 52%, #c39a55);
  --grad-counter: linear-gradient(120deg, #f3e0b6, #e6c790 42%, #dba593);

  --ink: #120b16;                 /* tiefes warmes Aubergine statt reinem Schwarz */
  --ink-2: #18101d;
  --surface: rgba(231, 201, 150, 0.07);    /* warm getönte Flächen */
  --surface-2: rgba(231, 201, 150, 0.12);
  --tint: rgba(216, 163, 146, 0.06);       /* zarter Feld-Schimmer */
  --border: rgba(231, 201, 150, 0.18);
  --border-soft: rgba(255, 255, 255, 0.12);

  --text: #f4f1ea;
  --text-dim: #a8a298;
  --text-faint: #6d675f;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

/* ---------- Hintergrund: ruhiger warmer Schimmer ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
  radial-gradient(125% 95% at 50% -12%, #2a1a2e 0%, #1a1020 38%, var(--ink) 68%); }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); }
.blob.b1 { width: 60vw; height: 60vw; left: 50%; top: -22vw; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(230,199,144,0.16), transparent 70%); }
.blob.b2 { width: 48vw; height: 48vw; left: -16vw; bottom: -18vw;
  background: radial-gradient(circle, rgba(216,163,146,0.12), transparent 70%); }
.blob.b3, .blob.b4 { display: none; }

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

/* Dezenter Innenrahmen (nur Desktop) */
.frame { position: fixed; inset: 18px; border: 1px solid var(--border-soft); pointer-events: none; z-index: 40; border-radius: 4px; }
@media (max-width: 720px) { .frame { display: none; } }

/* ---------- Layout ---------- */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 26px; }
section { position: relative; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 90px 26px 70px; }
.kicker {
  font-size: 0.72rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--accent); font-weight: 400; margin-bottom: 38px;
  opacity: 0; animation: rise 1s 0.1s forwards;
}
.kicker::before, .kicker::after { content: ''; display: inline-block; width: 26px; height: 1px; background: var(--accent); opacity: 0.5; vertical-align: middle; margin: 0 14px 3px; }

.bigage {
  font-family: var(--display); font-weight: 300; line-height: 0.9;
  font-size: clamp(8rem, 34vw, 19rem); letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; animation: rise 1.1s 0.2s forwards;
}
.hero h1 {
  font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: clamp(1.7rem, 5.5vw, 2.7rem); letter-spacing: 0;
  margin: 14px 0 18px; color: var(--text);
  opacity: 0; animation: rise 1s 0.4s forwards;
}
.hero .sub { color: var(--text-dim); max-width: 34ch; font-size: 1.05rem; font-weight: 300; opacity: 0; animation: rise 1s 0.5s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Countdown – minimal, mit Haarlinien */
.countdown { display: flex; align-items: stretch; margin-top: 52px; opacity: 0; animation: rise 1s 0.6s forwards; }
.cd-unit { padding: 0 22px; display: flex; flex-direction: column; align-items: center; position: relative; }
.cd-unit + .cd-unit::before { content: ''; position: absolute; left: 0; top: 14%; height: 72%; width: 1px; background: var(--border); }
.cd-num { font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; color: #e2495d; font-variation-settings: 'opsz' 40; }
.cd-label { font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-faint); margin-top: 12px; }

.scroll-hint { margin-top: 60px; color: var(--text-faint); font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; opacity: 0; animation: rise 1.2s 0.8s forwards, bob 3s 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Sektionen / Karten ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 44px; margin: 18px 0;
}
.section-pad { padding: 56px 0; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; color: #f3e2bb; font-weight: 500; margin-bottom: 16px; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 4.5vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 6px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 18px; border-top: 1px solid var(--border-soft); }
.info-item { padding: 22px 4px; border-bottom: 1px solid var(--border-soft); }
.info-item:nth-child(odd) { padding-right: 24px; }
.info-item:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--border-soft); }
.info-item .lbl { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: #f3e2bb; font-weight: 500; margin-bottom: 9px; }
.info-item .val { font-weight: 400; font-size: 1.1rem; color: #ffffff; }
.info-item a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.info-item a:hover { border-color: var(--accent); }
.full { grid-column: 1 / -1; padding-left: 4px !important; padding-right: 4px !important; border-left: none !important; }

/* Live-Zähler – getönter Chip mit warmem Verlauf */
.counter-row { display: flex; align-items: baseline; gap: 14px; margin-top: 24px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.counter-num { font-family: var(--display); font-weight: 300; font-size: 2.4rem; line-height: 1;
  background: var(--grad-counter); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counter-txt { color: var(--text-dim); font-weight: 300; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--body); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.02em;
  border: none; border-radius: 999px; padding: 16px 32px; cursor: pointer;
  color: #1a1408; background: var(--grad);
  transition: transform 0.25s ease, box-shadow 0.3s ease, opacity 0.2s;
  box-shadow: 0 10px 30px -14px rgba(230,199,144,0.6);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -14px rgba(230,199,144,0.7); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: none; border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 14px; }

/* ---------- RSVP (Steps) ---------- */
.rsvp { scroll-margin-top: 30px; }
.step { display: none; animation: stepIn 0.5s ease both; }
.step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.progress { display: flex; gap: 10px; margin-bottom: 30px; }
.progress span { height: 1.5px; flex: 1; background: var(--border); transition: background 0.4s; }
.progress span.done { background: var(--accent); }

/* Eingaben: feine Unterstrich-Optik */
label.field { display: block; margin-bottom: 26px; }
label.field .cap { display: block; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: #f3e2bb; font-weight: 500; margin-bottom: 10px; }
input, textarea {
  width: 100%; font-family: var(--body); font-weight: 300; font-size: 1.05rem; color: var(--text);
  background: var(--tint); border: none; border-bottom: 1px solid var(--border);
  border-radius: 9px 9px 0 0; padding: 12px 14px;
  transition: border-color 0.25s, background 0.25s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); font-weight: 300; }
input:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); background: var(--accent-soft); }
textarea { resize: vertical; min-height: 70px; line-height: 1.7; }

/* Zusage / Absage */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 4px; }
.choice button {
  font-family: var(--display); font-weight: 400; font-size: 1.15rem;
  padding: 34px 16px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--tint); border: 1px solid var(--border); color: var(--text);
  transition: all 0.28s; letter-spacing: 0.01em;
}
.choice button:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Begleitung */
.comp-list { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 6px; }
.comp-card { background: var(--tint); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; }
.comp-top { display: flex; gap: 10px; align-items: center; }
.comp-top input { flex: 1; background: transparent; border-radius: 0; }
.comp-toggles { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { background: none; border: none; color: var(--text-faint); padding: 0 14px; height: 38px; cursor: pointer; font-family: var(--body); font-size: 0.8rem; transition: all 0.2s; white-space: nowrap; }
.seg button.sel { background: var(--accent-soft); color: var(--accent); }
.comp-del { background: transparent; border: 1px solid var(--border); color: var(--text-faint); width: 44px; height: 44px; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem; flex-shrink: 0; transition: all 0.2s; }
.comp-del:hover { color: var(--accent); border-color: var(--accent); }
.add-comp { background: none; border: 1px dashed var(--border); color: var(--text-dim); width: 100%; padding: 14px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--body); font-weight: 300; font-size: 0.92rem; transition: all 0.25s; margin-top: 6px; letter-spacing: 0.02em; }
.add-comp:hover { border-color: var(--accent); color: var(--text); }
.hint { font-size: 0.82rem; color: var(--text-faint); margin-top: 10px; font-weight: 300; }

/* Ernährung */
.diet-block { margin-bottom: 26px; }
.diet-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.diet-choice button {
  font-family: var(--body); font-weight: 300; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 14px 8px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--tint); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.25s;
}
.diet-choice button:hover { border-color: var(--accent); color: var(--text); }
.diet-choice button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Popups / Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 26px;
  background: rgba(8, 5, 11, 0.72); backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--ink-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 38px 34px; max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8);
  animation: modalPop 0.3s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal-text { font-family: var(--display); font-weight: 400; font-style: italic; font-size: 1.5rem; color: var(--text); margin-bottom: 26px; line-height: 1.35; }
.modal-btns { display: flex; gap: 12px; justify-content: center; }
.modal-btns .btn { padding: 13px 30px; }

/* Zusammenfassung */
.summary { margin: 14px 0; border-top: 1px solid var(--border-soft); }
.summary .srow { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.summary .srow .k { color: var(--text-faint); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; }
.summary .srow .v { font-weight: 300; }

.error-msg { color: #e89aa0; font-size: 0.88rem; margin-top: 12px; min-height: 1.2em; font-weight: 300; }

/* Danke */
.done-screen { text-align: center; padding: 30px 0; }
.done-screen .check {
  width: 72px; height: 72px; margin: 0 auto 26px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
  animation: pop 0.6s cubic-bezier(.18,.89,.32,1.28) both;
}
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-screen h2 { margin-bottom: 12px; font-style: italic; }
.done-screen p { color: var(--text-dim); font-weight: 300; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

footer { text-align: center; padding: 60px 26px 70px; color: var(--text-faint); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
footer a { color: var(--text-dim); text-decoration: none; }

@media (max-width: 560px) {
  .card { padding: 30px 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-item:nth-child(even) { padding-left: 4px; border-left: none; }
  .countdown { margin-top: 44px; }
  .cd-unit { padding: 0 15px; }
  .cd-num { font-size: 2rem; }
}