:root {
  --rsvp-ink: #07180f;
  --rsvp-deep: #0d2918;
  --rsvp-cream: #f3ead7;
  --rsvp-mist: #b9c6b3;
  --rsvp-red: #bd251c;
  --rsvp-red-light: #e15449;
  --rsvp-gold: #d99201;
  --rsvp-border: rgba(243, 234, 215, 0.2);
}

html {
  scroll-behavior: smooth;
}

body.rsvpPage {
  margin: 0;
  color: var(--rsvp-cream);
  background: var(--rsvp-ink);
}

body.rsvpLocked {
  overflow: hidden;
}

.rsvpNav {
  position: absolute;
}

.rsvpHero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 78svh;
  padding: 10rem 7vw 6rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 24, 15, 0.42), rgba(7, 24, 15, 0.94)),
    url("assets/images/forest-portal.jpg") center 45% / cover no-repeat;
}

.rsvpHero::before,
.rsvpFormSection::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("assets/images/water-ripples.jpg") center / cover no-repeat;
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
}

.rsvpHero h1 {
  max-width: 1200px;
  margin: 1.2rem 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.05em;
}

.rsvpHero h1 span {
  color: var(--rsvp-gold);
}

.rsvpHero > p:last-child {
  max-width: 660px;
  margin: 0;
  color: var(--rsvp-mist);
  font-size: 1.05rem;
  line-height: 1.8;
}

.rsvpFormSection {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(3rem, 7vw, 7rem);
  padding: clamp(5rem, 9vw, 9rem) 7vw;
  background: var(--rsvp-deep);
}

.rsvpFormIntro {
  max-width: 560px;
}

.rsvpFormIntro h2,
.rsvpClosedMessage h2,
.rsvpDressCode h2 {
  margin: 1rem 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.92;
}

.rsvpFormIntro > p {
  color: var(--rsvp-mist);
  line-height: 1.8;
}

.rsvpEventDetails {
  margin-top: 3rem;
  border-top: 1px solid var(--rsvp-border);
}

.rsvpEventDetails p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rsvp-border);
}

.rsvpEventDetails strong {
  color: var(--rsvp-gold);
}

.rsvpEventDetails span {
  color: var(--rsvp-mist);
  text-align: right;
}

.rsvpFormCard {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(6, 18, 11, 0.76);
  border: 1px solid var(--rsvp-border);
  backdrop-filter: blur(10px);
}

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

.rsvpField,
.rsvpConsent {
  min-width: 0;
}

.rsvpFieldFull {
  grid-column: 1 / -1;
}

.rsvpField label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--rsvp-cream);
  font-weight: 700;
}

.rsvpField label span {
  color: var(--rsvp-mist);
  font-size: 0.78rem;
  font-weight: 400;
}

.rsvpField input,
.rsvpField textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  color: var(--rsvp-cream);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rsvp-border);
  border-radius: 0;
  outline: none;
}

.rsvpField textarea {
  resize: vertical;
}

.rsvpField input:focus,
.rsvpField textarea:focus {
  border-color: var(--rsvp-gold);
  box-shadow: 0 0 0 3px rgba(217, 146, 1, 0.12);
}

.rsvpField small {
  display: block;
  margin-top: 0.45rem;
  color: var(--rsvp-mist);
  line-height: 1.5;
}

.rsvpConsent {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem;
  color: var(--rsvp-mist);
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--rsvp-gold);
  line-height: 1.55;
}

.rsvpConsent input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--rsvp-red);
}

.rsvpSubmit {
  width: 100%;
  color: var(--rsvp-cream);
  background: var(--rsvp-red);
  border: 1px solid var(--rsvp-red-light);
  cursor: pointer;
}

.rsvpSubmit:hover,
.rsvpSubmit:focus-visible {
  background: var(--rsvp-red-light);
}

.rsvpDeadline {
  margin: 0;
  color: var(--rsvp-mist);
  font-size: 0.78rem;
  text-align: center;
}

.rsvpClosedMessage,
.rsvpSuccessMessage {
  padding: 2rem 0;
  text-align: center;
}

.rsvpClosedMessage p:not(.kicker),
.rsvpSuccessMessage p:not(.kicker) {
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--rsvp-mist);
  line-height: 1.8;
}

.rsvpSuccessMessage strong {
  display: block;
  margin: 0 auto 2rem;
  color: var(--rsvp-gold);
  font-size: 1.15rem;
}

.rsvpDressCode {
  padding: clamp(5rem, 9vw, 9rem) 7vw;
  color: #25140f;
  background: var(--rsvp-gold);
  text-align: center;
}

.rsvpDressCode p,
.rsvpDressCode strong {
  display: block;
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.8;
}

.rsvpDressCode strong {
  margin-top: 1.5rem;
  padding: 1.2rem;
  color: var(--rsvp-cream);
  background: var(--rsvp-red);
}

/* Merch overlay */

.merchGate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.merchGate[hidden] {
  display: none;
}

.merchGateBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 8, 4, 0.7);
  backdrop-filter: blur(13px);
}

.merchGatePanel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100svh - 2rem);
  padding: clamp(1.4rem, 4vw, 3.5rem);
  overflow-y: auto;
  color: var(--rsvp-cream);
  background:
    linear-gradient(rgba(7, 24, 15, 0.95), rgba(7, 24, 15, 0.98)),
    url("assets/images/water-ripples.jpg") center / cover no-repeat;
  border: 1px solid rgba(217, 146, 1, 0.55);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.merchGateClose {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  color: var(--rsvp-cream);
  background: transparent;
  border: 1px solid var(--rsvp-border);
  font-size: 1.5rem;
  cursor: pointer;
}

.merchGateHeader {
  max-width: 820px;
  margin: 0 auto 2rem;
  text-align: center;
}

.merchGateHeader h2 {
  margin: 0.7rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
}

.merchGateHeader > p:last-child {
  color: var(--rsvp-mist);
  line-height: 1.7;
}

.merchGateGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.merchGateCard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rsvp-border);
}

.merchCardVisual {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(217, 146, 1, 0.38),
      transparent 30%
    ),
    linear-gradient(145deg, #132e1c, #07180f);
}

.merchCardVisual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.merchCardCopy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem;
}

.merchCardCopy h3 {
  margin: 0.7rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1;
}

.merchCardCopy > p:not(.kicker) {
  color: var(--rsvp-mist);
  line-height: 1.6;
}

.merchCardCopy > strong {
  display: block;
  margin: 1rem 0;
  color: var(--rsvp-gold);
  font-size: 1.25rem;
}

.merchBuyButton,
.merchComingSoon {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 0.85rem 1rem;
  color: var(--rsvp-cream);
  background: var(--rsvp-red);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.merchSkipButton {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.7rem 0;
  color: var(--rsvp-mist);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.merchSkipButton:hover,
.merchSkipButton:focus-visible {
  color: var(--rsvp-cream);
}

@media (max-width: 900px) {
  .rsvpFormSection,
  .merchGateGrid {
    grid-template-columns: 1fr;
  }

  .merchCardCopy > p:not(.kicker) {
    min-height: auto;
  }
}

@media (max-width: 650px) {
  .rsvpNav {
    height: 74px;
  }

  .rsvpHero {
    min-height: 72svh;
    padding: 8rem 6vw 4rem;
  }

  .rsvpHero h1 {
    font-size: clamp(3.7rem, 18vw, 6rem);
  }

  .rsvpFormSection,
  .rsvpDressCode {
    padding-right: 6vw;
    padding-left: 6vw;
  }

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

  .rsvpFieldFull {
    grid-column: auto;
  }

  .rsvpEventDetails p {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .rsvpEventDetails span {
    text-align: left;
  }

  .merchGate {
    padding: 0;
  }

  .merchGatePanel {
    max-height: 100svh;
    min-height: 100svh;
    border: 0;
  }
}
