@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202435;
  background-color: #f4f5fb;
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #fef3f6, #f4f5fb);
  min-height: 100vh;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem min(4vw, 3rem);
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.6);
  z-index: 30;
}

.site-nav nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e2130;
}

.inline-form {
  display: inline;
}

.pill-link {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  background: #1e2130;
  color: #fff;
}

.confetti-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.confetti-piece {
  position: absolute;
  top: -10%;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.85;
  animation: confetti-fall linear infinite;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -100%, 0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translate3d(50px, 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: #7845d8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.flash-stack {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem;
}

.flash {
  margin: 0 auto 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  max-width: 600px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.flash.notice {
  background-color: #dff5ea;
  color: #0d7b4e;
}

.flash.alert {
  background-color: #ffe9e5;
  color: #c34035;
}

.landing-shell,
.rsvp-shell {
  width: min(1200px, calc(100% - 3rem));
  margin: 2rem auto 4rem;
  display: grid;
  gap: 1.5rem;
}

.auth-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 3rem auto 4rem;
}

.card {
  background: #fff;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(32, 36, 53, 0.08);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, #ffe6f1, #f1f0ff);
}

.hero-photo {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(255, 87, 139, 0.25);
}

.hero-copy h1 {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: #7a6c94;
  margin-bottom: 0.3rem;
}

.tagline {
  font-weight: 500;
  color: #4b4664;
  margin-bottom: 1rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b7f92;
}

.value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e2130;
}

.hero-description {
  margin-top: 0;
  color: #403d52;
}

.body-text {
  margin: 0;
  color: #4b4f63;
}

.rsvp-greeting {
  font-size: 1.3rem;
  font-weight: 600;
  color: #202435;
  margin-bottom: 0.8rem;
}

.rsvp-intro {
  margin: 0 0 0.8rem;
  color: #4b4f63;
}

.grid.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.details-list {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.details-list div {
  background: #f7f6ff;
  padding: 0.8rem 1rem;
  border-radius: 16px;
}

.map-card .map-embed {
  margin-top: 1rem;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.host-bar {
  background: #1e2130;
  border-radius: 22px;
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.host-bar .value {
  color: #fff;
}

.host-bar a {
  color: #fadb5f;
}

.guest-card {
  padding: 2.5rem;
}

.guest-overview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.guest-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #edf2ff;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #3e3f7a;
}

.avatar--extra {
  background: #7845d8;
  color: #fff;
}

.ghost-link {
  border: none;
  background: transparent;
  color: #7845d8;
  font-weight: 600;
  cursor: pointer;
}

.ghost-link.danger {
  color: #c34035;
}

.guest-expansion {
  margin-top: 1.5rem;
  border-top: 1px solid #ececf5;
  padding-top: 1.5rem;
}

.guest-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.invite-template code {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: #f2f3f7;
  border-radius: 999px;
  font-size: 0.9rem;
}

.guest-list summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #ececf5;
}

.guest-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.guest-row {
  border: 1px solid #ececf5;
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.guest-row__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.guest-row .name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.guest-row .email {
  margin: 0.2rem 0 0;
  color: #7b7f92;
  font-size: 0.9rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill--attending {
  background: #dff5ea;
  color: #0d7b4e;
}

.status-pill--maybe {
  background: #fff3cd;
  color: #a57102;
}

.status-pill--declined {
  background: #ffe0e0;
  color: #c34035;
}

.status-pill--pending {
  background: #e3e6ff;
  color: #4947a2;
}

.guest-row dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.guest-row dt {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9fb8;
}

.guest-row dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.guest-note {
  margin: 0;
  background: #f9f9ff;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  color: #4b4f63;
}

.invite-link {
  margin: 0;
  font-size: 0.9rem;
  color: #7b7f92;
}

.muted {
  font-size: 0.85rem;
  color: #9a9fb8;
}

.helper-text {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #7b7f92;
}

.rsvp-shell {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rsvp-hero {
  background: linear-gradient(120deg, #ffe9f2, #eef1ff);
}

.rsvp-poster {
  margin: 1rem 0 1.5rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(120, 69, 216, 0.15);
  box-shadow: 0 20px 35px rgba(30, 24, 66, 0.12);
}

.rsvp-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.rsvp-meta {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.rsvp-form-card form {
  display: grid;
  gap: 1.25rem;
}

.form-field label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
}

.form-field input[type="number"],
.form-field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #d8d9e7;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.form-field textarea {
  resize: vertical;
}

.stacked-form {
  display: grid;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-errors {
  background: #ffe9e5;
  border: 1px solid #ffc2b3;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  color: #a12d2d;
}

.form-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.3rem;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.edit-event-card {
  padding: clamp(1.5rem, 2vw, 3rem);
}

.guest-manage-card {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 2vw, 3rem);
}

.guest-table-wrapper {
  overflow-x: auto;
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.guest-table th,
.guest-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #ebeef5;
  text-align: left;
}

.guest-table th {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7b7f92;
}

.guest-table td {
  vertical-align: top;
}

.note-cell {
  max-width: 220px;
  white-space: pre-line;
}

.link-cell {
  min-width: 180px;
}

.small {
  font-size: 0.8rem;
}

.guest-table td .small {
  display: block;
}

.new-guest-form {
  border-top: 1px solid #ebeef5;
  padding-top: 1.5rem;
}

.stacked-form.compact {
  gap: 0.9rem;
}

.new-guest-row {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ececf5;
}

.primary-btn.full-width {
  width: 100%;
}

.import-row {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #d8d9e7;
  display: grid;
  gap: 0.8rem;
}

.send-row {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #d8d9e7;
  display: grid;
  gap: 0.8rem;
}

.radios label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-weight: 500;
}

.thanks-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 33, 48, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 40;
}

.thanks-modal--visible {
  opacity: 1;
  pointer-events: all;
}

.thanks-content {
  background: #fff;
  padding: 2rem;
  border-radius: 24px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(30, 33, 48, 0.25);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid #d8d9e7;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chip input {
  accent-color: #7845d8;
}

.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  background: linear-gradient(120deg, #ff7abc, #7845d8);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  justify-self: flex-start;
  box-shadow: 0 15px 35px rgba(120, 69, 216, 0.35);
}

.primary-btn:hover {
  opacity: 0.95;
}

.age-fields {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.age-input {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}

.age-input input {
  width: 120px;
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .host-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .guest-row__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .age-input input {
    width: 100%;
  }
}
