:root {
  --page-ink: #303724;
  --page-gold: #a77b2f;
  --page-paper: #f9f5e9;
}

.invitation-pages[hidden] { display: none !important; }

.experience.is-open {
  display: block;
  overflow: visible;
  padding: 34px 18px 64px;
}

.experience.is-open .phone-frame { display: none; }

.invitation-pages {
  display: grid;
  gap: 34px;
  justify-content: center;
  animation: invitationArrive 450ms ease-out both;
}

.wedding-page {
  position: relative;
  width: min(820px, 100%);
  min-height: 1180px;
  overflow: hidden;
  color: var(--page-ink);
  background: var(--page-paper);
  box-shadow: 0 18px 52px rgba(30, 44, 28, .23);
  font-family: Georgia, 'Times New Roman', serif;
}

.wedding-page::before,
.wedding-page::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.wedding-page::before { inset: 22px; border: 1px solid #b89453; }
.wedding-page::after { inset: 28px; border: 1px solid #d9c397; }

.page-hero {
  position: relative;
  height: 435px;
  background: url('assets/stillwater-river-art.png') center 57% / cover;
}

.page-hero::after,
.details-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,249,235,.85), rgba(255,249,235,.6) 44%, transparent 74%);
}

.hero-copy,
.details-heading {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-copy { padding: 78px 70px 0; }
.page-eyebrow { margin: 0; color: #715b2d; font-size: 13px; font-weight: bold; letter-spacing: .29em; text-transform: uppercase; }
.hero-copy h1 { margin: 16px 0 11px; color: #776022; font-size: 68px; line-height: 1.05; font-weight: normal; letter-spacing: normal; white-space: nowrap; }
.hero-copy h1 em { display: inline-block; margin-inline: .16em; color: var(--page-gold); font-size: .8em; font-style: normal; font-weight: normal; }
.hero-date { margin: 0; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; }

.page-body { position: relative; z-index: 1; }
.main-body { padding: 31px 82px 66px; text-align: center; }
.gold-rule { width: 95px; height: 1px; margin: 19px auto 24px; background: var(--page-gold); }
.welcome { max-width: 540px; margin: 0 auto 24px; font-size: 18px; line-height: 1.5; }
.event-block { padding: 18px 0 17px; border-top: 1px solid #d6c49d; }
.event-block h2 { margin: 0 0 6px; color: #6a572f; font-size: 21px; font-weight: normal; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; }
.event-block p { margin: 0; color: #806531; font-size: 19px; }
.dress-code { margin: 0; padding: 17px 0 14px; border-top: 1px solid #d6c49d; font-size: 18px; }
.dress-code strong { color: #806531; }

.details-hero { position: relative; height: 273px; background: url('assets/stillwater-river-art.png') center 25% / cover; }
.details-hero::after { background: linear-gradient(rgba(255,249,233,.64), rgba(255,249,233,.86)); }
.details-heading { padding: 76px 70px 0; }
.details-heading h2 { margin: 12px 0 0; color: #776022; font-size: 56px; line-height: 1; font-weight: normal; }
.details-body { padding: 31px 86px 80px; }
.info-section { padding: 20px 0 23px; border-bottom: 1px solid #d6c49d; }
.info-section:first-child { padding-top: 0; }
.info-section h3 { margin: 0 0 11px; color: #6a572f; font-size: 22px; font-weight: normal; letter-spacing: .12em; text-transform: uppercase; }
.info-section p { margin: 0; font-size: 18px; line-height: 1.48; }
.info-section p + p { margin-top: 12px; }
.info-section strong { color: #806531; }
.details-body .rsvp-button {
  display: block;
  width: max-content;
  min-width: 330px;
  max-width: 100%;
  margin: 31px auto 0;
  padding: 17px 26px;
  border: 1px solid #c5a052;
  border-radius: 100px;
  color: #fff9ea;
  background: #394125;
  box-shadow: none;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
}
.details-body .rsvp-button:hover { background: #515b34; transform: none; }
.details-body .rsvp-button:focus-visible { outline: 3px solid #a77b2f; outline-offset: 4px; }
.page-footer { margin: 20px 0 0; color: #806531; font-size: 14px; text-align: center; }
.page-counter { position: absolute; bottom: 40px; left: 0; right: 0; color: #96783b; font-size: 11px; letter-spacing: .3em; text-align: center; }
.details-body .rsvp-confirmation { margin: 25px auto; max-width: 520px; }

@keyframes invitationArrive { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .experience.is-open { padding: 12px 12px 40px; }
  .invitation-pages { gap: 16px; }
  .wedding-page { min-height: 0; }
  .wedding-page::before { inset: 10px; }
  .wedding-page::after { inset: 15px; }
  .page-hero { height: 340px; }
  .hero-copy { padding: 56px 30px 0; }
  .hero-copy h1 { font-size: clamp(42px, 8.5vw, 68px); }
  .hero-date { font-size: 13px; }
  .main-body { padding: 22px 38px 70px; }
  .event-block h2 { font-size: 17px; }
  .event-block p, .welcome, .dress-code { font-size: 16px; }
  .details-hero { height: 230px; }
  .details-heading { padding: 62px 28px 0; }
  .details-heading h2 { font-size: clamp(36px, 8vw, 52px); }
  .details-body { padding: 20px 38px 82px; }
  .info-section h3 { font-size: 18px; }
  .info-section p { font-size: 16px; }
  .details-body .rsvp-button { min-width: 0; width: 100%; font-size: 13px; }
  .page-counter { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) { .invitation-pages { animation: none; } }

/* The opened invitation reads as one wedding website rather than two sheets. */
body.invitation-open { background: #faf7ef; }
.experience.is-open { padding: 0 20px 72px; background: #faf7ef; }
.invitation-pages { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; max-width: 1100px; margin: 0 auto; }
.wedding-page { width: 100%; min-height: 0; overflow: visible; box-shadow: none; background: transparent; }
.wedding-page::before, .wedding-page::after, .page-counter { display: none; }
.page-hero { height: min(62vh, 600px); min-height: 460px; border-radius: 0 0 22px 22px; background-position: center 56%; }
.hero-copy { padding: 95px 50px 0; }
.hero-copy h1 { font-size: clamp(68px, 7vw, 92px); }
.hero-date { font-size: 19px; }
.main-body { padding: 42px 55px 78px; }
.welcome { max-width: 660px; margin-bottom: 0; font-size: 22px; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px; max-width: 890px; margin: 42px auto 10px; }
.event-block { padding: 27px 22px 23px; border-top: 1px solid #b99b63; border-bottom: 1px solid #d6c49d; }
.event-block h2 { font-size: 19px; line-height: 1.45; }
.event-block p { font-size: 21px; }
.dress-code { border: 0; padding: 16px 0 0; font-size: 20px; }
.details-page { margin-top: 0; border-top: 1px solid #d5bd88; background: linear-gradient(180deg, #f6f0e3 0%, #faf7ef 100%); }
.details-hero { height: auto; padding: 65px 20px 10px; background: none; }
.details-hero::after { display: none; }
.details-heading { padding: 0; }
.details-heading h2 { margin-top: 12px; }
.details-body { max-width: 790px; margin: 0 auto; padding: 20px 45px 75px; text-align: center; }
.info-section { padding: 28px 0 31px; }
.info-section h3 { margin-bottom: 12px; }
.info-section p { max-width: 670px; margin-left: auto; margin-right: auto; font-size: 19px; line-height: 1.58; }
.details-body .rsvp-button { display: flex; align-items: center; justify-content: center; min-width: 220px; padding: 14px 38px 15px; }
.details-body .rsvp-button span { font-size: 21px; letter-spacing: .2em; }
.page-footer { margin-top: 23px; font-size: 15px; }

@media (max-width: 820px) {
  .experience.is-open { padding: 0 0 40px; }
  .page-hero { height: 430px; min-height: 0; border-radius: 0; background-position: center 60%; }
  .hero-copy { padding: 66px 26px 0; }
  .hero-copy h1 { font-size: clamp(43px, 9vw, 66px); }
  .hero-date { font-size: 14px; }
  .main-body { padding: 28px 28px 58px; }
  .welcome { font-size: 18px; }
  .event-grid { display: block; margin: 30px auto 9px; }
  .event-block { padding: 21px 0; border-bottom: 0; }
  .event-block:last-child { border-bottom: 1px solid #d6c49d; }
  .event-block h2 { font-size: 17px; }
  .event-block p { font-size: 19px; }
  .dress-code { font-size: 18px; }
  .details-hero { padding: 54px 22px 10px; }
  .details-heading h2 { font-size: clamp(39px, 8vw, 55px); }
  .details-body { padding: 13px 28px 65px; }
  .info-section { padding: 23px 0 26px; }
  .info-section p { font-size: 17px; }
  .details-body .rsvp-button { width: min(100%, 240px); min-width: 0; }
}

/* Floral details repeat the corners of the Stillwater invitation artwork. */
.details-page { overflow: hidden; isolation: isolate; }
.floral-corner {
  position: absolute;
  z-index: 0;
  width: 250px;
  height: 230px;
  pointer-events: none;
  background-image: url('assets/stillwater-river-art.png');
  background-repeat: no-repeat;
  background-size: 940px auto;
  opacity: .68;
}
.floral-corner--top-left { top: 0; left: 0; background-position: left top; -webkit-mask-image: radial-gradient(ellipse at top left, #000 15%, transparent 76%); mask-image: radial-gradient(ellipse at top left, #000 15%, transparent 76%); }
.floral-corner--top-right { top: 0; right: 0; background-position: right top; -webkit-mask-image: radial-gradient(ellipse at top right, #000 15%, transparent 76%); mask-image: radial-gradient(ellipse at top right, #000 15%, transparent 76%); }
.floral-corner--bottom-left { bottom: 0; left: 0; background-position: left bottom; -webkit-mask-image: radial-gradient(ellipse at bottom left, #000 15%, transparent 76%); mask-image: radial-gradient(ellipse at bottom left, #000 15%, transparent 76%); }
.floral-corner--bottom-right { bottom: 0; right: 0; background-position: right bottom; -webkit-mask-image: radial-gradient(ellipse at bottom right, #000 15%, transparent 76%); mask-image: radial-gradient(ellipse at bottom right, #000 15%, transparent 76%); }
.details-hero, .details-body { position: relative; z-index: 1; }
.details-heading::after { content: ''; display: block; width: 170px; height: 1px; margin: 22px auto 0; background: linear-gradient(90deg, transparent, #b49352 18%, #b49352 82%, transparent); }
.details-body .rsvp-button[hidden] { display: none; }
.details-body .page-footer { margin-top: 13px; }

/* The RSVP form shares the invitation's paper, botanical and gold palette. */
.rsvp-panel {
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0 32px 30px;
  border: 1px solid #cbb27b;
  border-radius: 18px;
  color: #303724;
  background: linear-gradient(160deg, #fbf8ef, #f6efdf);
  box-shadow: 0 28px 80px rgba(32, 42, 29, .28), inset 0 0 0 5px rgba(255, 253, 246, .72);
  font-family: Georgia, 'Times New Roman', serif;
}
.rsvp-panel .panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: flex-start;
  gap: 20px;
  margin: 0 0 23px;
  padding: 27px 0 20px;
  border-bottom: 1px solid #d5bf91;
  background: #fbf8ef;
  font-family: Georgia, 'Times New Roman', serif;
}
.rsvp-panel .panel-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 32px;
  width: 145px;
  height: 112px;
  pointer-events: none;
  background: url('assets/stillwater-river-art.png') right top / 620px auto no-repeat;
  opacity: .4;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 80%);
  mask-image: radial-gradient(ellipse at top right, #000 5%, transparent 80%);
}
.panel-title { position: relative; z-index: 1; }
.panel-kicker { color: #806531; font-family: Cinzel, Georgia, serif; font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.panel-title h2 { margin: 6px 0 2px; color: #715b2d; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 42px; font-weight: 500; line-height: 1; }
.panel-title p { margin: 0; color: #4b5237; font-size: 15px; font-weight: normal; line-height: 1.4; }
.rsvp-panel .close-panel { position: relative; z-index: 1; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #cdb47e; border-radius: 50%; color: #715b2d; background: #fffaf0; font-family: Georgia, serif; font-size: 25px; line-height: 1; }
.rsvp-panel .close-panel:hover { background: #f0e4c9; }
.rsvp-panel #rsvp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
#rsvp-form > .field-phone,
#rsvp-form > .field-names,
#rsvp-form > .field-dietary,
#rsvp-form > .dress-note,
#rsvp-form > .privacy-note,
#rsvp-form > .form-status,
#rsvp-form > .submit-preview { grid-column: 1 / -1; }
#rsvp-form > label { gap: 7px; color: #5b512f; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; font-weight: 600; }
#rsvp-form label small { color: #736d59; font-size: 12px; font-weight: normal; }
#rsvp-form input:not([type='radio']),
#rsvp-form select,
#rsvp-form textarea {
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid #d1c3a5;
  border-radius: 7px;
  color: #303724;
  background: #fffdf8;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: normal;
}
#rsvp-form textarea { min-height: 92px; }
#rsvp-form input:focus-visible,
#rsvp-form select:focus-visible,
#rsvp-form textarea:focus-visible { outline: 2px solid #a77b2f; outline-offset: 2px; }
#rsvp-form .dress-note { margin-top: 2px; padding-top: 16px; border-top: 1px solid #d5bf91; color: #66552d; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
#rsvp-form .privacy-note { color: #716b5b; font-family: Georgia, 'Times New Roman', serif; font-size: 12px; }
#rsvp-form .form-status { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
#rsvp-form .submit-preview { min-height: 52px; margin-top: 0; border: 1px solid #b49352; border-radius: 100px; color: #fff9ea; background: #394125; box-shadow: none; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: normal; letter-spacing: .1em; text-transform: uppercase; }
#rsvp-form .submit-preview:hover { color: #fff9ea; background: #515b34; }

@media (max-width: 700px) {
  .floral-corner { width: 170px; height: 160px; background-size: 650px auto; opacity: .56; }
  .floral-corner--top-right, .floral-corner--bottom-left { display: none; }
  .rsvp-panel { width: calc(100vw - 20px); max-height: calc(100svh - 20px); padding: 0 20px 22px; }
  .rsvp-panel .panel-header { gap: 9px; padding: 20px 0 17px; }
  .rsvp-panel .panel-header::after { width: 110px; height: 95px; right: 25px; background-size: 520px auto; }
  .panel-title h2 { font-size: 36px; }
  .panel-title p { font-size: 14px; }
  .rsvp-panel #rsvp-form { grid-template-columns: 1fr; gap: 15px; }
  #rsvp-form > * { grid-column: 1 / -1; }
}

/* Keep the river image and the invitation details on one continuous page. */
.invitation-pages, .main-page, .details-page { background: #faf7ef; }
.page-hero { border-radius: 0; }
.page-hero::after { background: linear-gradient(180deg, rgba(255, 249, 235, .84) 0%, rgba(255, 249, 235, .4) 40%, transparent 68%, #faf7ef 100%); }
.main-body { padding-top: 7px; padding-bottom: 18px; }
.main-body .gold-rule { margin-top: 0; }
.details-page { border-top: 0; }
.details-hero { padding-top: 34px; }

@media (max-width: 820px) {
  .main-body { padding-top: 6px; padding-bottom: 12px; }
  .details-hero { padding-top: 29px; }
}
