/* Steffi & Louis: editorial scrapbook landing. The existing RSVP / modal CSS is below. */
:root {
  --accent: #173f86;
  --overlay-opacity: .5;
  --ivory: #f8f3e8;
  --ink: #173f86;
  --deep-blue: #102d56;
  --paper-shadow: 0 14px 30px rgba(4, 17, 39, .36);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
html { background: #193d6d; }
body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.background-photo, .background-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
}
.background-photo {
  z-index: -3;
  height: min(46svh, 530px);
  background-repeat: no-repeat;
  background-position: center 54%;
  background-size: cover;
  background-color: #536f8c;
}
.background-overlay {
  z-index: -2;
  bottom: 0;
  background:
    linear-gradient(to bottom,
      rgba(9,29,56,.20) 0%,
      rgba(9,29,56,.09) 27%,
      rgba(10,30,61,.54) 47%,
      rgba(13,40,78,.86) 75%,
      rgba(12,34,68,.96) 100%),
    repeating-linear-gradient(80deg, rgba(243,239,228,.026) 0 1px, transparent 1px 7px);
}
/* Reuse the existing floral loading artwork as a very faint paper watermark.
   This adds almost no new network cost, as the loader has already fetched it. */
.background-overlay::before {
  content: '';
  position: absolute;
  inset: 42svh 0 0;
  pointer-events: none;
  background: url('assets/loading-invitation.webp') center 66% / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .27;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 100%);
}
/* Gentle linen texture and soft watercolor-like tonal variation. */
.background-overlay::after {
  content: '';
  position: absolute;
  inset: 39svh 0 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 48%, rgba(144, 169, 201, .13), transparent 55%),
    radial-gradient(ellipse at 98% 94%, rgba(107, 140, 187, .12), transparent 50%),
    repeating-linear-gradient(0deg, rgba(245, 245, 231, .025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(245, 245, 231, .019) 0 1px, transparent 1px 6px);
  opacity: .72;
}

.site-shell {
  position: relative;
  width: min(100%, 1400px);
  height: 100svh;
  margin: 0 auto;
}

.countdown-section {
  position: absolute;
  z-index: 24;
  top: clamp(8px, 1.6svh, 18px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 95vw;
  padding: 6px clamp(16px, 3vw, 22px) 8px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  background: rgba(12,34,66,.18);
  text-align: center;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.countdown-heading {
  margin: 0 0 2px;
  font-family: 'Parisienne', cursive;
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.1;
}
.countdown { display: flex; justify-content: center; gap: clamp(14px, 3vw, 26px); }
.countdown-unit { min-width: 33px; }
.countdown-unit strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(20px, 3vw, 29px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-unit span {
  display: block;
  margin-top: 2px;
  font: 500 8px/1.2 Arial, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.collage { position: relative; width: 100%; height: 100%; }
.collage-card {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  filter: drop-shadow(var(--paper-shadow));
  -webkit-tap-highlight-color: transparent;
  transition: filter .22s ease;
}
.collage-card > .paper-artwork {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
  user-select: none;
  pointer-events: none;
}
.collage-card:hover,
.collage-card:focus-visible { filter: drop-shadow(0 18px 35px rgba(2,15,35,.5)); }
.collage-card:focus-visible, .nav-pill:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

.main-card {
  z-index: 8;
  top: 22svh;
  left: 31%;
  width: min(35vw, 520px, 46svh);
  transform: translateX(-50%) rotate(-2.1deg);
}
.main-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 3px;
  background: linear-gradient(145deg, #244b82, #0f2d5b);
  box-shadow: 0 8px 26px rgba(0,0,0,.34);
  transform: translate(-13px, 9px) rotate(-6deg);
}
.main-card:hover, .main-card:focus-visible { transform: translateX(-50%) translateY(-4px) rotate(-2.1deg); }
.wax-seal {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 3px 4px rgba(1,12,28,.3));
}
.wax-seal-main { left: -6%; top: -15%; width: 24%; transform: rotate(-9deg); }

.nav-pills {
  position: absolute;
  z-index: 13;
  top: 50svh;
  left: 50%;
  transform: translateX(-50%);
  width: min(710px, 91vw);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.5vw, 17px);
}
.nav-pill {
  display: grid;
  place-items: center;
  width: clamp(110px, 16vw, 193px);
  min-height: clamp(44px, 6svh, 65px);
  padding: 8px 12px;
  border: 3px double #e6e8e3;
  border-radius: 46% / 32%;
  box-shadow: 0 1px 0 3px #153969, 0 7px 15px rgba(2,15,35,.35);
  background: linear-gradient(145deg, #163a70, #0c274b);
  color: #fffaf0;
  cursor: pointer;
  font: 400 clamp(13px, 1.7vw, 19px)/1.05 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .065em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0,0,0,.3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-pill:hover, .nav-pill:focus-visible { transform: translateY(-3px); box-shadow: 0 1px 0 3px #153969, 0 10px 22px rgba(2,15,35,.45); }

.details-card {
  z-index: 5;
  top: 54svh;
  left: 51%;
  width: min(46vw, 680px, 61svh);
  transform: translateX(-50%) rotate(.6deg);
}
.details-card:hover, .details-card:focus-visible { transform: translateX(-50%) translateY(-4px) rotate(.6deg); }
.rsvp-card {
  z-index: 15;
  top: 76svh;
  left: calc(50% + min(23vw, 265px));
  width: min(21vw, 290px, 25svh);
  transform: translateX(-50%) rotate(5deg);
}
.rsvp-card:hover, .rsvp-card:focus-visible { transform: translateX(-50%) translateY(-4px) rotate(5deg); }
.rsvp-card-label {
  position: absolute;
  top: 15%;
  left: 5%;
  right: 5%;
  color: #fff;
  font: italic 500 clamp(24px, 3vw, 43px)/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .11em;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
  pointer-events: none;
}
.wax-seal-rsvp { width: 27%; top: 44%; left: 36.5%; transform: rotate(7deg); }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 12px;
}
.viewer.is-open { display: grid; }
.viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 18, 39, .9);
}
.viewer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 1;
  overflow: hidden;
}
.viewer-close {
  position: fixed;
  z-index: 10;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(8,18,39,.55);
  color: #fff;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}
.viewer-content {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
}
.single-image-view,
.entourage-view,
.details-view {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.full-card-image {
  display: block;
  max-width: min(100%, 94vw);
  max-height: calc(100svh - 28px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: none;
}
/* Preview navigation overlays the artwork; no side gutters are reserved. */
.entourage-view, .details-view { position: relative; }
.viewer-image-stage {
  position: relative;
  width: min(calc(100vw - 16px), calc(70.5svh - 14px));
  aspect-ratio: 1410 / 2000;
  max-height: calc(100svh - 20px);
}
/* Wedding Details is landscape; Dress Code and Entourage are portrait. */
.details-view .viewer-image-stage.is-landscape {
  width: min(calc(100vw - 16px), calc(133.333svh - 27px));
  aspect-ratio: 1448 / 1086;
}
.viewer-image-stage > .full-card-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.viewer-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink, #173f86);
  cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 50px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(255,255,255,.97), 0 -1px 2px rgba(255,255,255,.97);
  -webkit-tap-highlight-color: transparent;
}
.viewer-nav:focus-visible { outline: 2px solid var(--ink, #173f86); outline-offset: 2px; }
.viewer-nav-prev { left: clamp(2px, 1.3vw, 16px); }
.viewer-nav-next { right: clamp(2px, 1.3vw, 16px); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rsvp-view {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(400px, 1.15fr);
  align-items: stretch;
  gap: 16px;
  width: min(1050px, calc(100vw - 64px));
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #182846;
}
.rsvp-invitation-panel,
.rsvp-form-panel {
  padding: clamp(20px, 2.5vw, 34px);
  border: 1px solid rgba(23,63,134,.25);
  border-radius: 5px;
  background: rgba(248,246,239,.99);
  box-shadow: 0 20px 56px rgba(0,0,0,.2);
}
.rsvp-invitation-panel { min-width: 0; }
.rsvp-eyebrow {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.rsvp-invitation-panel h3,
.rsvp-form-panel h3 {
  margin: 0;
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(30px, 3.5vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}
.rsvp-guest-count {
  margin: 14px 0 16px;
  color: #765c48;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
}
.rsvp-invited-list { display: grid; gap: 9px; }
.rsvp-invited-guest,
.rsvp-result-guest {
  padding: 13px 16px;
  border: 1px solid rgba(23,63,134,.23);
  border-radius: 5px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px;
}
.rsvp-plus-one-note {
  margin: 15px 0 0;
  color: #586783;
  font-size: 13px;
  line-height: 1.5;
}
.rsvp-intro {
  margin: 13px 0 20px;
  color: #765c48;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.25;
}
.rsvp-form { display: grid; gap: 16px; }
.rsvp-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.rsvp-status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rsvp-status-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 12px 13px;
  border: 1px solid rgba(23,63,134,.25);
  border-radius: 5px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}
.rsvp-status-option:has(input:checked) {
  border-color: var(--accent);
  background: #f2f5fb;
}
.rsvp-status-option input,
.rsvp-attendee-option input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}
.rsvp-attendees legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
}
.rsvp-attendee-list { display: grid; gap: 10px; }
.rsvp-attendee-option {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
}
.rsvp-field {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.rsvp-field textarea {
  display: block;
  width: 100%;
  min-height: 64px;
  margin-top: 9px;
  padding: 12px 13px;
  border: 1px solid rgba(23,63,134,.25);
  border-radius: 5px;
  background: rgba(255,255,255,.85);
  color: #182846;
  font: 15px/1.4 Arial, sans-serif;
  resize: vertical;
}
.rsvp-submit {
  justify-self: start;
  margin-top: 5px;
  padding: 13px 22px;
  border: 0;
  border-radius: 17px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}
.rsvp-error {
  margin: 0;
  color: #a22929;
  font-size: 13px;
  line-height: 1.4;
}
.rsvp-demo-notice {
  margin: 0;
  color: #7b5a25;
  font-size: 12px;
  line-height: 1.4;
}
.rsvp-result > p:not(.rsvp-eyebrow) {
  color: #586783;
  line-height: 1.6;
  font-size: 14px;
}
.rsvp-result-guest-list { display: grid; gap: 8px; margin: 18px 0; }
.rsvp-contact-note {
  margin-top: 20px;
  padding: 13px;
  border-left: 3px solid var(--accent);
  background: #eef2f8;
}

/* RSVP travel & welcome-dinner questions: stays inside the existing scrollable viewer. */
.rsvp-travel-fields {
  display: grid;
  gap: 15px;
  padding: 17px;
  border: 1px solid rgba(23,63,134,.20);
  border-radius: 7px;
  background: rgba(239,243,250,.54);
}
.rsvp-travel-fields h4 {
  margin: 0;
  color: var(--ink);
  font: 400 25px/1.2 'Cormorant Garamond', Georgia, serif;
}
.rsvp-travel-intro { margin: -6px 0 2px; color: #596783; font-size: 13px; line-height: 1.45; }
.rsvp-travel-fields .rsvp-field input[type="date"],
.rsvp-travel-fields .rsvp-field input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 45px;
  margin-top: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(23,63,134,.25);
  border-radius: 5px;
  background: rgba(255,255,255,.85);
  color: #182846;
  font: 15px/1.35 Arial, sans-serif;
}
.rsvp-travel-choice legend { margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.rsvp-travel-fields .rsvp-status-options { gap: 8px; }
.rsvp-travel-fields .rsvp-status-option { min-height: 48px; padding: 10px; }
.rsvp-result-travel { margin: 17px 0; border-top: 1px solid rgba(23,63,134,.2); padding-top: 14px; font-size: 13px; color: #52647f; }
.rsvp-result-travel > div { margin: 0 0 8px; line-height: 1.5; }
.rsvp-result-travel strong { color: #173f86; }
@media (max-width: 480px) {
  .rsvp-travel-fields { padding: 14px; }
  .rsvp-travel-fields .rsvp-status-options { grid-template-columns: 1fr 1fr; }
  .rsvp-travel-fields .rsvp-status-option { font-size: 12px; }
}

.hidden { display: none !important; }


.faq-placeholder {
  width: min(540px, calc(100vw - 48px));
  padding: clamp(24px, 6vw, 52px);
  background: #faf6ed;
  color: #173f86;
  text-align: center;
  border: 1px solid rgba(23,63,134,.24);
  box-shadow: 0 18px 55px rgba(0,0,0,.24);
}
.faq-placeholder h3 {
  margin: 6px 0 18px;
  font: 400 clamp(26px, 5vw, 44px)/1.1 'Cormorant Garamond', Georgia, serif;
}
.faq-placeholder p { line-height: 1.5; }
.faq-eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; }
.faq-caption { color: #5e6c7d; font-size: 13px; }


/* The collage scales to phone height to keep the full invitation on one screen. */
@media (max-width: 820px) {
  .background-photo { height: 56svh; background-position: center 50%; }
  .background-overlay {
    background: linear-gradient(to bottom,
      rgba(9,29,56,.17) 0%, rgba(9,29,56,.05) 29%,
      rgba(8,28,61,.33) 44%, rgba(12,39,77,.77) 63%,
      rgba(15,42,81,.94) 83%, rgba(12,34,68,.97) 100%);
  }
  .countdown-section { padding: 4px 14px 5px; top: 5px; }
  .countdown-heading { font-size: clamp(15px, 4vw, 20px); }
  .countdown-unit strong { font-size: clamp(20px, 5.3vw, 27px); }
  .countdown-unit span { font-size: 7px; }
  .main-card {
    top: 27svh;
    left: 50%;
    width: min(87vw, 490px, 44svh);
    transform: translateX(-50%) rotate(-2deg);
  }
  .main-card::before { transform: translate(-8px, 7px) rotate(-5deg); }
  .main-card:hover, .main-card:focus-visible { transform: translateX(-50%) translateY(-3px) rotate(-2deg); }
  .wax-seal-main { width: 23%; left: -3%; top: -12%; }
  /* Below the main card, rather than across its date and location. */
  .nav-pills { top: 56.8svh; width: min(86%, 465px); gap: clamp(5px, 1.6vw, 10px); }
  .nav-pill {
    flex: 1 1 0;
    width: auto;
    max-width: 142px;
    min-height: clamp(32px, 4.5svh, 40px);
    padding: 5px 3px;
    border-width: 2px;
    font-size: clamp(10px, 2.55vw, 13px);
    letter-spacing: .015em;
  }
  .details-card {
    top: 62svh;
    left: 50%;
    width: min(94vw, 550px, 48svh);
    transform: translateX(-50%) rotate(.6deg);
  }
  .details-card:hover, .details-card:focus-visible { transform: translateX(-50%) translateY(-3px) rotate(.6deg); }
  .rsvp-card {
    top: 84svh;
    left: calc(50% + min(28vw, 130px));
    width: min(43vw, 205px, 22svh);
  }
  .rsvp-card-label { font-size: clamp(17px, 5vw, 27px); }
  .wax-seal-rsvp { top: 41%; width: 28%; }
  .viewer { padding: 6px; }
  /* Mobile: make the card nearly full-width, with tappable overlaid arrows. */
  .viewer-nav { width: 40px; height: 48px; font-size: 37px; }
  .viewer-nav-prev { left: 2px; }
  .viewer-nav-next { right: 2px; }
}

@media (max-width: 420px) and (max-height: 735px) {
  .main-card { width: min(87vw, 43svh); }
  .nav-pills { top: 58.5svh; }
  .details-card { top: 63.5svh; }
  .rsvp-card { top: 82svh; }
}

/* Mid-size tablets have a wider card, so leave extra room below it. */
@media (min-width: 600px) and (max-width: 820px) {
  .nav-pills { top: 60.5svh; width: min(68%, 470px); }
  .details-card { top: 65svh; width: min(84vw, 520px, 43svh); }
  .rsvp-card { top: 85svh; }
}

@media (min-width: 821px) and (max-height: 710px) {
  .main-card { top: 18svh; width: min(35vw, 42svh); }
  .nav-pills { top: 47svh; }
  .details-card { top: 52svh; width: min(46vw, 57svh); }
  .rsvp-card { top: 75svh; width: min(21vw, 24svh); }
}

@media (max-width: 900px) {
  .rsvp-view {
    grid-template-columns: 1fr;
    width: min(650px, calc(100vw - 24px));
    max-height: calc(100svh - 24px);
    gap: 12px;
  }
  .rsvp-invitation-panel,
  .rsvp-form-panel { padding: 22px; }
}

@media (max-width: 480px) {
  .rsvp-invitation-panel,
  .rsvp-form-panel { padding: 18px; }
  .rsvp-status-options { grid-template-columns: 1fr; }
  .rsvp-status-option { min-height: 52px; }
  .rsvp-field textarea { min-height: 62px; }
}

@media (max-height: 620px) {
  .rsvp-view { max-height: calc(100svh - 12px); }
}

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

/* Desktop: full-screen lake proposal photo only.
   Mobile (820px and below) keeps the photo-to-textured-blue transition above. */
@media (min-width: 821px) {
  .background-photo {
    height: 100svh;
    background-position: center center;
  }
  .background-overlay {
    display: none;
  }
}
