/* Hochzeit Celina & Sepp — Farbpalette und Typografie an die Einladung angelehnt */

:root {
  --teal: #2BAFA8;
  --teal-dark: #1F8780;
  --coral: #E5594A;
  --coral-dark: #C7402F;
  --sun: #F5C24B;
  --pink: #EE9AB0;
  --cream: #FBF6EC;
  --paper: #FFFDF8;
  --ink: #2A2A2A;
  --ink-soft: #555;
  --hair: #E8DFCF;
  --ok: #2E8B57;
  --err: #C7402F;

  --font-display: 'Caveat', 'Patrick Hand', cursive;
  --font-headline: 'Fraunces', 'Georgia', serif;
  --font-body: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --shadow: 0 8px 30px rgba(31, 135, 128, 0.10);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

body {
  background:
    radial-gradient(circle at 8% 10%, rgba(245, 194, 75, 0.18), transparent 35%),
    radial-gradient(circle at 92% 18%, rgba(238, 154, 176, 0.20), transparent 38%),
    radial-gradient(circle at 18% 92%, rgba(43, 175, 168, 0.16), transparent 40%),
    radial-gradient(circle at 88% 88%, rgba(229, 89, 74, 0.14), transparent 38%),
    var(--cream);
  min-height: 100dvh;
}

a { color: var(--teal-dark); }
a:hover { color: var(--coral-dark); }

h1, h2, h3 { font-family: var(--font-headline); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 0 0 0.4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 0.5em; }
h3 { font-size: 1.1rem; margin: 0 0 0.4em; }

.script {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.005em;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(0.85rem, 4vw, 2rem);
  padding-left: max(clamp(0.85rem, 4vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.85rem, 4vw, 2rem), env(safe-area-inset-right));
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin-bottom: 1.25rem;
  position: relative;
}

.hero {
  text-align: center;
  padding-top: 2rem;
}

.hero .greet {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--coral);
  line-height: 1;
  margin-bottom: 0.2em;
  transform: rotate(-2deg);
}

.hero .names {
  font-family: var(--font-headline);
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  line-height: 1.05;
  color: var(--teal-dark);
  margin: 0.2em 0;
}

.hero .amp {
  font-family: var(--font-display);
  color: var(--coral);
  font-size: 0.95em;
  margin: 0 0.1em;
}

.hero .subtitle {
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-size: 1.4rem;
  margin-top: 0.2em;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  background: var(--teal);
  color: white;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 1rem;
  box-shadow: var(--shadow-soft);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.fact {
  background: white;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed var(--hair);
}

.fact .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 0.25em;
}

.fact .value {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  color: var(--ink);
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  padding: 0.85rem 1.5rem;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--coral);
  color: white;
}
.btn-primary:hover { background: var(--coral-dark); color: white; }

.btn-secondary {
  background: white;
  color: var(--teal-dark);
  border: 2px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal); color: white; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  padding: 0.6rem 0.8rem;
}
.btn-ghost:hover { color: var(--coral); }

.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0 1rem;
  color: var(--teal-dark);
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35em;
  color: var(--ink);
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--hair);
  background: white;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 175, 168, 0.18);
}

.field { margin-bottom: 1rem; }
.field .hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.25rem; }

.field-row {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row.three { grid-template-columns: 2fr 1fr 1fr; }
}

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.choice input { display: none; }
.choice label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.1rem 0.6rem;
  background: white;
  border: 2px solid var(--hair);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice label .emoji { font-size: 1.6rem; }
.choice label .sub { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); }
.choice input:checked + label.yes {
  border-color: var(--teal);
  background: rgba(43, 175, 168, 0.10);
  color: var(--teal-dark);
}
.choice input:checked + label.no {
  border-color: var(--coral);
  background: rgba(229, 89, 74, 0.08);
  color: var(--coral-dark);
}

.guest-block {
  background: rgba(255, 253, 248, 0.7);
  border: 1.5px dashed var(--hair);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}
.guest-block .guest-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.guest-block .guest-title h3 { margin: 0; color: var(--teal-dark); }
.guest-remove {
  background: transparent;
  border: 0;
  color: var(--coral);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}
.guest-add {
  width: 100%;
  background: white;
  border: 2px dashed var(--teal);
  color: var(--teal-dark);
  border-radius: 14px;
  padding: 0.9rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
}
.guest-add:hover { background: rgba(43, 175, 168, 0.08); }
.guest-add[disabled] { opacity: 0.5; cursor: not-allowed; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem;
  background: white;
  border: 1.5px solid var(--hair);
  border-radius: 12px;
}
.checkbox-row input { margin-top: 0.25rem; transform: scale(1.2); accent-color: var(--teal); }
.checkbox-row label { margin: 0; font-weight: 600; }
.checkbox-row .sub { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }

.flash {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}
.flash.ok { background: rgba(46, 139, 87, 0.12); color: #1f5e3b; }
.flash.err { background: rgba(199, 64, 47, 0.12); color: var(--err); }

.confirm-hero {
  text-align: center;
}
.confirm-hero .big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5rem);
  color: var(--coral);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 2rem 1rem 3rem;
}
.footer .heart { color: var(--coral); }

/* Admin */
.admin-wrap { max-width: 1100px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; }
th, td { padding: 0.7rem 0.8rem; text-align: left; border-bottom: 1px solid var(--hair); font-size: 0.95rem; vertical-align: top; }
th { background: var(--teal); color: white; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.tag.yes { background: rgba(46, 139, 87, 0.15); color: #1f5e3b; }
.tag.no { background: rgba(199, 64, 47, 0.12); color: var(--err); }
.tag.pending { background: rgba(245, 194, 75, 0.25); color: #8a6915; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: white;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.stat .n { font-family: var(--font-headline); font-size: 2rem; color: var(--teal-dark); line-height: 1; }
.stat .l { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.25rem; }

/* -------------------- Timeline (Ablauf) -------------------- */
.timeline {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--teal) 0 4px, transparent 4px 10px);
  opacity: 0.45;
}
.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.9rem;
  padding: 0.4rem 0 0.9rem;
  position: relative;
}
.timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(31, 135, 128, 0.18);
}
.timeline-body { padding-top: 2px; }
.timeline-time {
  font-family: var(--font-display);
  color: var(--coral);
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.15rem;
}
.timeline-title {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.timeline-desc {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin-top: 0.15rem;
}

/* -------------------- Trauzeugen -------------------- */
.trauzeugen {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 560px) {
  .trauzeugen { grid-template-columns: 1fr 1fr; }
}
.trauzeuge {
  text-align: center;
  background: white;
  border-radius: 16px;
  padding: 1.2rem 1rem;
  border: 1px dashed var(--hair);
}
.trauzeuge-photo {
  width: 110px;
  height: 110px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal) 0%, var(--pink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}
.trauzeuge-photo img { width: 100%; height: 100%; object-fit: cover; }
.trauzeuge-placeholder {
  color: white;
  font-family: var(--font-headline);
  font-size: 2.4rem;
  font-weight: 600;
}
.trauzeuge-name {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--teal-dark);
}
.trauzeuge-role {
  font-family: var(--font-display);
  color: var(--coral);
  font-size: 1.1rem;
  margin: 0.1rem 0 0.6rem;
}
.trauzeuge-bio {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* -------------------- Galerie -------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -------------------- Hotels -------------------- */
.hotels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}
@media (min-width: 560px) { .hotels { grid-template-columns: 1fr 1fr; } }

.hotel {
  background: white;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--hair);
}
.hotel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.hotel-name {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: var(--teal-dark);
}
.hotel-distance {
  font-family: var(--font-display);
  color: var(--coral);
  font-size: 1.05rem;
}
.hotel-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.hotel-note {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.hotel-link { margin-top: 0.7rem; padding: 0.55rem 1rem; font-size: 0.9rem; }

/* -------------------- Original-Einladung -------------------- */
.card-invitation {
  background: linear-gradient(135deg, rgba(245, 194, 75, 0.08), rgba(43, 175, 168, 0.05));
}
.invitation-frame {
  margin: 1.2rem auto 0;
  max-width: 520px;
  padding: 0.7rem 0.7rem 1.2rem;
  background: white;
  border-radius: 4px;
  box-shadow:
    0 12px 36px rgba(31, 135, 128, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.06);
  transform: rotate(-1.2deg);
  transition: transform 0.3s ease;
}
.invitation-frame:hover { transform: rotate(0deg) scale(1.02); }
.invitation-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

/* -------------------- Responsive Feinschliff -------------------- */

/* Einladungskarte auf Phone gerade halten */
@media (max-width: 480px) {
  .invitation-frame { transform: none; max-width: 100%; padding: 0.5rem 0.5rem 0.9rem; }
  .invitation-frame:hover { transform: scale(1.01); }
}

/* Sehr kleine Phones (iPhone SE u. ä.) */
@media (max-width: 380px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  .hero { padding-top: 1rem; }
  .hero .greet { font-size: 1.7rem; }
  .hero .names { font-size: 2rem; }
  .hero .subtitle { font-size: 1.15rem; }
  .hero-date { font-size: 0.95rem; padding: 0.45rem 0.9rem; }
  .card { padding: 1rem; border-radius: 14px; }
  .container { padding: 0.75rem; }
  .facts { gap: 0.6rem; }
  .fact { padding: 0.75rem 0.85rem; }
  .fact .value { font-size: 0.98rem; }
  .timeline-dot { width: 32px; height: 32px; font-size: 1rem; }
  .timeline-item { grid-template-columns: 34px 1fr; gap: 0.6rem; }
  .timeline::before { left: 16px; }
  .timeline-time { font-size: 1.1rem; }
  .timeline-title { font-size: 1rem; }
  .timeline-desc { font-size: 0.88rem; }
  .choice label { padding: 0.85rem 0.4rem; }
  .choice label .emoji { font-size: 1.3rem; }
  .choice label .sub { font-size: 0.72rem; }
  .trauzeuge { padding: 1rem 0.75rem; }
  .trauzeuge-photo { width: 90px; height: 90px; }
  .gallery { gap: 0.4rem; }
  .btn { padding: 0.75rem 1.1rem; font-size: 0.95rem; min-height: 44px; }
  .hero .amp { font-size: 0.85em; }
  .garland { letter-spacing: 0.25rem; font-size: 1.1rem; }
  .footer { font-size: 0.85rem; padding: 1.5rem 0.75rem 2rem; }
}

/* Cards auf normalen Phones nicht zu groß */
@media (max-width: 480px) {
  .hero { padding-top: 1.5rem; }
  .cta-row { gap: 0.5rem; margin-top: 1.2rem; }
  .cta-row .btn { width: 100%; }       /* CTA-Buttons volle Breite auf Phone */
  .cta-row .btn-ghost { width: auto; min-height: 40px; }
  .facts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .guest-block { padding: 0.85rem; }
}

/* Admin-Tabelle: kompakter auf Mobile */
@media (max-width: 720px) {
  .admin-wrap th, .admin-wrap td { padding: 0.5rem 0.55rem; font-size: 0.85rem; }
  .admin-wrap th { font-size: 0.72rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat { padding: 0.7rem 0.5rem; }
  .stat .n { font-size: 1.5rem; }
  .stat .l { font-size: 0.78rem; }
}

/* iOS-Tap-Highlight reduzieren */
a, button, label, input { -webkit-tap-highlight-color: rgba(43, 175, 168, 0.15); }

/* Inputs auf iOS nicht zoomen lassen (16px minimum) */
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  font-size: max(1rem, 16px);
}

/* dezente Garland-Deko oben */
.garland {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.4rem;
  color: var(--coral);
  user-select: none;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
