/* ============================================================
   OPENING: cover + envelope
   (the envelope mechanics and timings are unchanged; only the look is new)
   ============================================================ */
.opening {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    url("/assets/cover-bg.jpg") center / cover no-repeat,
    radial-gradient(100% 70% at 30% 20%, #FBF3DE 0%, transparent 65%),
    linear-gradient(175deg, #F8EED6 0%, #F0DFB8 100%);
  transition: opacity 1.8s ease, transform 2.2s cubic-bezier(0.6, 0.05, 0.25, 1), visibility 1.8s ease;
}

body.opened .opening {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.05);
}

/* Floral corners of the cover */
.cover-flowers {
  position: absolute;
  left: 50%;
  z-index: 0;
  width: min(100%, 520px);
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  transition: transform 4.6s ease-out, opacity 1.6s ease;
}

.cover-flowers.top { top: 0; }
.cover-flowers.bottom { bottom: 0; }

/* While the envelope opens the flowers slowly part... */
.opening.is-opening .cover-flowers.top { transform: translate(-50%, -4%); }
.opening.is-opening .cover-flowers.bottom { transform: translate(-50%, 4%); }

/* ...then drift away as the cover dissolves into the invitation */
body.opened .opening .cover-flowers.top {
  transform: translate(-50%, -16%);
  opacity: 0;
  transition: transform 2.2s cubic-bezier(0.6, 0.05, 0.25, 1), opacity 1.6s ease;
}

body.opened .opening .cover-flowers.bottom {
  transform: translate(-50%, 16%);
  opacity: 0;
  transition: transform 2.2s cubic-bezier(0.6, 0.05, 0.25, 1), opacity 1.6s ease;
}

@media (max-height: 720px) {
  .cover-flowers { width: min(82%, 380px); }
}

.invite-group {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  max-width: 92vw;
}

/* Small caps line above the envelope: same face and spacing as "The wedding of"
   on the first invitation's cover */
.arrival {
  margin: 0;
  width: max-content;
  max-width: 92vw;
  text-align: center;
  color: var(--burgundy);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  letter-spacing: 0.28em;
  line-height: 1.9;
  text-transform: uppercase;
}

/* invite.js sizes this box to the width of the line above; the minimum
   keeps the envelope from getting too small now that the text is smaller */
.envelope-wrap {
  width: 100%;
  max-width: 100%;
  min-width: min(88vw, 330px);
}

.envelope {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 250px;
  padding: 1.7rem 1.15rem 1.35rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(180deg, #FFF9EA 0%, #F8EBCB 100%);
  color: var(--burgundy);
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(90, 15, 31, 0.18);
  overflow: visible;
  perspective: 1100px;
}

.env-pocket {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  border-radius: 10px;
}

.env-letter {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 10%;
  height: 84%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1rem 1.6rem;
  background: var(--cream-light);
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(90, 15, 31, 0.12);
  transform: translateY(108%);
  transition: transform 2.4s cubic-bezier(0.33, 0.02, 0.2, 1) 1.05s;
}

.env-letter-line {
  max-width: 16em;
  font-family: var(--script);
  font-size: clamp(1.6rem, 4.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  color: var(--burgundy);
}

.opening.is-opening .env-letter {
  transform: translateY(0);
}

.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 54%;
  z-index: 4;
  pointer-events: none;
  transform-style: preserve-3d;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 2.4s cubic-bezier(0.45, 0.02, 0.2, 1);
}

.env-flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
}

.env-flap-front {
  background: var(--gold-soft);
}

.env-flap-front::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  bottom: 2px;
  background: linear-gradient(180deg, #FFF9EA, #F1E2BE);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.env-flap-back {
  background: linear-gradient(180deg, #F6E8C6, #E9D5A8);
  transform: rotateX(180deg);
}

.opening.is-opening .env-flap {
  transform: rotateX(180deg);
}

.opening.is-opening .arrival,
.opening.is-opening .env-from,
.opening.is-opening .env-names,
.opening.is-opening .seal {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.env-ornament {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.env-ornament g {
  stroke: var(--gold-soft);
  opacity: 0.85;
}

.env-from {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.env-names {
  position: relative;
  z-index: 2;
  margin: 0.15rem 0 0;
  font-family: var(--script);
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--burgundy);
}

/* Burgundy wax seal, as on the first invitation's cover */
.seal {
  position: relative;
  z-index: 5;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  margin: 0.15rem 0;
  border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), transparent 38%),
    radial-gradient(circle at 60% 70%, #4A0B19 0%, #6E1A2C 55%, #52101F 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.05),
    inset 0 -5px 8px rgba(0, 0, 0, 0.25),
    0 10px 14px rgba(63, 9, 20, 0.35);
  overflow: hidden;
  padding: 0;
  animation: sealBreath 3.6s ease-in-out infinite;
}

.seal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 220, 225, 0.28);
}

.seal-mark {
  position: relative;
  display: block;
  width: 104px;
  height: 104px;
}

@keyframes sealBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.open-now {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  border: 1px solid var(--burgundy);
  border-radius: 999px;
  background: transparent;
  color: var(--burgundy);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, opacity 1.1s ease;
}

.open-now:hover {
  background: var(--burgundy);
  color: var(--cream-light);
}

.open-now svg {
  width: 9px;
  height: 9px;
  fill: currentColor;
}

.opening.is-opening .open-now {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   FALLING PETALS (pure CSS, no script)
   ============================================================ */
.petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8vh;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 1.3);
  background: linear-gradient(135deg, #FFFDF6 0%, #F1E3C4 100%);
  border-radius: 150% 0 150% 0;
  opacity: 0;
  box-shadow: 0 1px 3px rgba(120, 90, 40, 0.18);
  animation: petalFall var(--d) linear var(--delay) infinite;
  will-change: transform, opacity;
}

@keyframes petalFall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.75; }
  50%  { transform: translate3d(calc(var(--dx) * 0.5), 55vh, 0) rotate(calc(var(--r) * 0.5)); }
  92%  { opacity: 0.6; }
  100% { transform: translate3d(var(--dx), 112vh, 0) rotate(var(--r)); opacity: 0; }
}

@media (max-width: 500px) {
  .petal:nth-child(n+13) { display: none; }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 12px calc(56px + env(safe-area-inset-bottom));
}

body.opened .page {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1.8s ease 0.35s;
}

body { overflow: hidden; }
body.opened { overflow: auto; overflow-x: hidden; }

.card {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 22px;
  background: rgba(255, 249, 232, 0.38);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 170px;
  margin: 0 auto;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-soft);
}

.divider i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.pill {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.6);
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.pill:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream-light);
}

/* Sound button */
.sound {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 30;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(251, 243, 222, 0.92);
  color: var(--burgundy);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(90, 60, 30, 0.18);
  transition: opacity 0.8s ease;
}

body.opened .sound {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sound svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sound .icon-off { display: none; }
.sound.is-muted .icon-on { display: none; }
.sound.is-muted .icon-off { display: block; }

/* ============================================================
   MAIN INVITATION CARD (identical to the first invitation)
   ============================================================ */
.invite { padding: 44px 22px 34px; }

.verse {
  max-width: 250px;
  margin: 0 auto;
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
}

.verse-ref {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
  color: var(--ink-soft);
}

.invited-line {
  margin-top: 44px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.names {
  margin: 10px 0 26px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(46px, 13vw, 58px);
  line-height: 1.2;
  color: var(--burgundy);
}

.parents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 14px;
}

.parents p {
  color: var(--ink-soft);
  line-height: 1.45;
  text-wrap: balance;
}

.parents .role {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--burgundy);
}

.date {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 24px);
  margin: 30px auto 0;
  padding: 24px 0;
  width: 88%;
  font-family: var(--slab);
  font-weight: 400;
  font-size: clamp(17px, 5vw, 23px);
  letter-spacing: 0.05em;
  color: var(--burgundy);
}

/* top and bottom lines that fade out toward the sides */
.date::before,
.date::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--burgundy) 50%, transparent 100%);
  opacity: 0.75;
}

.date::before { top: 0; }
.date::after { bottom: 0; }

.date b {
  font-family: var(--numeric);
  font-weight: 400;
  font-size: clamp(50px, 15vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

/* The couple is always centred in the card, on phones and on desktop.
   The small script at the bottom of index.html also trims any empty space
   around the figures in couple.png, so the image does not need re-cropping. */
.couple {
  width: min(64%, 250px);
  margin: 26px auto 0;
}

.couple img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 12px 14px rgba(90, 60, 30, 0.22));
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  margin-top: 44px;
  text-align: center;
}

/* Section title layout: small caps label, serif title, diamond line */
.section-kicker {
  font-size: 13px;
  letter-spacing: 0.2em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-wrap: balance;
}

.section h2 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  color: var(--burgundy);
  text-wrap: balance;
}

/* Cursive line above "Wedding Event" */
.section-script {
  margin: 0 0 10px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(1.7rem, 7.2vw, 2.4rem);
  line-height: 1.25;
  color: var(--burgundy);
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin: 12px auto 0;
  font-size: 17px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Countdown (directly under the main card) ---------- */
.countdown-wrap { margin-top: 28px; }

/* same look as the small caps labels such as "The setting" */
.countdown-caption {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2.5vw, 14px);
}

.count {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 4px 11px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: rgba(255, 249, 232, 0.38);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.count b {
  display: block;
  font-family: var(--numeric);
  font-weight: 400;
  font-size: clamp(30px, 9vw, 42px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--burgundy);
}

.count span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- Event timeline ---------- */
.events {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.event {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  text-align: left;
}

.event-icon {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--burgundy);
  display: grid;
  place-items: center;
}

.event-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--cream-light);
}

.event .label {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--burgundy);
}

.event-meta {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 5px 8px;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink-soft);
  align-items: start;
}

.event-meta svg {
  width: 15px;
  height: 15px;
  margin-top: 4px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
}

/* ---------- Wedding venues: two cards, church and hotel ---------- */
.venues { margin-top: 44px; }

.venue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.venue-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.venue-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gold);
  background: #EBDDB9;
}

.venue-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-name {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.venue-city {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* the button sits at the bottom of each card so both line up */
.venue-card .pill { margin-top: auto; }

/* ---------- Our story ---------- */
.story {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--gold);
  border-radius: 22px;
  background: rgba(255, 249, 232, 0.38);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-align: left;
}

.story-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.frame {
  margin: 0;
  border: 1px solid var(--gold);
  border-radius: 16px;
  overflow: hidden;
  background: #EBDDB9;
}

.frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center center;
}

.story-photos .frame:first-child img { object-position: center 18%; }

.story-copy p {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-body);
}

.story-copy p:last-child { margin-bottom: 0; }

/* ---------- RSVP ---------- */
.form-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 34px 22px 30px;
  text-align: center;
}

.rsvp-note {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* once the reply is sent, the form and its note give way to the thank-you */
.form-card:has(form[hidden]) .rsvp-note { display: none; }

.form-card form {
  margin-top: 22px;
  text-align: left;
}

.field > label,
.choice-label {
  display: block;
  margin: 16px 0 6px;
  font-size: 15px;
  color: var(--burgundy);
}

.field input:not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background-color: var(--field);
  color: var(--burgundy);
  font: inherit;
  font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(166, 124, 61, 0.25);
  outline: none;
}

.field input:not([type="radio"]):focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 0;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field select {
  cursor: pointer;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 420px) {
  .choices { grid-template-columns: 1fr; gap: 10px; }
}

.choices label {
  position: relative;
  display: block;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: rgba(255, 244, 214, 0.5);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
}

.choices label:has(input:checked) {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream-light);
}

.choices label:has(input:focus-visible) {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 0;
  overflow: hidden;
}

.submit {
  display: block;
  margin: 26px auto 0;
  padding: 11px 46px;
  border: 0;
  border-radius: 999px;
  background: #6B4F1E;
  color: var(--cream-light);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s ease;
}

.submit:hover { background: var(--burgundy); }
.submit:disabled { opacity: 0.6; cursor: progress; }

.form-error {
  min-height: 22px;
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--danger);
}

.thanks {
  padding: 26px 6px 6px;
  text-align: center;
}

.thanks h3 {
  font-family: var(--script);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
}

.thanks p {
  margin-top: 10px;
  color: var(--ink-soft);
}

/* ---------- One last thing + footer ---------- */
.farewell {
  max-width: 38rem;
  margin: 18px auto 0;
  padding: 28px 22px;
}

.farewell p {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-body);
}

.farewell p:last-child {
  margin-bottom: 0;
  color: var(--burgundy);
  font-weight: 600;
}

.site-foot {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.site-foot .signoff {
  font-family: var(--script);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.3;
  color: var(--burgundy);
}

/* ---------- Scroll reveal (class names are driven by invite.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

/* ============================================================
   LARGER SCREENS
   ============================================================ */
@media (min-width: 768px) {
  .page { width: min(100%, 680px); }
  .invite { padding: 60px 48px 44px; }
  .verse { font-size: 19px; max-width: 320px; }
  .invited-line { font-size: 16px; margin-top: 52px; }
  .names { font-size: 76px; margin: 14px 0 32px; }
  .parents { font-size: 17px; gap: 20px; }
  .parents .role { font-size: 17px; }
  .date { font-size: 25px; width: 78%; }
  .date b { font-size: 70px; }
  .couple { width: min(50%, 300px); }
  .section h2 { font-size: 30px; }
  .section-script { font-size: 2.5rem; }
  .lede { font-size: 19px; }
  .event { padding: 20px 26px; gap: 22px; }
  .event .label { font-size: 22px; }
  .event-meta { font-size: 19px; }
  .venue { gap: 20px; }
  .venue-name { font-size: 18px; }
  .venue-city { font-size: 14px; }
  .count { padding: 20px 6px 14px; }
  .count b { font-size: 54px; }
  .count span { font-size: 16px; }
  .story { padding: 26px; gap: 26px; }
  .story-copy p { font-size: 19px; }
  .form-card { padding: 44px 48px 38px; }
  .farewell { padding: 36px 40px; }
  .farewell p { font-size: 19px; }
}

/* Small phones */
@media (max-width: 380px) {
  .invite { padding: 36px 16px 28px; }
  .parents { font-size: 13px; }
  .event { gap: 14px; padding: 14px; }
  .event-icon { width: 50px; height: 50px; }
  .event-meta { font-size: 16px; }
  .form-card { padding: 28px 16px 26px; }
  .story { padding: 14px; }
}

/* ============================================================
   MOTION PREFERENCES AND DIRECT-LINK ENTRY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .petals { display: none; }
  .env-letter, .env-flap, .seal, .page, .opening, .cover-flowers { transition: none; }
  .seal { animation: none; }
}

.reduce .petals { display: none; }

html.enter .opening { display: none; }
html.enter body { overflow: auto; }
html.enter .page {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
