:root {
  --purple: #4d075f;
  --purple-dark: #350340;
  --gold: #c9a33b;
  --gold-light: #e7d38a;
  --paper: #fffafd;
  --ink-soft: #6c5270;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(211, 178, 69, .09), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(77, 7, 95, .07), transparent 30%),
    linear-gradient(135deg, #fbf5fb 0%, #fff 48%, #fbf5fb 100%);
  color: var(--purple);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 34px 18px 52px;
}

.invitation-wrap {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invitation-card {
  position: relative;
  width: min(100%, 700px);
  border-radius: 4px;
  box-shadow: 0 30px 70px rgba(77, 7, 95, .13), 0 5px 20px rgba(201, 163, 59, .12);
  overflow: hidden;
  animation: rise .9s ease both;
}

.invitation-card img {
  display: block;
  width: 100%;
  height: auto;
}

.card-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.16) 47%, transparent 55%);
  transform: translateX(-120%);
  animation: shimmer 5s ease-in-out 1.1s infinite;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px auto 0;
  animation: rise .9s .12s ease both;
}

.action {
  appearance: none;
  border: 1px solid rgba(77, 7, 95, .18);
  background: rgba(255, 255, 255, .84);
  color: var(--purple);
  text-decoration: none;
  font: 600 15px/1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .06em;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 7px 20px rgba(77, 7, 95, .08);
}

.action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(77, 7, 95, .13);
  background: #fff;
}

.action.primary {
  color: white;
  background: var(--purple);
  border-color: var(--purple);
}

.countdown {
  width: min(100%, 560px);
  text-align: center;
  margin-top: 34px;
  animation: rise .9s .2s ease both;
}

.countdown-label {
  margin: 0 0 13px;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

.countdown-grid > div {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(201,163,59,.25);
  border-radius: 12px;
  padding: 11px 6px 9px;
}

.countdown-grid strong {
  display: block;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1;
  font-weight: 600;
}

.countdown-grid span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer-note {
  max-width: 590px;
  margin: 28px auto 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
  font-style: italic;
  animation: rise .9s .28s ease both;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 120px);
  background: var(--purple-dark);
  color: white;
  padding: 11px 17px;
  border-radius: 999px;
  font: 500 14px/1.2 system-ui, sans-serif;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  opacity: 0;
  transition: .3s ease;
  z-index: 20;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%, 18% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}

@media (max-width: 520px) {
  .page { padding: 12px 8px 34px; }
  .invitation-card { width: 100%; box-shadow: 0 18px 40px rgba(77,7,95,.13); }
  .actions { padding: 0 8px; gap: 8px; }
  .action { padding: 11px 14px; font-size: 14px; }
  .countdown { padding: 0 8px; margin-top: 26px; }
  .countdown-label { font-size: 12px; }
  .footer-note { padding: 0 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
