/* Hunain & Ramsha. Design from Ramsha's Canva artwork (ADR-0032): black-and-white photo,
   ivory paper and lace, grey ink. Mobile-first (ADR-0004), motion per ADR-0027. */

/* Self-hosted fonts (SIL Open Font License; see assets/fonts/README.md) */
@font-face { font-family: "Gilda Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/gilda-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Gilda Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/gilda-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alex Brush"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/alex-brush-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alex Brush"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/alex-brush-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --peek: 42px;
  --photo-ink: #F5F3EF;          /* text on the hands photo */
  --photo-ink-soft: #E2DFDA;
  --paper-ink: #5B5B59;          /* text on paper: 5.3:1 on --paper */
  --paper-script: #626260;
  --paper: #E4E4E2;
  --curtain-ink: #3F3F3E;
  --shadow: 0 1px 12px rgb(0 0 0 / 0.35);

  --serif: "Gilda Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --italic: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --script: "Alex Brush", "Snell Roundhand", "Apple Chancery", cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #3B3D3F;
  color: var(--photo-ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }   /* hidden always wins over a display set elsewhere */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-placeholder] { outline: 1px dashed currentColor; outline-offset: 4px; }

/* ---------- Sections: one PDF page each ---------- */

.sec {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* A little shorter than the screen, so the top of the next page peeks in at the bottom:
     the clearest sign on a phone that there is more below. */
  min-height: calc(100vh - var(--peek));
  min-height: calc(100svh - var(--peek));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) 24px max(56px, env(safe-area-inset-bottom));
  text-align: center;
}
.sec > * { width: 100%; max-width: 460px; }

.sec--photo { background: #45484A url("../img/bg-hands.webp") center / cover no-repeat; color: var(--photo-ink); }
.sec--photo::before { /* soft shade so white text always reads */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(30 32 34 / 0.38), rgb(30 32 34 / 0.18) 45%, rgb(30 32 34 / 0.42));
}
.sec--paper { background: var(--paper) url("../img/paper.webp") center / cover; color: var(--paper-ink); }

/* ---------- 1–2. The letter ---------- */

.letter__from { font-size: clamp(19px, 5.4vw, 24px); letter-spacing: 0.02em; text-shadow: var(--shadow); }
.letter__names {
  margin: 6px 0 0;
  font-weight: 400;
  font-size: clamp(24px, 7.8vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: var(--shadow);
}
.amp { font-family: var(--script); text-transform: none; font-size: 1.45em; line-height: 0.5; vertical-align: -0.12em; letter-spacing: 0; }

/* Stage: open envelope at the bottom, heart rises out of the pocket (PDF page 2). */
.stage {
  --w: min(calc(100vw - 48px), 440px);
  margin-bottom: 30px;
  position: relative;
  width: var(--w);
  max-width: none;
  height: calc(var(--w) * 1.02);
  margin: 26px auto 0;
}
.env { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
.env--back { z-index: 1; }
.env--front { z-index: 3; }
.env--closed {
  z-index: 4; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.closed__float, .closed__morph, .flap { position: relative; display: block; }
/* As in the artwork, the sealed envelope is slightly see-through: the hands show through it (v2 page 1). */
.closed__float { opacity: 0.86; }
.closed__body { width: 100%; }
/* The flap hinges on the envelope's top edge (y 61 of 529). Its inside face shows once it passes upright. */
.flap { position: absolute; inset: 0; transform-origin: 50% 11.5%; transform-style: preserve-3d; transform: perspective(1100px) rotateX(0deg); }
.flap img { position: absolute; inset: 0; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap__back { opacity: 0; }  /* plain inside of the flap; shown once the flap passes upright */
.heart {
  position: absolute; z-index: 2;
  left: 50%; top: 0;
  width: 70%;
  translate: -50% 0;
}
.heart::before { /* soft shadow, painted once */
  content: ""; position: absolute; z-index: -1; inset: 8% 6% 0;
  background: radial-gradient(50% 50% at 50% 55%, rgb(0 0 0 / 0.22), transparent 72%);
}
.heart__text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 2%;   /* words centred just below the middle of the heart, as on v2 page 2 */
  color: #6B675A;       /* warm grey ink, sampled from v2 */
}
.heart__script { font-family: var(--script); font-size: calc(var(--w) * 0.08); line-height: 1.12; }
.heart__date { margin-top: 0.55em; font-size: calc(var(--w) * 0.036); letter-spacing: 0.14em; font-variant-numeric: lining-nums; }

/* Closed state (set by JS; without JS the letter simply shows open).
   Tapping adds .is-opening, and every step of the opening is timed from that one moment in CSS. */
.stage.is-closed:not(.is-opening) .env--back, .stage.is-closed:not(.is-opening) .env--front { opacity: 0; }
.stage.is-closed:not(.is-opening) .heart { translate: -50% 38%; opacity: 0; }
.stage.is-closed:not(.is-opening) .heart__text { opacity: 0; }
.stage:not(.is-closed) .env--closed, .stage.is-opening .env--closed { opacity: 0; visibility: hidden; pointer-events: none; }

.letter__hint { margin-top: 26px; min-height: 48px; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; text-shadow: var(--shadow); }
.cal-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-decoration: none; border-bottom: 1px solid rgb(245 243 239 / 0.5); line-height: 1; }
/* On the last page, under the thank-you: dark ink on the curtain, a clear outlined button */
.cal-link--ink {
  margin-top: calc(var(--H) * 0.03); min-height: 44px; padding: 0 22px;
  border: 1px solid rgb(43 37 34 / 0.55); border-radius: 999px;
  font-family: var(--serif); font-style: normal; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: #2B2522;
}
.rsvp__closed .cal-link--ink { margin-top: 18px; }

/* ---------- Guiding hints: where to scroll, where to tap ---------- */

/* "Scroll ⌄" at the bottom of every page; tapping it glides to the next page. */
.kindly.has-next { padding-bottom: max(56px, env(safe-area-inset-bottom)); }   /* oval stays centred on the hands photo */
.sec > .next {
  position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5;
  width: auto; max-width: none; min-width: 80px; min-height: 56px; padding: 4px 14px;
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0;
  color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.next__label { font-size: 13px; letter-spacing: 0.26em; text-indent: 0.26em; text-transform: uppercase; opacity: 0.9; }
.next svg { width: 32px; height: 32px; margin-top: -2px; }

.sec--photo > .next { text-shadow: var(--shadow); filter: drop-shadow(0 1px 4px rgb(0 0 0 / 0.35)); }
.kindly > .next { color: #3F3F3E; }
.has-next, .letter { padding-bottom: max(108px, calc(env(safe-area-inset-bottom) + 96px)); }
/* On the letter, the scroll hint appears only after the envelope is opened */
.js .letter:not(.is-open) > .next { opacity: 0; visibility: hidden; }

.oval__click { padding: 6px 16px 5px; border: 1px solid rgb(106 105 100 / 0.55); border-radius: 999px; }
.br-d { display: none; }

/* ---------- 3. Locket ---------- */

.locket__img { width: min(84vw, 400px); margin: 0 auto 30px; transform-origin: 70% 4%; filter: drop-shadow(0 10px 14px rgb(0 0 0 / 0.16)); }
.locket__msg { font-size: clamp(17px, 5.3vw, 25px); line-height: 1.4; max-width: none; margin: 18px auto 0; }
.locket__with { margin-top: 28px; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.locket__names { margin-top: 6px; font-family: var(--script); font-size: clamp(42px, 12vw, 56px); line-height: 1.2; color: var(--paper-script); }

/* ---------- 4. Dress code ---------- */

/* A clear page break after the locket page: both pages are the same paper, so without this they read as one.
   A fine line across the top edge, with a soft shadow under it, like the top of the next sheet. */
.dress { border-top: 1px solid rgb(91 91 89 / 0.32); box-shadow: inset 0 18px 22px -18px rgb(0 0 0 / 0.28); }

.dress__title { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(48px, 14vw, 64px); line-height: 1.1; color: var(--paper-script); }
.dress__group { margin: 22px 0 14px; font-weight: 400; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; }
.swatches { display: flex; justify-content: center; gap: clamp(12px, 4vw, 20px); margin: 0 auto; padding: 0; list-style: none; }
.swatches li { width: clamp(84px, 26vw, 120px); aspect-ratio: 1; }
.swatches img { width: 100%; height: 100%; object-fit: cover; border-radius: 24%; box-shadow: 0 6px 14px rgb(0 0 0 / 0.18); }
.dress__note { margin: 28px auto 0; max-width: none; font-size: clamp(16px, 4.9vw, 22px); line-height: 1.4; }
.dress__note strong { font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- 5. Kindly RSVP: hands hold the lace oval (PDF v2 page 5) ---------- */

/* --h is the photo's height. Everything is centred on the photo, as in the PDF:
   the oval is 66.6% of the photo's height and sits exactly between the two hands. */
.kindly { --h: min(100svh, 160vw); background: #A1A1A1; }
@supports not (height: 1svh) { .kindly { --h: min(100vh, 160vw); } }
.kindly .kindly__photo {
  position: absolute; z-index: -1; left: 50%; top: 50%;
  width: calc(var(--h) * 1.5296); max-width: none; height: var(--h);
  translate: -50% -50%;
  /* soft edges so the photo melts into the grey on any screen shape */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
.hand { position: absolute; inset: 0; background: url("../img/bg-hands-reach.webp") center / 100% 100% no-repeat; }
/* The photo is split into her half (top, plus her sleeve on the left) and his half (bottom right),
   with feathered edges in the empty grey between the hands so no seam shows while they move. */
.hand--her {
  -webkit-mask-image: linear-gradient(180deg, #000 49%, transparent 57%), linear-gradient(90deg, #000 18%, transparent 26%);
  -webkit-mask-composite: source-over;
  mask-image: linear-gradient(180deg, #000 49%, transparent 57%), linear-gradient(90deg, #000 18%, transparent 26%);
  mask-composite: add;
}
.hand--his {
  -webkit-mask-image: linear-gradient(180deg, transparent 50%, #000 58%), linear-gradient(90deg, transparent 19%, #000 27%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 50%, #000 58%), linear-gradient(90deg, transparent 19%, #000 27%);
  mask-composite: intersect;
}

.oval { position: relative; display: block; width: calc(var(--h) * 0.4995); max-width: none; margin: 0 auto; text-decoration: none; color: #6A6964; filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.25)); }
.oval img { width: 100%; }
.oval__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.oval__script { font-family: var(--script); font-size: calc(var(--h) * 0.062); line-height: 1.2; }
.oval__click { position: relative; margin-top: calc(var(--h) * 0.03); font-size: max(13px, calc(var(--h) * 0.024)); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- 6. RSVP (v2 page 6) ---------- */

/* --H is the page height. v2's curtain photo is fitted to it, and every position and size below is a share of it,
   so the words land on the curtain exactly where the artwork prints them. Text sizes are also capped by the
   screen width so long lines fit on narrow phones. */
.rsvp {
  --H: max(100vh, 720px);
  height: var(--H); min-height: 0;
  justify-content: flex-start;
  padding: 0 16px;
  /* fills the sides on wide screens: the hands photo, dimmed so the curtain stays the subject */
  background: linear-gradient(rgb(28 30 32 / 0.55), rgb(28 30 32 / 0.55)), #3E4042 url("../img/bg-hands.webp") center / cover no-repeat;
  color: #2E2E2D;
}
@supports (height: 1svh) { .rsvp { --H: max(100svh, 720px); } }
.rsvp::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/rsvp-curtain.webp") center top / auto 100% no-repeat;
  /* on wide screens the photo's side edges melt into the hands photo behind */
  -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - var(--H) * 0.353), #000 calc(50% - var(--H) * 0.31), #000 calc(50% + var(--H) * 0.31), transparent calc(50% + var(--H) * 0.353));
  mask-image: linear-gradient(90deg, transparent calc(50% - var(--H) * 0.353), #000 calc(50% - var(--H) * 0.31), #000 calc(50% + var(--H) * 0.31), transparent calc(50% + var(--H) * 0.353));
}
.rsvp .rsvp__inner { width: 100%; max-width: calc(var(--H) * 0.62); padding-top: calc(var(--H) * 0.105); display: flex; flex-direction: column; align-items: center; }

/* v2's own printed words, multiplied into the curtain exactly as the photo has them.
   Placed and sized as a share of the page height (centred, 10.9% down, 49.2% of the height wide),
   and shrunk only when a phone is narrower than that. */
.rsvp .rsvp__printed {
  --pw: min(calc(var(--H) * 0.4922), calc(100vw - 28px));   /* the print's width */
  position: absolute; left: 50%; top: calc(var(--H) * 0.1094);
  width: var(--pw); max-width: none; height: auto;
  translate: -50% 0;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.rsvp__printed img { width: 100%; height: auto; }
/* "PLEASE RESPOND BY …": live text so the date follows the admin deadline, styled to sit in the same print:
   same size and spacing as the artwork's line, soft dark-grey ink. No blur filter: phones rasterise it at low resolution and the line comes out smeared. */
.rsvp__by-print {
  margin-top: calc(var(--pw) * 0.011);
  font-family: var(--serif); font-size: calc(var(--pw) * 0.0452); line-height: 1.2; letter-spacing: 0.004em;
  color: #3E3D3A; white-space: nowrap; text-align: center;
}
.rsvp__by-print sup { font-size: 0.6em; line-height: 0; vertical-align: 0.62em; margin-left: 0.04em; }

.rsvp__form { width: 100%; margin-top: calc(var(--H) * 0.208); }   /* legend lands at ~32% of the page, as in v2 */
.ticks { margin: 0; padding: 0; border: 0; min-width: 0; }
.ticks__legend { padding: 0; margin: 0 auto; white-space: nowrap; font-size: min(calc(var(--H) * 0.0235), 4.5vw); text-align: center; color: #2B2522; }
/* Names, then their boxes in one column just after the longest name (as in v2) */
.ticks__list { width: fit-content; margin: calc(var(--H) * 0.05) auto 0; }
.tick {
  display: flex; align-items: center; justify-content: space-between; gap: calc(var(--H) * 0.032);
  min-height: calc(var(--H) * 0.052); cursor: pointer; text-align: start;
  font-size: min(calc(var(--H) * 0.032), 6.6vw); line-height: 1.1; color: #2B2522;
}
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick i { flex: none; width: 0.95em; height: 0.95em; border: 1.6px solid #1F1B19; border-radius: 0.2em; display: grid; place-items: center; transition: background-color 0.2s ease; }
.tick input:checked + i { background: #2B2522; }
.tick input:checked + i::after { content: ""; width: 0.45em; height: 0.25em; border: solid #F5F3EF; border-width: 0 0 2px 2px; rotate: -45deg; translate: 0 -0.06em; }
.tick input:focus-visible + i { outline: 2px solid #2B2522; outline-offset: 3px; }

.open-rsvp { text-align: start; }
.field__label { display: block; margin-bottom: 8px; font-size: min(calc(var(--H) * 0.0235), 4.6vw); text-align: center; }
.field__input {
  width: 100%; min-height: 48px; padding: 0 12px;
  border: 1.4px solid rgb(46 46 45 / 0.6); border-radius: 4px;
  background: rgb(255 255 255 / 0.7); color: #2E2E2D;
  font-family: var(--serif); font-size: 19px;
}
.field__input:focus-visible { outline: 2px solid #2E2E2D; outline-offset: 2px; }
.field__error { margin: 6px 0 0; font-size: 15px; color: #8A1C2B; text-align: center; }
.ticks--open { margin-top: calc(var(--H) * 0.03); }
.ticks--open .ticks__list { margin-top: calc(var(--H) * 0.015); }

/* SUBMIT and the follow-up line sit below the curtain's hem, in white on the photo */
.rsvp .rsvp__below { position: absolute; left: 16px; right: 16px; bottom: calc(var(--H) * 0.04); max-width: none; width: auto; color: #F5F3EF; }
.rsvp__submit {
  display: block; margin: 0 auto; min-height: 48px; padding: 0 24px;
  border: 1px solid rgb(245 243 239 / 0.7); border-radius: 999px; background: rgb(255 255 255 / 0.06); cursor: pointer;
  padding: 10px 34px 8px;
  font-family: var(--serif); font-size: min(calc(var(--H) * 0.04), 9vw); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase;
  color: #F5F3EF; text-shadow: 0 1px 10px rgb(0 0 0 / 0.35);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px;
  transition: text-decoration-color 0.25s ease;
}
.rsvp__submit:hover, .rsvp__submit:focus-visible { background: rgb(255 255 255 / 0.16); }
.rsvp__submit:focus-visible { outline: none; }
.rsvp__submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.rsvp__status { min-height: 1.2em; font-size: 15px; color: #F5F3EF; text-shadow: var(--shadow); }
.rsvp__follow { white-space: nowrap; font-size: min(calc(var(--H) * 0.0235), 4.05vw); letter-spacing: 0.01em; color: #F5F3EF; text-shadow: 0 1px 8px rgb(0 0 0 / 0.4); }

/* After Submit: the curtain is cleared and only the thank-you remains, centred on it */
.rsvp .rsvp__thanks {
  position: absolute; left: 0; right: 0; top: calc(var(--H) * 0.3); max-width: none; width: 100%;
  padding: 0 16px; text-align: center;
  outline: none; color: #2B2522; mix-blend-mode: multiply;
}
/* One font for the whole thank-you (Cormorant Garamond Italic), larger for "Thank you" */
.rsvp__thanks { font-family: var(--italic); font-style: italic; font-weight: 500; }
.rsvp__thanks-script { font-size: min(calc(var(--H) * 0.068), 13.5vw); line-height: 1.1; letter-spacing: 0.005em; }
.rsvp__thanks-msg { margin-top: 2px; font-size: min(calc(var(--H) * 0.034), 7vw); letter-spacing: 0.01em; }
.rsvp__thanks-follow { margin: calc(var(--H) * 0.012) auto 0; font-size: min(calc(var(--H) * 0.028), 5.8vw); line-height: 1.35; letter-spacing: 0.01em; }
.rsvp__thanks .rsvp__preview { margin-top: 18px; font-family: var(--serif); font-style: normal; font-size: 13px; opacity: 0.75; }
/* After Submit the follow-up line lives on the curtain, in script, instead of under the hem */
.rsvp.is-done .rsvp__printed, .rsvp.is-done .rsvp__current, .rsvp.is-done .rsvp__follow { display: none; }
/* The words on the curtain and SUBMIT fade away before the thank-you appears */
.rsvp.is-leaving .rsvp__printed, .rsvp.is-leaving .rsvp__form, .rsvp.is-leaving .rsvp__current, .rsvp.is-leaving .rsvp__submit {
  opacity: 0; transition: opacity 0.45s ease;
}
.rsvp__thanks .rsvp__status { color: #2E2E2D; text-shadow: none; }

.rsvp__current { margin-top: calc(var(--H) * 0.02); max-width: 30em; font-size: min(calc(var(--H) * 0.019), 3.8vw); color: #3A3634; }
.rsvp__closed { margin-top: calc(var(--H) * 0.035); color: #2B2522; }
.rsvp__closed-title { font-family: var(--script); font-size: min(calc(var(--H) * 0.05), 11vw); line-height: 1.1; }
.rsvp__closed-msg { margin-top: 6px; font-size: min(calc(var(--H) * 0.024), 4.8vw); }

/* ---------- Official invitation (interim layout, ADR-0039) ---------- */

.invite__dear { font-size: clamp(19px, 5.4vw, 24px); }
.invite__title { margin: 18px 0 0; font-family: var(--script); font-weight: 400; font-size: clamp(52px, 15vw, 72px); line-height: 1.1; color: var(--paper-script); }
.invite__to { margin-top: 6px; font-size: clamp(18px, 5vw, 22px); }
.invite__couple { margin-top: 10px; font-size: clamp(26px, 8vw, 40px); letter-spacing: 0.04em; text-transform: uppercase; }
.invite__details { margin-top: 28px; padding: 18px 0; border-top: 1px solid rgb(91 91 89 / 0.3); border-bottom: 1px solid rgb(91 91 89 / 0.3); font-size: clamp(18px, 5vw, 21px); line-height: 1.6; }
.invite__date { letter-spacing: 0.02em; }
.invite__coming { margin-top: 22px; font-size: 16px; color: #6B6A66; }
.invite__close { margin-top: 18px; font-family: var(--script); font-size: clamp(30px, 9vw, 40px); color: var(--paper-script); }
[data-invitation-pending] { opacity: 0.75; }

/* ---------- Larger screens: same column, more air ---------- */

@media (min-width: 768px) {
  body { font-size: 20px; }
  .br-m { display: none; }
  .br-d { display: inline; }
  .sec > * { max-width: 540px; }
  .stage { --w: 480px; }
  .letter__names { font-size: 52px; max-width: none; }
  .locket__img { width: 460px; }
}

/* =========================================================
   Motion (ADR-0027, ADR-0032, ADR-0035). Only with JS and no Reduce Motion.
   Smoothness rules: animate only transform/translate/scale/rotate and opacity;
   anything that moves forever or carries a shadow gets its own GPU layer;
   one soft ease-out curve everywhere, no bounces.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  @font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root { --soft: cubic-bezier(0.22, 1, 0.36, 1); }  /* ease-out-quint: fast start, long gentle landing */

  .js [data-anim] { opacity: 0; }
  .js .is-in [data-anim="fade-up"] { animation: fade-up 1.1s var(--soft) var(--d, 0s) both; }
  .js .is-in [data-anim="fade"] { animation: fade 1.2s ease var(--d, 0s) both; }
  .js .is-in [data-anim="pop"] { animation: pop 0.9s var(--soft) var(--d, 0s) both; }
  .js .is-in [data-anim="swing"] { animation: swing-in 2.6s cubic-bezier(0.37, 0, 0.2, 1) 0.1s both, sway 5s ease-in-out 2.7s infinite alternate; }
  .js .is-in [data-anim="oval"] { animation: oval-in 1.8s cubic-bezier(0.25, 0.1, 0.25, 1) 1.9s both; }   /* eases in as the hands settle */

  .js .closed__float, .js .flap, .js .heart, .js .locket__img,
  .js .hand, .js .oval, .js .env--back, .js .env--front, .js .env--closed { will-change: transform, opacity; }

  /* Envelope. One moment (auto-open or a tap) starts one timeline (all delays count from the tap, no script timers):
     0.00–0.65s  the flap swings up and over on its hinge (faces swap when it stands upright)
     0.40–0.90s  the open envelope from the design fades in underneath as the closed one fades out
     0.55–1.95s  the lace heart rises out of the pocket on a soft ease-out (steps overlap, so it flows)
     1.15s       "We're Getting Married" fades in; 1.9s the Scroll hint appears
     It opens by itself 1.6s after the envelope images are ready (or sooner on a tap).
     The closed envelope keeps floating while it fades, so nothing ever snaps. */
  .js .closed__float { animation: float 4s ease-in-out infinite; }
  .js .stage.is-opening .flap { animation: flap-open 0.65s both; }
  .js .stage.is-opening .flap__front { animation: face-out 0.65s step-end both; }
  .js .stage.is-opening .flap__back { animation: face-in 0.65s step-end both; }
  .js .stage .env--closed { transition: opacity 0.5s ease-in-out 0.4s, visibility 0s linear 0.9s; }
  .js .stage .env--back, .js .stage .env--front { transition: opacity 0.5s ease-in-out 0.4s; }
  .js .stage .heart { transition: translate 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.55s, opacity 0.5s ease-out 0.55s; }
  .js .stage .heart__text { transition: opacity 0.8s ease 1.15s; }

  /* The links that replace "Tap envelope to open" fade in once the heart has risen */
  /* Hints move gently and forever, so the eye finds them; only transform and opacity, so it stays smooth */
  .js .letter > .next { transition: opacity 0.7s ease 1.9s, visibility 0s linear 1.9s; }
  .js .next svg { animation: nudge 1.8s ease-in-out infinite; }
  /* Still on the same page after ~5s: the arrow bobs a little further, until they scroll */
  .js .is-idle .next svg { animation: nudge-strong 1.2s ease-in-out infinite; }
  .js .kindly.is-in .oval__click::after {
    content: ""; position: absolute; inset: -1px; border-radius: 999px; border: 1px solid rgb(106 105 100 / 0.6);
    animation: pill-pulse 2.2s ease-out 3.8s infinite; pointer-events: none;
  }
  .js 
  /* Kindly RSVP: the two hands reach in from either side, then the oval settles between them */
  .js .kindly .hand { opacity: 0; }
  /* Gentle reach (2.9s, soft start and soft landing), then the oval fades in as the hands settle */
  .js .kindly.is-in .hand--her { animation: reach-her 2.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
  .js .kindly.is-in .hand--his { animation: reach-his 2.9s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both; }


  @keyframes fade-up { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .js .rsvp.is-done .rsvp__thanks { animation: thanks-in 1.2s var(--soft) both; }
  @keyframes thanks-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
  @keyframes pop { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
  @keyframes swing-in {
    0%   { opacity: 0; transform: translateY(-24px) rotate(-6deg); }
    30%  { opacity: 1; }
    55%  { transform: translateY(0) rotate(2.2deg); }
    78%  { transform: rotate(-0.8deg); }
    100% { opacity: 1; transform: rotate(0); }
  }
  @keyframes sway { from { rotate: -0.7deg; } to { rotate: 0.7deg; } }
  @keyframes oval-in { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.96); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -6px, 0); } }
  @keyframes reach-her { from { opacity: 0; transform: translate3d(-7%, -3%, 0); } 45% { opacity: 1; } to { opacity: 1; transform: none; } }
  @keyframes reach-his { from { opacity: 0; transform: translate3d(7%, 3%, 0); } 45% { opacity: 1; } to { opacity: 1; transform: none; } }
  @keyframes flap-open {  /* one continuous ease-in-out, split at the upright point with matching speeds */
    0%   { transform: perspective(1100px) rotateX(0deg);   animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.5); }
    50%  { transform: perspective(1100px) rotateX(90deg);  animation-timing-function: cubic-bezier(0.25, 0.5, 0.55, 1); }
    100% { transform: perspective(1100px) rotateX(180deg); }
  }
  @keyframes face-out { 0% { opacity: 1; } 50%, 100% { opacity: 0; } }
  @keyframes face-in  { 0% { opacity: 0; } 50%, 100% { opacity: 1; } }
  @keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
  @keyframes nudge-strong { 0%, 100% { translate: 0 0; } 45% { translate: 0 10px; } 60% { translate: 0 8px; } }
  @keyframes ripple { 0% { opacity: 0; transform: scale(0.4); } 15% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.6); } }
  @keyframes pill-pulse { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25, 1.6); } }
  @keyframes tap-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.7); } }
}
.nowrap { white-space: nowrap; }
