:root {
  color-scheme: light;
  --ink: #1c6f86;
  --text: #2f7185;
  --muted: #6e9bad;
  --bg: #fbfaf8;
  --bg-soft: #eef5f8;
  --paper-blue: #c2d9ee;
  --line: rgba(65, 139, 162, 0.2);
  --leaf: #6f9488;
  --leaf-dark: #315f62;
  --rose: #d01867;
  --rose-dark: #9e174f;
  --navy: #17495e;
  --focus: #8dbad4;
  --danger: #ad2c4b;
  --success: #497f61;
  --radius: 8px;
  --shadow: 0 22px 70px rgba(38, 93, 113, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(251, 250, 248, 0.96), rgba(238, 245, 248, 0.9)),
    var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 17px;
  line-height: 1.56;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.25rem, 4vw, 4rem);
}

.hero__image,
.hero__shade,
.hero__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: 50% 28%;
  z-index: -3;
  filter: saturate(0.88) contrast(1.02) brightness(1.06);
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(251, 250, 248, 0.94) 0%, rgba(251, 250, 248, 0.74) 39%, rgba(251, 250, 248, 0.06) 100%),
    linear-gradient(180deg, rgba(251, 250, 248, 0.1) 0%, rgba(251, 250, 248, 0.18) 50%, rgba(251, 250, 248, 0.98) 100%);
}

.hero__grain {
  z-index: -1;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: soft-light;
}

.hero__content {
  max-width: 720px;
  padding-bottom: min(6vh, 4rem);
  animation: reveal 900ms ease-out both;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: 0.92;
  color: var(--ink);
  font-style: italic;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  font-style: italic;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.hero__copy {
  max-width: 58ch;
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.hero__meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  color: var(--navy);
  font-size: 1.02rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.78rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button--primary {
  background: linear-gradient(135deg, #7fb1ca, #4f8eab);
  color: #fff;
  box-shadow: 0 14px 36px rgba(79, 142, 171, 0.24);
}

.button--secondary {
  background: rgba(194, 217, 238, 0.46);
  border-color: var(--line);
  color: var(--navy);
}

.button--ghost {
  min-height: 42px;
  background: transparent;
  border-color: rgba(65, 139, 162, 0.32);
  color: var(--ink);
}

main {
  position: relative;
  z-index: 1;
}

.intro,
.rsvp {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
}

.intro__text p {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.7vw, 1.16rem);
}

.intro__details,
.payment-info {
  align-self: end;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.intro__details > div,
.payment-info > div {
  display: grid;
  gap: 0.25rem;
}

.detail__label {
  color: var(--muted);
  font-size: 0.9rem;
}

.copy-pix {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.rsvp__header {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.rsvp__header p {
  color: var(--muted);
  font-size: clamp(1.06rem, 1.7vw, 1.16rem);
}

.rsvp-form,
.success-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.honeypot {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field,
.dynamic-block,
.choice-group {
  margin: 0 0 1.25rem;
}

label,
legend {
  color: var(--navy);
  font-weight: 700;
}

.field label,
.name-row span,
legend {
  display: block;
  margin-bottom: 0.45rem;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  padding: 0.8rem 0.9rem;
  outline: 0;
}

input[type="text"]::placeholder {
  color: rgba(47, 113, 133, 0.56);
}

input[type="text"]:focus,
.choice-card:has(input:focus-visible),
.button:focus-visible,
.icon-button:focus-visible,
.copy-pix:focus-visible {
  outline: 3px solid rgba(141, 186, 212, 0.42);
  outline-offset: 3px;
}

.choice-group {
  border: 0;
  padding: 0;
}

.choice-card {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.choice-card + .choice-card {
  margin-top: 0.65rem;
}

.choice-card:has(input:checked) {
  border-color: rgba(65, 139, 162, 0.62);
  background: rgba(194, 217, 238, 0.48);
}

.choice-card input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--rose);
}

.block-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.block-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.name-list {
  display: grid;
  gap: 0.75rem;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 0.65rem;
  align-items: end;
}

.icon-button {
  width: 44px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(194, 217, 238, 0.22);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.summary div {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: rgba(238, 245, 248, 0.7);
}

.payment-action {
  display: grid;
  gap: 0.8rem;
  margin-top: -0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(194, 217, 238, 0.24);
}

.payment-action p {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
}

.summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.summary strong {
  font-size: 1.1rem;
}

.form-message {
  min-height: 1.5rem;
  color: var(--muted);
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-success {
  color: var(--success);
}

.form-actions {
  display: grid;
  gap: 0.75rem;
}

.success-panel {
  align-self: start;
}

.success-panel p:not(.eyebrow) {
  color: var(--muted);
}

.footer {
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

@media (max-width: 820px) {
  .hero {
    min-height: 92svh;
    align-items: end;
  }

  .hero__image {
    object-position: 50% 20%;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(251, 250, 248, 0.08) 0%, rgba(251, 250, 248, 0.42) 42%, rgba(251, 250, 248, 0.98) 100%),
      linear-gradient(90deg, rgba(251, 250, 248, 0.76), rgba(251, 250, 248, 0.2));
  }

  .intro,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .rsvp__header {
    position: static;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .block-heading,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1rem;
  }

  .hero__meta span {
    width: 100%;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
