:root {
  --royal: #003f98;
  --royal-dark: #002f73;
  --blue-mid: #6f86b8;
  --blue-light: #8fa1cd;
  --mist: #eef2fa;
  --silver: #d8d8d8;
  --ink: #1f2937;
  --muted: #5e6675;
  --paper: #fffdfb;
  --shadow: 0 24px 60px rgba(0, 47, 115, 0.12);
  --script: "Allura", "Brush Script MT", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(8.5rem, 12vw, 10rem) 1.25rem clamp(8rem, 11vw, 9.5rem);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.2)),
    image-set(
      url("assets/background-desktop.jpg") type("image/jpeg"),
      url("assets/background-desktop.png") type("image/png")
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  text-align: center;
  margin-top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(111, 134, 184, 0.35);
  border-radius: 999px;
  color: var(--royal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  display: inline-block;
  margin: 1rem 0 0.65rem;
  padding: 0 0.18em;
  color: #071528;
  font-family: var(--script);
  font-size: clamp(4rem, 9vw, 7.1rem);
  font-weight: 400;
  line-height: 0.88;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 30px rgba(0, 47, 115, 0.18);
}

h1::before {
  content: "";
  position: absolute;
  inset: 18% -3% 8%;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.72) 22%,
    rgba(255, 255, 255, 0.72) 78%,
    rgba(255, 255, 255, 0)
  );
  filter: blur(10px);
  pointer-events: none;
}

h2 {
  margin-bottom: 0.75rem;
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.95;
}

h3 {
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: 1.65rem;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem auto 2rem;
  color: var(--royal);
}

.divider span {
  width: min(9rem, 24vw);
  height: 1px;
  background: currentColor;
}

.divider b {
  font-size: 1.05rem;
}

.hero-copy {
  width: min(100%, 720px);
  margin: 0 auto 2.2rem;
  color: #222936;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.55;
}

.hero-copy.confirmed {
  width: min(100%, 660px);
  border: 1px solid rgba(0, 63, 152, 0.18);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  color: var(--royal-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(0, 47, 115, 0.12);
  font-weight: 600;
}

.event-grid,
.cards,
.gift-grid {
  display: grid;
  gap: 1.25rem;
}

.event-grid {
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 850px);
  margin: 0 auto 2.4rem;
}

.event-grid article,
.event-location-card,
.info-card,
.gift-card {
  border: 1px solid rgba(111, 134, 184, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.event-grid article,
.event-location-card {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  min-height: 9rem;
  padding: 1.2rem 1rem;
}

.event-location-card {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.event-location-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 63, 152, 0.48);
  box-shadow: 0 28px 65px rgba(0, 47, 115, 0.18);
}

.event-location-card:focus-visible,
.location-card:focus-visible {
  outline: 3px solid rgba(0, 63, 152, 0.35);
  outline-offset: 4px;
}

svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.event-grid svg {
  color: var(--royal);
}

.event-grid span,
.gift-price,
.gift-status,
.section-heading p,
.info-card p,
.modal p:not(.rsvp-step-title):not(.rsvp-step-copy):not(.rsvp-intro) {
  color: var(--muted);
}

.event-grid strong {
  color: #0d1724;
  font-size: 1.03rem;
}

.event-grid strong span {
  color: inherit;
}

.desktop-date,
.mobile-date {
  white-space: nowrap;
}

.mobile-date {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  border-radius: 8px;
  padding: 0.9rem 1.45rem;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button[hidden],
.hero-actions.is-rsvp-confirmed [data-open-rsvp] {
  display: none !important;
}

.hero-actions:not(.is-rsvp-confirmed) [data-open-rsvp-adjust] {
  display: none !important;
}

.album-invitation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 86% 20%, rgba(143, 161, 205, 0.22), transparent 30%),
    linear-gradient(135deg, #f7f9fd, #fffdfb 62%);
}

.album-invitation-copy {
  max-width: 650px;
}

.album-invitation-copy .eyebrow {
  margin-bottom: 1rem;
}

.album-invitation-lead {
  margin-bottom: 1.35rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 36rem;
}

.album-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 22rem;
}

.album-entry .button {
  width: 100%;
  text-align: center;
}

.album-entry-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.button.is-disabled,
.button.is-disabled:disabled {
  color: #4b5563;
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  opacity: 1;
  cursor: not-allowed;
}

.button.is-disabled:hover:not(:disabled) {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.album-collage {
  position: relative;
  min-height: 360px;
}

.album-frame {
  position: absolute;
  display: grid;
  place-items: center;
  border: 9px solid white;
  border-radius: 6px;
  color: white;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.28), transparent 23%),
    linear-gradient(145deg, var(--royal), var(--blue-light));
  box-shadow: 0 24px 55px rgba(0, 47, 115, 0.2);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 3.2rem);
}

.album-frame-one {
  inset: 15px 22% 70px 0;
  transform: rotate(-4deg);
}

.album-frame-two {
  inset: 95px 0 0 42%;
  transform: rotate(5deg);
  font-size: 1.4rem;
  letter-spacing: 0.12em;
}

.album-frame-three {
  z-index: 1;
  width: 125px;
  height: 150px;
  right: 8%;
  top: 0;
  transform: rotate(8deg);
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary {
  color: white;
  background: var(--royal);
  box-shadow: 0 16px 30px rgba(0, 63, 152, 0.22);
}

.secondary {
  color: var(--royal);
  border-color: rgba(0, 63, 152, 0.45);
  background: rgba(255, 255, 255, 0.86);
}

.section {
  position: relative;
  overflow: hidden;
  padding: 6rem max(1.25rem, calc((100vw - 1180px) / 2));
  background-color: #fbfaf7;
}

.section-heading {
  width: min(100%, 720px);
  margin: 0 auto 3.25rem;
  text-align: center;
}

.section-heading .eyebrow {
  margin-bottom: 0.85rem;
}

.section-heading h2 {
  margin-bottom: 1.1rem;
}

.section-heading p {
  margin-inline: auto;
  font-size: 1.08rem;
  line-height: 1.7;
}

.gift-pix-note {
  width: min(100%, 31rem);
  margin: 1.45rem auto 0;
  padding: 1rem 1.15rem 0.85rem;
  border: 1px solid rgba(111, 134, 184, 0.26);
  border-radius: 12px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.92), transparent 55%),
    linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(238, 242, 250, 0.88));
  box-shadow: 0 14px 32px rgba(0, 47, 115, 0.07);
}

.gift-pix-note__kicker {
  margin: 0 0 0.35rem;
  color: var(--royal-dark);
  font-family: var(--script);
  font-size: clamp(1.35rem, 3.4vw, 1.65rem);
  line-height: 1;
}

.gift-pix-note__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  color: var(--blue-mid);
}

.gift-pix-note__divider span {
  width: min(3.5rem, 12vw);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.gift-pix-note__divider b {
  font-size: 0.75rem;
  font-weight: 400;
}

.gift-pix-note__lead,
.gift-pix-note__text {
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: 0.86rem;
  line-height: 1.48;
  font-weight: 500;
}

.gift-pix-note__lead {
  margin: 0 0 0.4rem;
}

.gift-pix-note__text {
  margin: 0 0 0.6rem;
}

.gift-pix-note__highlight {
  color: var(--royal-dark);
  font-size: inherit;
  font-weight: 600;
}

.gift-pix-note__text strong {
  color: var(--royal-dark);
  font-weight: 600;
}

.gift-pix-note__sign {
  margin: 0;
  color: var(--royal);
  font-family: var(--script);
  font-size: clamp(1.22rem, 2.8vw, 1.42rem);
  line-height: 1.05;
}

.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

.info-card {
  padding: 2rem;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  color: white;
  background: var(--royal);
}

.info-card strong {
  display: block;
  margin: -0.45rem 0 1rem;
  color: var(--royal);
  font-size: 1.25rem;
}

.location-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem;
  width: min(100%, 920px);
  margin: 1.5rem auto 0;
  border: 1px solid rgba(0, 63, 152, 0.2);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  overflow: hidden;
  color: inherit;
  background:
    radial-gradient(circle at 0 0, rgba(143, 161, 205, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 250, 0.92));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.location-card::after {
  position: absolute;
  inset: 0 0 0 auto;
  width: 5px;
  background: linear-gradient(180deg, var(--royal), var(--blue-light));
  content: "";
}

.location-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 63, 152, 0.42);
  box-shadow: 0 30px 70px rgba(0, 47, 115, 0.17);
}

.location-pin {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--royal), var(--royal-dark));
  box-shadow: 0 14px 28px rgba(0, 63, 152, 0.24);
}

.location-pin svg {
  width: 1.75rem;
  height: 1.75rem;
}

.location-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.location-kicker {
  color: var(--royal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.location-copy strong {
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.05;
}

.location-address {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.location-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--royal);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(0, 63, 152, 0.2);
}

.location-action svg {
  width: 1.1rem;
  height: 1.1rem;
}

.gifts {
  background: linear-gradient(180deg, #fbfaf7 0%, #eef2fa 100%);
}

.gift-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: -1rem auto 3rem;
}

.filter-button {
  min-height: 2.55rem;
  border: 1px solid rgba(0, 63, 152, 0.22);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--royal-dark);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.filter-button:hover,
.filter-button.active {
  color: white;
  background: var(--royal);
}

.filter-button:hover {
  transform: translateY(-1px);
}

.gift-sections {
  display: grid;
  gap: 3.25rem;
}

.gift-message {
  width: min(100%, 42rem);
  margin: 0 auto;
  border: 1px solid rgba(0, 63, 152, 0.16);
  border-radius: 8px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: var(--shadow);
}

.gift-message h3 {
  margin-bottom: 0.7rem;
}

.gift-message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.gift-section > h3 {
  margin: 0 0 1.25rem;
  color: var(--royal-dark);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.gift-grid {
  grid-template-columns: repeat(3, 1fr);
}

.gift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 20rem;
  padding: 1.5rem;
  overflow: hidden;
}

.gift-card::after {
  content: "";
  position: absolute;
  right: -2.4rem;
  top: -2.4rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: rgba(143, 161, 205, 0.16);
}

.gift-icon {
  position: relative;
  z-index: 1;
  width: 3.3rem;
  height: 3.3rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  color: var(--royal);
  background: var(--mist);
}

.gift-image {
  position: absolute;
  top: 1.25rem;
  right: 1rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(6.5rem, 36%, 9.5rem);
  height: 7.4rem;
  margin: 0;
  overflow: visible;
  background: transparent;
  pointer-events: none;
}

.gift-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.15rem;
}

.gift-card.has-image .gift-icon,
.gift-card.has-image .gift-card-main {
  max-width: 62%;
}

.gift-card-main {
  position: relative;
  z-index: 1;
}

.gift-category {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--blue-mid);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gift-card h4 {
  margin: 0 0 0.45rem;
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.05;
}

.gift-price {
  margin-bottom: 0.9rem;
  color: var(--royal);
  font-size: 1.1rem;
  font-weight: 600;
}

.gift-description {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.55;
}

.image-description {
  max-width: 100%;
  margin-top: 0.65rem;
}

.quota-options {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.15rem 0 1rem;
}

.quota-options span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border: 1px solid rgba(0, 63, 152, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--royal-dark);
  background: #eef2fa;
  font-size: 0.78rem;
  font-weight: 800;
}

.open-card {
  border-color: rgba(0, 63, 152, 0.28);
  background:
    radial-gradient(circle at 100% 0, rgba(143, 161, 205, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.88);
}

.gift-open-total {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  color: var(--royal-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.quota-progress {
  position: relative;
  z-index: 1;
  margin: 0.1rem 0 1rem;
}

.quota-progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--royal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.quota-progress-text strong {
  color: var(--royal);
}

.quota-progress.completed .quota-progress-text strong {
  color: #166534;
}

.quota-progress-bar {
  overflow: hidden;
  height: 0.55rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: #e8edf7;
}

.quota-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--royal), var(--blue-mid));
}

.quota-progress.completed .quota-progress-bar span {
  background: linear-gradient(90deg, #0f6b4f, #4fb477);
}

.quota-progress p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.quota-progress.completed p {
  color: #315d48;
  font-weight: 700;
}

.gift-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.available {
  color: var(--royal-dark);
  background: #e9f1ff;
}

.reserved {
  color: #666;
  background: #eeeeee;
}

.gift-card .button {
  min-height: 2.75rem;
  padding-inline: 1rem;
}

.modal-value {
  margin: 0.75rem 0 0;
  color: var(--royal-dark);
  text-align: center;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.payment-method {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-height: 6.8rem;
  border: 1px solid rgba(0, 63, 152, 0.18);
  border-radius: 8px;
  padding: 0.85rem 0.75rem;
  color: var(--royal-dark);
  background: #fbfdff;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.payment-method:hover:not(:disabled) {
  border-color: rgba(0, 63, 152, 0.42);
  box-shadow: 0 16px 30px rgba(0, 47, 115, 0.12);
  transform: translateY(-1px);
}

.payment-method.selected {
  border-color: rgba(0, 63, 152, 0.68);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(0, 63, 152, 0.12);
}

.payment-method:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.payment-method span {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  color: var(--royal);
  background: var(--mist);
}

.payment-method svg {
  width: 1.25rem;
  height: 1.25rem;
}

.payment-method strong {
  color: var(--royal-dark);
  font-size: 0.96rem;
}

.payment-method small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.payment-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  border: 1px solid rgba(0, 63, 152, 0.25);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  color: var(--royal);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(0, 47, 115, 0.16);
  font-size: 0.86rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.music-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.music-toggle .icon-muted,
.music-toggle.is-muted .icon-sound {
  display: none;
}

.music-toggle.is-muted .icon-muted {
  display: block;
}

.footer {
  padding: 4rem 1.25rem;
  text-align: center;
  color: white;
  background: var(--royal-dark);
}

.footer h2 {
  margin: 0.3rem 0 0.5rem;
  color: white;
  font-family: var(--script);
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 400;
}

.footer p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
}

.light {
  color: rgba(255, 255, 255, 0.78);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(4, 18, 39, 0.56);
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  position: relative;
  width: min(100%, 31rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 8px;
  padding: 2.35rem 1.35rem 1.75rem;
  background: white;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.modal-close {
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
}

.modal-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  margin: 0.15rem auto 0.85rem;
  border-radius: 50%;
  color: white;
  background: var(--royal);
}

.modal-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.modal h2 {
  margin: 0 1.75rem 0.65rem;
  text-align: center;
  font-size: clamp(1.65rem, 7vw, 2.2rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.modal > div > p {
  text-align: center;
  line-height: 1.55;
}

.modal label {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  color: var(--royal-dark);
  font-weight: 700;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  border: 1px solid rgba(111, 134, 184, 0.38);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: white;
  font: inherit;
}

.modal input,
.modal select {
  min-height: 3rem;
}

.modal textarea {
  min-height: 5rem;
  resize: vertical;
}

.rsvp-intro {
  margin: 0.25rem 0 1.15rem;
  border-radius: 14px;
  padding: 1rem 1.05rem 1.05rem;
  color: var(--royal-dark) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 161, 205, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(238, 242, 250, 0.95), rgba(255, 255, 255, 0.98));
  font-size: 0.9rem;
  line-height: 1.55 !important;
  text-align: center !important;
}

.rsvp-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.rsvp-progress span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border-radius: 999px;
  padding: 0.45rem 0.45rem;
  color: var(--muted);
  background: rgba(238, 242, 250, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.rsvp-progress span.is-active {
  color: white;
  background: var(--royal);
}

.rsvp-progress span.is-complete {
  color: var(--royal-dark);
  background: rgba(0, 63, 152, 0.12);
}

.rsvp-step-title {
  margin: 0 0 0.45rem;
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5.5vw, 1.55rem);
  line-height: 1.28;
  letter-spacing: 0;
  text-align: left !important;
}

.rsvp-step-copy {
  margin: 0 0 1.05rem;
  color: #3a4656 !important;
  font-size: 0.9rem;
  line-height: 1.5 !important;
  text-align: left !important;
}

.rsvp-option-grid {
  display: grid;
  gap: 0.75rem;
}

.rsvp-option-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon copy";
  gap: 0.2rem 0.85rem;
  align-items: center;
  border: 1px solid rgba(0, 63, 152, 0.14);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: white;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.rsvp-option-card:hover {
  transform: translateY(-1px);
}

.rsvp-option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rsvp-option-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--royal);
  background: rgba(238, 242, 250, 0.95);
  font-size: 1.15rem;
}

.rsvp-option-card strong {
  grid-area: title;
  color: var(--royal-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.rsvp-option-card small {
  grid-area: copy;
  color: #3f4a59;
  font-size: 0.82rem;
  line-height: 1.45;
  padding-right: 0.15rem;
}

.rsvp-option-card:has(input:checked) {
  border-color: rgba(0, 63, 152, 0.42);
  background: rgba(238, 242, 250, 0.88);
  box-shadow: inset 0 0 0 1px rgba(0, 63, 152, 0.08);
}

.rsvp-option-card:has(input:checked) .rsvp-option-icon {
  color: white;
  background: var(--royal);
}

.rsvp-summary {
  margin-bottom: 1rem;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(238, 242, 250, 0.75);
  text-align: left !important;
}

.rsvp-summary-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rsvp-summary strong {
  color: var(--royal-dark);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.25;
}

.rsvp-partner,
.rsvp-children {
  margin-top: 0.15rem;
}

.rsvp-partner[hidden],
.rsvp-children[hidden],
.rsvp-step[hidden],
.rsvp-additional[hidden],
.add-guest-button[hidden],
.rsvp-actions [hidden] {
  display: none !important;
}

.rsvp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.rsvp-actions .button {
  min-height: 2.85rem;
}

.rsvp-actions .button.primary {
  grid-column: 1 / -1;
}

.rsvp-actions [data-rsvp-back]:not([hidden]) {
  grid-column: 1 / 2;
}

.rsvp-actions [data-rsvp-cancel]:not([hidden]) {
  grid-column: 2 / 3;
}

.rsvp-actions [data-rsvp-next]:not([hidden]),
.rsvp-actions [data-rsvp-submit]:not([hidden]) {
  grid-column: 1 / -1;
}

.rsvp-error-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.rsvp-additional {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 63, 152, 0.12);
  padding-top: 0.25rem;
}

.additional-guest-fields {
  display: grid;
  gap: 0.15rem;
}

.additional-guest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.55rem;
}

.additional-guest-row label {
  margin-bottom: 0.35rem;
}

.remove-guest-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(0, 63, 152, 0.22);
  border-radius: 8px;
  color: var(--royal);
  background: white;
  font-size: 1.45rem;
  line-height: 1;
}

.add-guest-button {
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.55rem;
  border: 1px dashed rgba(0, 63, 152, 0.42);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--royal);
  background: rgba(238, 242, 250, 0.64);
  font-weight: 750;
}

.add-guest-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.optional-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.success-title {
  color: var(--royal-dark);
}

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

  .album-collage {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .event-grid,
  .three-columns,
  .gift-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.18)),
      image-set(
        url("assets/background-mobile.jpg") type("image/jpeg"),
        url("assets/background-mobile.png") type("image/png")
      );
    background-position: center top;
  }

  .desktop-date {
    display: none;
  }

  .mobile-date {
    display: inline;
  }
}

@media (max-width: 560px) {
  .album-invitation {
    text-align: center;
  }

  .album-collage {
    min-height: 280px;
  }

  .album-frame-one {
    inset: 15px 18% 55px 0;
  }

  .album-frame-two {
    inset: 80px 0 0 38%;
  }

  .album-frame-three {
    width: 90px;
    height: 110px;
  }

  .hero {
    min-height: 100svh;
    padding: 8.25rem 1rem 8.5rem;
  }

  .hero-content {
    margin-top: 0;
  }

  h1 {
    font-size: 3.4rem;
    line-height: 0.95;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
    margin-bottom: 1.4rem;
  }

  .event-date-card {
    grid-column: 1;
    grid-row: 1;
  }

  .event-countdown-card {
    grid-column: 2;
    grid-row: 1;
  }

  .event-grid .event-location-card {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    min-height: 5.4rem;
    padding: 0.8rem 1rem;
    text-align: left;
  }

  .event-grid .event-location-card > svg {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .event-grid .event-location-card > span {
    grid-column: 2;
    min-height: 0;
    justify-content: flex-start;
  }

  .event-grid .event-location-card > strong {
    grid-column: 2;
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .event-grid article,
  .event-location-card {
    overflow: hidden;
    min-height: 6.8rem;
    padding: 0.65rem 0.35rem;
    gap: 0.32rem;
    border-radius: 8px;
  }

  .event-grid svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .event-grid span {
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    line-height: 1.08;
  }

  .event-grid strong {
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .event-grid .desktop-date {
    display: none !important;
  }

  .event-grid .mobile-date {
    display: inline-flex !important;
    min-height: 0;
    font-size: 0.9rem;
    line-height: 1.1;
  }

  .details .three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .details .info-card {
    min-height: 8.6rem;
    padding: 0.75rem 0.45rem;
  }

  .details .card-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
  }

  .details .info-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .details .info-card strong {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .details .info-card p {
    display: none;
  }

  .location-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
  }

  .location-pin {
    width: 3.15rem;
    height: 3.15rem;
  }

  .location-copy strong {
    font-size: 1.25rem;
  }

  .location-address {
    font-size: 0.78rem;
  }

  .location-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-actions,
  .modal-actions,
  .gift-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-block: 4rem;
  }

  .info-card,
  .gift-card,
  .modal {
    padding: 1.35rem;
  }

  .gift-card.has-image .gift-icon,
  .gift-card.has-image .gift-card-main {
    max-width: calc(100% - 6.9rem);
  }

  .gift-image {
    top: 0.9rem;
    right: 0.65rem;
    width: 6.5rem;
    height: 5.9rem;
  }

  .gift-image img {
    padding: 0.05rem;
  }

}
