:root {
  --paper: #d9ddd8;
  --paper-light: #f7f4ee;
  --olive: #565a2d;
  --mustard: #d1aa55;
  --terracotta: #b83f2a;
  --line: rgba(86, 90, 45, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--olive);
  background: var(--paper);
  font-family: "arpona", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.rsvp-nav {
  min-height: 94px;
  padding: 8px clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid rgba(86, 90, 45, 0.18);
}

.rsvp-brand {
  width: 132px;
  height: 72px;
  display: block;
}

.rsvp-brand img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.rsvp-back,
.eyebrow,
.rsvp-meta small,
.rsvp-footer span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rsvp-back {
  padding: 14px 0;
  border-bottom: 1px solid currentColor;
}

.rsvp-hero {
  min-height: 780px;
  padding: clamp(70px, 8vw, 118px) clamp(24px, 6vw, 92px) 58px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
}

.rsvp-hero::after,
.rsvp-form-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/rf-paper.webp") center top / max(1080px, 100vw) auto repeat-y;
  opacity: 0.08;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.rsvp-hero-inner {
  width: min(100%, 1380px);
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(390px, 0.82fr) minmax(480px, 1.18fr);
  align-items: center;
  gap: clamp(44px, 6vw, 104px);
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 30px;
  color: var(--terracotta);
}

.rsvp-hero h1 {
  margin: 0;
  font-size: clamp(4.8rem, 7.7vw, 8.1rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.rsvp-hero h1 span {
  margin: 18px 0 0 0.42em;
  display: block;
  color: var(--terracotta);
  font-family: "adobe-handwriting-ernie", cursive;
  font-size: 0.88em;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.rsvp-lead {
  max-width: 500px;
  margin: 42px 0 38px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.45;
}

.rsvp-primary {
  min-width: 300px;
  min-height: 62px;
  padding: 17px 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-light);
  background: var(--olive);
  border: 1px solid var(--olive);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.rsvp-primary:hover {
  color: var(--olive);
  background: transparent;
  transform: translateY(-2px);
}

.rsvp-artwork {
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.rsvp-artwork img {
  width: 126%;
  max-width: none;
  margin-left: -13%;
  display: block;
}

.rsvp-meta {
  width: min(100%, 1380px);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 0.8fr 0.55fr 1.65fr;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rsvp-meta p {
  min-width: 0;
  margin: 0;
  padding: 22px clamp(16px, 2.4vw, 34px);
  display: grid;
  gap: 8px;
  border-right: 1px solid var(--line);
}

.rsvp-meta p:first-child {
  padding-left: 0;
}

.rsvp-meta p:last-child {
  padding-right: 0;
  border-right: 0;
}

.rsvp-meta small {
  color: var(--terracotta);
}

.rsvp-meta strong {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.rsvp-form-section {
  padding: clamp(84px, 9vw, 132px) clamp(12px, 5vw, 72px) clamp(90px, 9vw, 140px);
  position: relative;
  isolation: isolate;
  background: var(--paper);
}

.rsvp-form-heading,
.form-embed {
  position: relative;
  z-index: 1;
}

.rsvp-form-heading {
  width: min(100%, 820px);
  margin: 0 auto 56px;
  text-align: center;
}

.rsvp-form-heading h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  line-height: 1.02;
}

.rsvp-form-heading > p:not(.eyebrow) {
  margin: 30px 0 20px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.5;
}

.rsvp-form-heading a {
  display: inline-block;
  padding: 7px 0;
  color: var(--terracotta);
  border-bottom: 1px solid currentColor;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-embed {
  width: min(100%, 900px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper-light);
  border: 1px solid rgba(86, 90, 45, 0.26);
  box-shadow: none;
}

.form-embed iframe {
  width: 100%;
  height: 1520px;
  display: block;
  border: 0;
}

.rsvp-footer {
  min-height: 130px;
  padding: 28px clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  color: var(--paper-light);
  background: var(--olive);
  text-align: center;
}

.rsvp-footer strong {
  font-family: "adobe-handwriting-ernie", cursive;
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 0.8;
}

.rsvp-footer span:first-child {
  text-align: left;
}

.rsvp-footer span:last-child {
  text-align: right;
}

.rsvp-back:focus-visible,
.rsvp-primary:focus-visible,
.rsvp-form-heading a:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 5px;
}

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

@media (max-width: 820px) {
  .rsvp-nav {
    min-height: 84px;
    padding: 6px 18px;
  }

  .rsvp-brand {
    width: 104px;
    height: 64px;
  }

  .rsvp-back {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .rsvp-hero {
    min-height: auto;
    padding: 72px 20px 46px;
  }

  .rsvp-hero-inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .rsvp-hero-copy {
    text-align: center;
  }

  .rsvp-hero h1 {
    font-size: clamp(4.2rem, 20vw, 6.4rem);
  }

  .rsvp-hero h1 span {
    margin-left: 0.2em;
  }

  .rsvp-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .rsvp-primary {
    min-width: min(100%, 330px);
    min-height: 60px;
  }

  .rsvp-artwork {
    min-height: 250px;
  }

  .rsvp-artwork img {
    width: 140%;
    margin-left: -20%;
  }

  .rsvp-meta {
    margin-top: 26px;
    grid-template-columns: 1fr;
  }

  .rsvp-meta p,
  .rsvp-meta p:first-child,
  .rsvp-meta p:last-child {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }

  .rsvp-meta p:last-child {
    border-bottom: 0;
  }

  .rsvp-form-section {
    padding: 72px 8px 80px;
  }

  .rsvp-form-heading {
    width: calc(100% - 32px);
    margin-bottom: 42px;
  }

  .form-embed {
    width: 100%;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .form-embed iframe {
    height: 1640px;
  }

  .rsvp-footer {
    min-height: 190px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rsvp-footer span:first-child,
  .rsvp-footer span:last-child {
    text-align: center;
  }
}

@media (max-width: 390px) {
  .rsvp-back {
    max-width: 150px;
    text-align: right;
  }

  .rsvp-artwork {
    min-height: 215px;
  }

  .form-embed iframe {
    height: 1700px;
  }
}
