:root {
  --bg: #f6f9ed;
  --ink: #1b1b1b;
  --ink-soft: #5d6156;
  --accent: #e32734;
  --accent-dark: #b81d28;
  --card: #ffffff;
  --font-display: "Bricolage Grotesque", Georgia, sans-serif;
  --font-body: "Nunito", -apple-system, sans-serif;
  --font-hand: "Caveat", cursive;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #fdeae4 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 12% 30%, #fceff0 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 88% 35%, #eef4dd 0%, transparent 60%),
    linear-gradient(180deg, #fbfdf5 0%, #f6f9ed 100%);
  text-align: center;
  padding: 4rem 1.25rem 5rem;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.bouquet-wrap {
  position: relative;
  margin: 1.5rem auto 0;
  max-width: 520px;
}

.bouquet svg {
  width: 100%;
  height: auto;
  display: block;
  animation: bouquet-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bouquet-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.regenerate-btn {
  margin-top: 0.25rem;
  border: 1.5px solid rgba(27, 27, 27, 0.25);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.regenerate-btn:hover {
  background: #fff;
  color: var(--ink);
  border-color: rgba(27, 27, 27, 0.45);
}

/* ---------- Countdown ---------- */

.countdown {
  margin-top: 3rem;
}

.countdown-label {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.countdown-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.6rem;
}

.countdown-cell {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(27, 27, 27, 0.08);
  box-shadow: 0 8px 24px rgba(27, 27, 27, 0.08);
  border-radius: 18px;
  padding: 0.85rem 1.1rem;
  min-width: 82px;
}

.countdown-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.countdown-sep {
  align-self: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: rgba(27, 27, 27, 0.3);
}

.countdown-date {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.countdown-back {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-dark);
}

.hero-fade {
  position: absolute;
  inset: auto 0 0;
  height: 70px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

/* ---------- Polaroids ---------- */

.polaroids-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 1rem;
  text-align: center;
}

.polaroids-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 2rem;
}

.polaroids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
}

.polaroid {
  margin: 0;
  background: #fff;
  padding: 0.75rem 0.75rem 0.5rem;
  box-shadow:
    0 1px 2px rgba(27, 27, 27, 0.12),
    0 14px 28px rgba(27, 27, 27, 0.16);
  transition: transform 0.25s ease;
}

.polaroid:nth-child(4n + 1) { transform: rotate(-3deg); }
.polaroid:nth-child(4n + 2) { transform: rotate(2deg) translateY(8px); }
.polaroid:nth-child(4n + 3) { transform: rotate(-1.5deg); }
.polaroid:nth-child(4n + 4) { transform: rotate(3deg) translateY(6px); }

.polaroid:hover {
  transform: rotate(0deg) scale(1.04);
}

.polaroid-photo {
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 2.2rem;
  background:
    linear-gradient(135deg, #ececec 0%, #dcdcdc 50%, #e6e6e6 100%);
  color: rgba(27, 27, 27, 0.35);
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: rgba(27, 27, 27, 0.65);
  padding: 0.5rem 0 0.25rem;
}

@media (max-width: 560px) {
  .polaroid-photo {
    width: 140px;
    height: 140px;
  }
}

/* ---------- Nachrichten ---------- */

.messages-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

.messages-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  text-align: center;
  margin: 0;
}

.messages-intro {
  text-align: center;
  color: var(--ink-soft);
  margin: 0.6rem 0 2rem;
}

.message-form {
  background: var(--card);
  border: 1px solid rgba(27, 27, 27, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(27, 27, 27, 0.08);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field-label {
  font-weight: 700;
  font-size: 0.85rem;
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  border: 1.5px solid rgba(27, 27, 27, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: #fdfcfa;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.char-count {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.submit-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(227, 39, 52, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(227, 39, 52, 0.4);
}

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

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
}

.form-status.error { color: #b03030; }
.form-status.success { color: #2e7d4f; }

.file-drop {
  display: block;
  border: 1.5px dashed rgba(27, 27, 27, 0.25);
  border-radius: 12px;
  padding: 0.9rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  cursor: pointer;
  background: #fdfcfa;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover {
  border-color: var(--accent);
  background: #fff;
}

.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.image-preview {
  position: relative;
  width: fit-content;
  margin-top: 0.25rem;
}

.image-preview img {
  display: block;
  max-width: 140px;
  max-height: 140px;
  border-radius: 8px;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(27, 27, 27, 0.2);
}

.image-remove {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.image-remove:hover {
  background: var(--accent);
}

/* ---------- Zettel ---------- */

.notes {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.note {
  position: relative;
  width: min(440px, 92%);
  padding: 1.4rem 1.5rem 1.1rem;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(27, 27, 27, 0.12),
    0 12px 22px rgba(27, 27, 27, 0.16);
  transform: rotate(var(--tilt, 0deg));
  animation: note-in 0.5s ease both;
}

@keyframes note-in {
  from {
    opacity: 0;
    transform: rotate(var(--tilt, 0deg)) translateY(14px);
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt, 0deg));
  }
}

/* Klebestreifen */
.note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 92px;
  height: 26px;
  transform: translateX(-50%) rotate(var(--tape-tilt, -2deg));
  background: rgba(255, 255, 255, 0.55);
  border-left: 1px dashed rgba(27, 27, 27, 0.15);
  border-right: 1px dashed rgba(27, 27, 27, 0.15);
  box-shadow: 0 2px 4px rgba(27, 27, 27, 0.08);
}

/* Kleines angeheftetes Foto */
.note-has-photo {
  padding-right: 7.25rem;
}

.note-photo {
  position: absolute;
  top: -10px;
  right: -14px;
  display: block;
  padding: 4px 4px 14px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(27, 27, 27, 0.22);
  transform: rotate(var(--photo-tilt, 4deg));
  transition: transform 0.2s ease;
}

.note-photo:hover {
  transform: rotate(0deg) scale(1.06);
}

.note-photo img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.note-text {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.note-meta {
  margin: 0.9rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.note-author {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.25rem;
  color: rgba(27, 27, 27, 0.8);
}

.note-date {
  font-size: 0.75rem;
  color: rgba(27, 27, 27, 0.5);
}

.notes-empty {
  margin-top: 3rem;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
}

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

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

@media (max-width: 560px) {
  .countdown-cell {
    min-width: 68px;
    padding: 0.65rem 0.6rem;
  }
  .countdown-sep {
    display: none;
  }
  .form-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
