:root {
  --ivory: #fbf7ef;
  --paper: #fffdf8;
  --ink: #24302d;
  --muted: #647169;
  --sage: #748268;
  --sage-dark: #4f604f;
  --blue: #8eb3c5;
  --blue-dark: #476d7b;
  --brown: #8c6649;
  --caramel: #bd925f;
  --line: rgba(79, 96, 79, 0.22);
  --shadow: 0 24px 60px rgba(36, 48, 45, 0.16);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--ivory);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(142, 179, 197, 0.24), transparent 32rem),
    linear-gradient(180deg, var(--ivory), #eef4ef 58%, #f7efe4);
  min-width: 320px;
}

main {
  overflow: hidden;
}

.invite-hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  background:
    linear-gradient(180deg, rgba(251, 247, 239, 0.6) 0%, rgba(251, 247, 239, 0.42) 48%, rgba(251, 247, 239, 0.82) 100%),
    url("assets/botez-balloons-bg.png") center / cover no-repeat;
  isolation: isolate;
}

.hero-shade {
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  background: linear-gradient(180deg, transparent, rgba(251, 247, 239, 0.9));
  z-index: -1;
}

.invite-copy {
  width: min(42rem, 100%);
  padding-top: clamp(1rem, 4vh, 3rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prince-line {
  margin: 0 0 0.45rem;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-style: italic;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  margin-inline: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 8.8vw, 6.2rem);
  line-height: 0.94;
  text-wrap: balance;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.65rem);
  line-height: 1;
}

.lede {
  max-width: 36rem;
  margin: 0.9rem auto 1.2rem;
  color: #33413c;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.55;
}

.event-lines {
  display: grid;
  gap: 0.35rem;
  max-width: 38rem;
  margin: 0 auto 1rem;
  color: #2f3c38;
  text-align: left;
}

.event-lines p {
  margin: 0;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  line-height: 1.45;
}

.event-lines span {
  display: inline-block;
  min-width: 10.8rem;
  color: var(--sage-dark);
  font-weight: 800;
}

.closing-line {
  margin: 0 auto 0.55rem;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-style: italic;
  font-weight: 700;
}

.kids-note {
  max-width: 38rem;
  margin: 0 auto 1.15rem;
  color: #42514b;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-action,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sage-dark), var(--blue-dark));
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(71, 109, 123, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-action {
  padding: 0.85rem 1.25rem;
}

.submit-button {
  width: 100%;
  padding: 0.95rem 1.2rem;
}

.hero-action:hover,
.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(71, 109, 123, 0.34);
}

.rsvp-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(238, 244, 239, 0.94)),
    radial-gradient(circle at 92% 15%, rgba(189, 146, 95, 0.18), transparent 20rem);
}

.section-copy {
  align-self: start;
  max-width: 30rem;
  padding-top: 0.4rem;
}

.section-copy p:last-child {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.rsvp-form {
  display: grid;
  gap: 1.1rem;
  width: min(100%, 46rem);
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid rgba(79, 96, 79, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

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

label,
.field-group {
  min-width: 0;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 750;
}

label > span,
legend {
  font-size: 0.92rem;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid rgba(79, 96, 79, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  outline: none;
}

input,
select {
  padding: 0 0.85rem;
}

textarea {
  resize: vertical;
  padding: 0.8rem 0.85rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(142, 179, 197, 0.26);
}

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

.option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.option-card {
  position: relative;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  border: 1px solid rgba(79, 96, 79, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, rgba(238, 244, 239, 0.68));
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option-card input {
  position: absolute;
  inset: 0;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  appearance: none;
  opacity: 0;
  cursor: pointer;
}

.option-card span {
  position: relative;
  z-index: 1;
  overflow-wrap: anywhere;
}

.option-card:has(input:checked) {
  border-color: var(--blue-dark);
  background: linear-gradient(135deg, rgba(142, 179, 197, 0.32), rgba(116, 130, 104, 0.26));
  box-shadow: inset 0 0 0 2px rgba(71, 109, 123, 0.18);
}

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

.attending-only.is-disabled {
  display: none;
}

.form-status {
  min-height: 1.45rem;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.form-status.success {
  color: var(--sage-dark);
}

.form-status.error {
  color: #8a4a31;
}

@media (max-width: 860px) {
  .invite-hero {
    min-height: 88svh;
    align-items: end;
    justify-items: start;
    padding: 5rem 1.1rem 3rem;
    background:
      linear-gradient(180deg, rgba(251, 247, 239, 0.36) 0%, rgba(251, 247, 239, 0.82) 48%, rgba(251, 247, 239, 0.98) 100%),
      url("assets/botez-balloons-bg.png") center top / cover no-repeat;
  }

  .invite-copy {
    text-align: left;
  }

  h1 {
    max-width: 10ch;
    margin-inline: 0;
  }

  .event-lines span {
    display: block;
    min-width: 0;
    margin-bottom: 0.15rem;
  }

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

  .rsvp-form {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .form-grid,
  .option-grid.two,
  .option-grid.three {
    grid-template-columns: 1fr;
  }

  .rsvp-section {
    padding-inline: 0.85rem;
  }

  .rsvp-form {
    padding: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
