/* Level 40 – Aline wird 40 */

:root {
  --bg: #0e0b1a;
  --card: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f1fa;
  --muted: #b9b3cc;
  --gold: #f5c26b;
  --pink: #ff6b9d;
  --violet: #8b5cf6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 107, 157, 0.16), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(245, 194, 107, 0.12), transparent 60%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

.container { width: min(1120px, 92%); margin: 0 auto; }
.container.narrow { max-width: 720px; }

section { scroll-margin-top: 24px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 194, 107, 0.12);
  border: 1px solid rgba(245, 194, 107, 0.4);
  color: var(--gold);
  font-weight: 600;
}

.badge-ical {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.badge-ical:hover {
  background: rgba(245, 194, 107, 0.22);
  box-shadow: 0 6px 18px rgba(245, 194, 107, 0.25);
  transform: translateY(-1px);
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  line-height: 1.05;
  font-weight: 800;
  margin: 16px 0 18px;
  letter-spacing: -0.01em;
}

.level {
  background: linear-gradient(120deg, #f5c26b, #ff6b9d 40%, #8b5cf6 70%, #f5c26b);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to { background-position: 250% 0; }
}

.tagline {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 34rem;
  margin: 0 0 8px;
}

.tagline strong { color: var(--text); }

/* schwebende Emojis */
.hero-floats span {
  position: absolute;
  font-size: 28px;
  opacity: 0.7;
  animation: floaty 6s ease-in-out infinite alternate;
  user-select: none;
  pointer-events: none;
}

@keyframes floaty {
  from { transform: translateY(-10px) rotate(-8deg); }
  to   { transform: translateY(12px) rotate(10deg); }
}

/* Countdown */
.countdown {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.cd-box {
  min-width: 86px;
  padding: 14px 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  text-align: center;
}

.cd-box span {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.cd-box small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.cd-done {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  padding: 18px 0;
}

/* Buttons */
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #f5c26b, #ff9d5c);
  color: #241503;
  box-shadow: 0 10px 26px rgba(245, 166, 90, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(245, 166, 90, 0.45);
}

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

.btn-ghost:hover { border-color: var(--gold); }

.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-block { width: 100%; margin-top: 4px; }

/* Polaroid-Collage */
.hero-collage {
  position: relative;
  min-height: 460px;
}

.pol {
  position: absolute;
  width: 52%;
  background: #fff;
  padding: 10px 10px 34px;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.pol img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.p1 { top: 0; right: 4%; transform: rotate(4deg); z-index: 3; }
.p2 { bottom: 6%; left: 0; transform: rotate(-6deg); z-index: 2; }
.p3 { bottom: 0; right: 12%; transform: rotate(8deg); z-index: 1; width: 44%; }

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 0;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker span {
  padding-right: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-size: 0.95rem;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Info-Karten ---------- */

.info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(8px);
}

.card-ico { font-size: 1.8rem; }
.card h3 { margin: 10px 0 4px; font-size: 1.05rem; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 10px;
}

/* ---------- Chaotische Fotowand ---------- */

.gallery {
  columns: 4;
  column-gap: 18px;
  margin-top: 30px;
}

.g-item {
  break-inside: avoid;
  margin: 0 0 26px;
  opacity: 0;
  transform: translateY(34px) scale(0.9);
  transition:
    opacity 0.55s ease,
    transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.35);
  transition-delay: calc(var(--d, 0) * 1ms);
}

.g-item.visible { opacity: 1; transform: none; }

.g-item img {
  display: block;
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  cursor: zoom-in;
  background: #1c1730;
  transform: rotate(var(--rot, 0deg)) translate(var(--x, 0), var(--y, 0));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.g-item:hover { position: relative; z-index: 6; }

.g-item:hover img {
  transform: rotate(0deg) translate(var(--x, 0), 0) scale(1.05);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

/* ab und zu ein weißer Polaroid-Rahmen */
.g-item.framed img {
  background: #fff;
  padding: 10px 10px 30px;
  border-radius: 6px;
}

/* ---------- Anmeldung ---------- */

.section-rsvp .form { padding: 28px; margin-top: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.form input,
.form select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
}

.form input::placeholder { color: rgba(185, 179, 204, 0.6); }

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 194, 107, 0.18);
}

.form select option { background: #1a1530; color: var(--text); }

.form-status {
  min-height: 1.5em;
  margin: 14px 0 4px;
  font-weight: 600;
}

.form-status.success { color: #7ee2a8; }
.form-status.error { color: #ff8fa8; }

.form-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 10px;
}

/* ---------- Footer ---------- */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.footer p { margin: 0; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 6, 16, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox figure {
  margin: 0;
  text-align: center;
}

.lightbox img {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.lb-nav,
.lb-close {
  position: fixed;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lb-nav:hover,
.lb-close:hover { background: rgba(255, 255, 255, 0.16); }

.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 18px; right: 22px; font-size: 1.2rem; }

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

@media (max-width: 1000px) {
  .info { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 3; }
}

@media (max-width: 900px) {
  .hero { padding: 72px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-collage {
    min-height: 340px;
    max-width: 460px;
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .cd-box { min-width: 70px; }
  .cd-box span { font-size: 1.7rem; }
  .gallery { columns: 2; column-gap: 12px; }
  .g-item { margin-bottom: 18px; }
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; }
  .lb-nav { width: 44px; height: 44px; font-size: 1.4rem; }
}
