* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 193, 72, .34), transparent 30rem),
    radial-gradient(circle at right 12rem, rgba(16, 169, 111, .18), transparent 26rem),
    linear-gradient(180deg, #ffd9e8 0%, #fff9fb 42%, #e9fff5 100%);
  color: #562146;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(255, 249, 252, .88);
  border-bottom: 1px solid rgba(236, 61, 152, .14);
  backdrop-filter: blur(14px);
}

.topbar a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #9c1d62;
}

.topbar a:hover {
  background: #ffe5ef;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 61px);
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: 24px 0 40px;
}

.invite-frame {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(196, 57, 132, .24);
  background: #fff;
}

.invite {
  width: 100%;
  display: block;
}

.hero-content {
  max-width: 580px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #118858;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 8vw, 92px);
  line-height: .9;
  color: #e73591;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  color: #d92482;
}

h3 {
  margin: 10px 0 8px;
  font-size: 21px;
  line-height: 1.12;
  color: #9c1d62;
}

.lead {
  max-width: 520px;
  margin: 18px 0 24px;
  font-size: 23px;
  line-height: 1.35;
  color: #6c315c;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.countdown div {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border-radius: 8px;
  background: #fff8df;
  border: 1px solid rgba(255, 191, 53, .5);
  box-shadow: 0 14px 34px rgba(196, 57, 132, .1);
}

.countdown strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  color: #e73591;
}

.countdown span {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #118858;
}

.countdown p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #7b476d;
  font-weight: 700;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}

.summary div,
.panel,
.memory-card,
.message-section {
  border: 1px solid rgba(236, 61, 152, .18);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 45px rgba(196, 57, 132, .12);
}

.summary div {
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
}

.summary span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #118858;
}

.summary strong {
  display: block;
  font-size: 18px;
  line-height: 1.18;
  color: #562146;
}

.actions,
.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.official-link {
  width: fit-content;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(17, 136, 88, .22);
  border-radius: 8px;
  background: rgba(232, 255, 241, .78);
}

.official-link span,
.official-link strong {
  display: block;
}

.official-link span {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #118858;
}

.official-link strong {
  font-size: 22px;
  line-height: 1.1;
  color: #e73591;
}

.button-stack {
  margin-top: 18px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #ffc4df;
  border-radius: 999px;
  background: #ffe3ef;
  color: #a11462;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.btn.primary {
  background: #ec3d98;
  border-color: #ec3d98;
  color: #fff;
}

.btn.map {
  background: #e8fff1;
  border-color: #bdf4d0;
  color: #177245;
}

.btn.rsvp {
  background: #fff8df;
  border-color: #ffd878;
  color: #7a4f00;
}

.btn.disabled {
  cursor: not-allowed;
  background: #f3eef2;
  border-color: #e5d8e0;
  color: #8d7885;
  pointer-events: none;
}

.section {
  padding: 54px 0;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-height: 100%;
  padding: 24px;
  border-radius: 8px;
}

.panel p,
.memory-card p,
.message-section p {
  margin: 0;
  line-height: 1.55;
  color: #6c315c;
}

.panel h2 {
  font-size: 28px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading p:last-child {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: #6c315c;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.memory-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 8px;
}

.memory-card .btn {
  width: 100%;
  margin-top: auto;
}

.memory-card.accent {
  background: #fff8df;
  border-color: rgba(255, 191, 53, .5);
}

.party-live .memory-card.accent {
  background: #e8fff1;
  border-color: #9be7bd;
}

.party-finished .memory-card {
  background: rgba(255, 255, 255, .92);
}

.icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(236, 61, 152, .14);
}

.message-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  padding: 28px;
  border-radius: 8px;
}

.message-section > div {
  max-width: 720px;
}

@media (max-width: 920px) {
  .hero,
  .details-grid,
  .memory-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    max-width: none;
  }

  .summary,
  .message-section {
    grid-column: 1 / -1;
  }

  .message-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  main {
    width: min(100% - 20px, 1120px);
  }

  .hero,
  .details-grid,
  .memory-grid,
  .summary,
  .countdown {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 16px;
  }

  h1 {
    font-size: 58px;
  }

  .lead {
    font-size: 20px;
  }

  .actions .btn,
  .button-stack .btn,
  .message-section .btn {
    width: 100%;
  }
}
