* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root {
  --bg-1: #fff7f0;
  --bg-2: #ffe8f2;
  --accent-1: #ff7eb3;
  --accent-2: #ff758c;
  --accent-soft: #ffc2d7;
  --accent-bg: #fff4f8;
  --text: #2a2a2a;
  --text-soft: #666;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 30px 20px 80px;
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 30px;
}

/* ---------- COUNTDOWN ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px auto 30px;
}

.countdown-item {
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 72px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-item .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.countdown-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-top: 4px;
}

/* ---------- PHOTO ---------- */
.photo {
  margin: 30px auto 0;
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: white;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- SCROLL CUE ---------- */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 28px;
  padding: 6px 14px;
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  opacity: 0.9;
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.scroll-cue:hover {
  opacity: 1;
  transform: translateY(2px);
}

.scroll-cue-arrow {
  width: 32px;
  height: 32px;
  animation: scrollCueFloat 1.8s ease-in-out infinite;
}

@keyframes scrollCueFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-cue-arrow {
    animation: none;
  }
}

/* ---------- CARD ---------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.gift-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.gift-description {
  margin-bottom: 18px;
  opacity: 0.85;
}

/* ---------- PROGRESS ---------- */
.progress-wrapper {
  background: #f0f0f0;
  border-radius: 50px;
  overflow: hidden;
  height: 24px;
  margin-bottom: 10px;
}

.progress {
  height: 100%;
  width: 0;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-label {
  font-variant-numeric: tabular-nums;
}

.stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--text-soft);
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
button {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-contribute {
  background: #222;
  color: white;
  padding: 14px 22px;
  border-radius: 14px;
}

.btn-contribute:hover {
  transform: scale(1.03);
  background: #000;
}

.btn-contribute:active {
  transform: scale(0.98);
}

/* ---------- IBAN DIALOG ---------- */
.iban-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 520px;
  width: calc(100% - 32px);
  margin: 0;
  padding: 28px 28px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent-bg);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  overflow: visible;
}

.iban-dialog[open] {
  animation: dialogIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.iban-dialog::backdrop {
  background: rgba(40, 20, 30, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: backdropIn 0.28s ease;
}

.iban-dialog h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
  padding-right: 30px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.dialog-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

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

.iban {
  flex: 1 1 240px;
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: bold;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
  letter-spacing: 0.03em;
}

.btn-copy {
  background: var(--accent-2);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-copy:hover {
  transform: scale(1.03);
}

.btn-copy.is-copied {
  background: #2bb673;
}

.iban-meta {
  margin-top: 8px;
  font-size: 0.95rem;
}

.bank-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 16px 0 4px;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  font-size: 0.95rem;
  align-items: baseline;
}

.bank-details dt {
  color: var(--text-soft);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.bank-details dd {
  font-weight: 600;
  word-break: break-word;
}

.bank-details code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
  font-weight: 700;
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 50px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .progress {
    transition: none;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .container {
    padding: 20px 14px 60px;
  }

  .countdown-item {
    min-width: 64px;
    padding: 10px 12px;
  }

  .countdown-item .num {
    font-size: 1.4rem;
  }

  .stats {
    flex-direction: column;
    gap: 4px;
  }

  .iban-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    width: 100%;
  }

  .iban-dialog {
    padding: 24px 20px 20px;
  }

  .iban-dialog h3 {
    font-size: 1.15rem;
  }
}
