@font-face {
  font-family: "Cormorant Garamond";
  src: url("cormorant-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3ebdd;
  --ivory: #faf4e9;
  --ink: #12214f;
  --cobalt: #152e88;
  --muted: #545570;
  --rule: #c8bea9;
  --display: "Bodoni 72", Didot, "Times New Roman", serif;
  --ui: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #e7dfd1; }
body { margin: 0; color: var(--ink); font: 1rem/1.55 var(--ui); }
body.sealed { overflow: hidden; }
body.portal-preview .invitation { position: relative; z-index: 3; background: transparent; box-shadow: none; pointer-events: none; visibility: hidden; }
body.portal-preview [data-chapter] { visibility: hidden !important; }
body.portal-preview #venue-art { visibility: visible; }
body.portal-preview .journey-stage, body.portal-preview .hero { background: transparent; }
body.portal-preview .hero { clip-path: url(#portal-exposure); }
body.portal-preview .stationery { will-change: transform; }
body.sealed .hero-copy { opacity: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; }
button, a[href] { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 5px; }

.art-definitions, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

:root {
  --paper-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.18' filter='url(%23p)'/%3E%3C/svg%3E");
}

.invitation, .envelope {
  width: min(100%, 480px);
  margin-inline: auto;
  background-color: var(--paper);
  background-image: var(--paper-grain);
  background-size: 180px 180px;
  box-shadow: 0 0 55px #3c2d1b20;
}
.invitation { --display: "Cormorant Garamond", "Bodoni 72", Didot, serif; }

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 480px;
  min-height: max(480px, 100svh);
  padding: 24px clamp(16px, 6vw, 30px) max(32px, env(safe-area-inset-bottom));
  background: #0d1737;
  color: var(--ivory);
  text-align: center;
  overflow: hidden;
}

.world-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #13295b;
}
.scene-atmosphere, .scene-distance, .scene-light, .scene-haze, .scene-leaves, .world-art::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scene-atmosphere { transform-origin: 50% 50%; }
.scene-distance {
  background: #13295b url("venue-garden-v2.webp") 50% 53% / cover no-repeat;
  transform-origin: 50% 50%;
}
.scene-light {
  background:
    radial-gradient(ellipse 11% 13% at 47% 49%, #ffc77980, transparent 80%),
    radial-gradient(ellipse 5% 7% at 22% 78%, #ffbd5560, transparent 80%),
    radial-gradient(ellipse 5% 7% at 78% 80%, #ffbd5560, transparent 80%);
  mix-blend-mode: screen;
  opacity: .7;
}
.scene-haze {
  background: radial-gradient(ellipse 44% 10% at 83% 50%, #b3c3eb38, transparent 85%), radial-gradient(ellipse 30% 8% at 68% 65%, #f7bb7928, transparent 90%);
  mix-blend-mode: screen;
  opacity: .16;
}
.scene-leaves {
  transform-origin: 0 0;
  isolation: isolate;
  mask-image: linear-gradient(to right, #000, transparent 15%), linear-gradient(#000 7%, transparent 18%);
  mask-composite: add;
}
.scene-leaves > span {
  position: absolute;
  inset: 0;
  background: url("venue-leaves.webp") 50% 53% / cover no-repeat;
  /* Complementary feathered masks reconstruct one image at rest. Additive
     blending keeps their shared edges opaque without a cut through a leaf. */
  mix-blend-mode: plus-lighter;
}
.leaf-canopy {
  mask-image: linear-gradient(to right, #000 45%, transparent 65%), linear-gradient(#000 25%, transparent 41%);
  mask-composite: intersect;
  transform-origin: 0 0;
}
.leaf-tip {
  mask-image: linear-gradient(to right, transparent 45%, #000 65%), linear-gradient(#000 25%, transparent 41%);
  mask-composite: intersect;
  transform-origin: 55% 3%;
}
.leaf-near { mask-image: linear-gradient(transparent 25%, #000 41%); transform-origin: 0 33%; }
.scene-life, .scene-petals, .scene-fireflies { position: absolute; inset: 0; pointer-events: none; }
.scene-life { mask-image: linear-gradient(transparent 32%, #000 42% 75%, transparent 88%); -webkit-mask-image: linear-gradient(transparent 32%, #000 42% 75%, transparent 88%); }
.petal, .firefly { position: absolute; display: block; opacity: 0; pointer-events: none; }
.petal {
  width: 9px;
  height: 17px;
  border-radius: 76% 24% 72% 28% / 66% 39% 61% 34%;
  background: var(--paper-grain), linear-gradient(105deg, #c8becc, #fff1d8 40%, #fff7e7 60%, #c8bfd1);
  box-shadow: inset 1px 0 1px #fffaf399, 1px 1px 3px #07173722;
  transform-origin: 50% 30%;
}
.petal::after { content: ""; position: absolute; inset: 2px 43% 4px 44%; border-left: 1px solid #a5a0b533; border-radius: 50%; }
.petal:nth-child(1) { left: 7%; top: 36%; }
.petal:nth-child(2) { left: 83%; top: 29%; width: 7px; height: 13px; }
.petal:nth-child(3) { left: 65%; top: 48%; width: 10px; height: 18px; filter: blur(.45px); }
.petal:nth-child(4) { left: 12%; top: 54%; width: 6px; height: 11px; }
.petal:nth-child(5) { left: 84%; top: 56%; width: 8px; height: 15px; }
.firefly {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff3bd;
  box-shadow: 0 0 5px 2px #f7cc6580, 0 0 14px 4px #e9b85824;
}
.firefly:nth-child(1) { left: 18%; top: 62%; }
.firefly:nth-child(2) { left: 29%; top: 72%; width: 2px; height: 2px; }
.firefly:nth-child(3) { left: 81%; top: 67%; }
.firefly:nth-child(4) { left: 91%; top: 73%; width: 2px; height: 2px; }
.firefly:nth-child(5) { left: 74%; top: 78%; }
.firefly:nth-child(6) { left: 12%; top: 78%; }
.firefly:nth-child(7) { left: 40%; top: 59%; width: 2px; height: 2px; }
.world-art::after {
  content: "";
  background: linear-gradient(180deg, #0d173705 0%, transparent 41%, #0a132d32 58%, #0a132dde 85%, #0a132df7);
}

.eyebrow {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.hero-kicker { display: flex; justify-content: center; align-items: center; gap: 12px; color: #f6deb6; }
.hero-kicker span { width: 24px; height: 1px; background: #f6deb681; }
.hero-copy { position: relative; z-index: 1; width: 100%; text-shadow: 0 1px 10px #070d24b3; }
h1, h2, h3 { font: 400 3rem/1.02 var(--display); text-wrap: balance; }
h1 { font-size: clamp(3.1rem, 15vw, 4.5rem); margin: 8px 0 12px; letter-spacing: -.035em; }
.couple-name, .couple-amp { display: inline-block; }
.couple-name { max-width: 100%; overflow-wrap: anywhere; }
.couple-amp { font-size: .72em; }
h1:focus, #reply-result:focus { outline: none; }
.wedding-date { margin: 0; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.venue-name { margin: 9px 0 23px; font: 400 1.4rem/1.3 var(--display); }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 22px; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 133px;
  min-height: 49px;
  padding: 13px 22px;
  border: 1px solid var(--cobalt);
  border-radius: 2px;
  background: var(--cobalt);
  color: var(--ivory);
  font: 500 .76rem/1.35 var(--ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.primary-button:hover { background: #102461; }
.reply .primary-button { background: #f5e9d1; border-color: #f5e9d1; color: #15214a; text-shadow: none; }
.reply .primary-button:hover { background: #fff5e2; }
.hero .primary-button { min-width: 144px; background: #08142d24; border-color: #f2dfb580; color: #faedd6; }
.hero .primary-button:hover { background: #f5e9d119; border-color: #f2dfb5; }
.hero :focus-visible, .reply :focus-visible { outline-color: #f5e9d1; }
.details-link { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: #faf4e9; font: 400 1.15rem/1.2 var(--display); text-decoration: none; }
.details-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.ornament { display: block; width: 26px; height: 26px; margin-inline: auto; color: var(--cobalt); }

.invitation-note {
  padding: 30px 20px;
  background: linear-gradient(#f3ebdd66, #f3ebdd66), #f3ebdd url("moonflower-paper.webp") center / cover;
  scroll-margin-top: 0;
}
.letter {
  position: relative;
  padding: 36px 25px 32px;
  background: #faf4e9 url("ivory-paper.webp") center / cover;
  border: 1px solid #d0c1a7;
  text-align: center;
}
.letter::before { content: ""; position: absolute; inset: 7px; border: 1px solid #c6bca66b; pointer-events: none; }
.letter .ornament { width: 22px; height: 22px; margin-bottom: 24px; }
.letter .eyebrow { font-size: .6rem; letter-spacing: .17em; }
.letter h2 { margin: 19px 0 20px; font-size: clamp(3rem, 13vw, 3.8rem); line-height: .95; letter-spacing: -.025em; }
.letter-copy { max-width: 250px; margin: 0 auto; color: #404764; font: 400 1.23rem/1.5 var(--display); text-wrap: pretty; }
.date-lockup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; margin: 29px auto 20px; max-width: 280px; }
.date-lockup > span { padding-block: 9px; border-block: 1px solid #b6ae9c; font-size: .59rem; line-height: 1.8; letter-spacing: .12em; text-transform: uppercase; }
.date-lockup strong { font: 400 4rem/.9 var(--display); letter-spacing: -.045em; }
.letter-venue { margin: 0 0 3px; font: 400 1.85rem/1.2 var(--display); }
.letter-signature { margin: 26px 0 0; font: 400 1.1rem/1.4 var(--display); }

.details { padding: 42px clamp(26px, 8vw, 40px) 32px; background: #f5eddf url("ivory-paper.webp") 50% 50% / cover; text-align: center; }
.details h2 { margin: 12px 0; font-size: 3rem; letter-spacing: -.02em; }
.section-intro { margin: 0 auto 30px; color: #505571; font: 400 1.2rem/1.45 var(--display); }
.schedule { margin: 0; text-align: left; }
.schedule > div { padding: 22px 0 25px; border-top: 1px solid #c0b69f; }
.schedule dt { display: grid; grid-template-columns: 76px 1fr; align-items: baseline; gap: 18px; }
.event-time { font: 400 1.7rem/1.1 var(--display); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.event-time small { font: 400 .7rem/1.2 var(--ui); }
.event-name { font: 500 1.7rem/1.15 var(--display); }
.schedule dd { margin: 9px 0 0 94px; color: #505571; font-size: .86rem; line-height: 1.65; text-wrap: pretty; }
.venue-note { padding: 0 0 45px; margin-bottom: 39px; border-bottom: 1px solid #c0b69f; }
.venue-note .ornament { width: 18px; height: 18px; margin-bottom: 12px; }
.venue-note h3 { margin: 0 0 4px; font-size: 2.3rem; }
.venue-note > p { margin: 0; }
.venue-note > p:not(.eyebrow) { font: 400 1.2rem/1.4 var(--display); }
.venue-note .venue-caption { margin-top: 26px; color: #505571; font-size: 1.2rem; }
.venue-keepsake { position: relative; margin: 28px -4px 0; padding: 13px 13px 21px; background: #fbf5e8; border: 1px solid #c9baa0; box-shadow: 0 7px 18px #4e463111; transform: rotate(-1.5deg); }
.venue-keepsake::after { content: ""; position: absolute; inset: 5px; border: 1px solid #bca98555; pointer-events: none; }
.venue-portrait { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 47% 47% 0 0; background: #152659; }
.venue-portrait-art { position: absolute; inset: 0; background: url("venue-garden-v2.webp") 50% 65% / 100% auto no-repeat; }
.venue-keepsake figcaption { padding: 19px 0 0; }
.venue-keepsake figcaption p { margin: 0; color: var(--muted); font-size: .65rem; letter-spacing: .17em; text-transform: uppercase; }
.calendar-link { display: inline-flex; align-items: center; justify-content: center; gap: 17px; min-height: 48px; margin-top: 17px; padding: 0 5px; color: var(--ink); border-bottom: 1px solid #a2967e; font: 400 1.2rem/1.3 var(--display); text-decoration: none; }
.calendar-link:hover { border-color: var(--cobalt); }
.venue-note .calendar-note { margin-top: 9px; color: #626072; font: .63rem/1.5 var(--ui) !important; }

.reply {
  padding: 43px clamp(26px, 8vw, 40px) 40px;
  background: var(--paper-grain) 0 0 / 180px 180px, #172b61;
  color: #faf4e9;
  text-align: center;
  scroll-margin-top: 0;
}
.reply-content > .ornament { color: #ead6b1; margin-bottom: 24px; width: 23px; height: 23px; }
.reply-content > .eyebrow { color: #e2cba8; font-size: .62rem; }
.reply h2 { margin: 14px 0 9px; font-size: clamp(2.5rem, 11vw, 3rem); letter-spacing: -.025em; }
.reply-intro { margin: 0; color: #d3dbeb; font: 400 1.15rem/1.4 var(--display); }
.reply form { margin-top: 29px; text-align: left; }
.form-field { margin: 0 0 24px; }
.form-field > label, .reply legend { display: block; margin-bottom: 10px; font-size: .76rem; letter-spacing: .04em; }
.form-field label span { float: right; color: #bac8e2; font-size: .69rem; }
.form-field input, .form-field textarea { display: block; width: 100%; min-height: 48px; padding: 12px 0; border: 0; border-bottom: 1px solid #8c9cbc; border-radius: 0; background: transparent; color: #fff9ef; font-size: 1rem; }
.form-field textarea { padding: 12px; min-height: 88px; border: 1px solid #8c9cbc; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #aebddb; opacity: 1; font-size: .88rem; }
.reply fieldset { min-width: 0; margin: 0 0 25px; padding: 0; border: 0; }
.reply legend { padding: 0; }
.response-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 13px 11px; border: 1px solid #8c9cbc; color: #f8f0e2; font: 400 1.15rem/1.1 var(--display); cursor: pointer; }
.choice:has(:checked) { border-color: #f5e9d1; background: #f5e9d1; color: #15214a; }
.choice input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: #1a3169; }
.choice:focus-within { outline: 2px solid #f5e9d1; outline-offset: 3px; }
.reply .primary-button { width: 100%; }
.demo-note { margin: 13px 0 0; color: #c4cfe5; font-size: .72rem; line-height: 1.6; text-align: center; }
#reply-confirmation { margin-top: 30px; padding: 25px 0 8px; border-top: 1px solid #8c9cbc; }
#reply-confirmation .ornament { color: #e2cba8; }
#reply-result { margin: 15px 0 10px; font: 400 2.2rem/1.1 var(--display); }
#reply-summary { font: 400 1.2rem/1.5 var(--display); overflow-wrap: anywhere; }
.reply .text-button { margin-top: 14px; color: #faf4e9; }
.text-button { display: inline-grid; place-items: center; min-height: 44px; padding: 0 9px; border: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.footer { display: grid; justify-items: center; padding: 28px 20px 26px; background: #f5eddf url("ivory-paper.webp") 50% 65% / cover; color: #505571; font-size: .72rem; }
.footer-monogram { display: flex; align-items: center; gap: 13px; margin: 0 0 8px; color: var(--cobalt); font: 400 2.7rem/1 var(--display); }
.footer-monogram svg { width: 18px; height: 18px; }
.footer .eyebrow { font-size: .62rem; letter-spacing: .2em; }
.footer .text-button { margin: 15px 0 3px; font-size: .76rem; }

.envelope {
  /* The lowest point of the SVG flap outline sits at the seal center. */
  --flap-depth: 50%;
  --seal-size: clamp(92px, min(36vw, 23svh), 170px);
  position: fixed;
  z-index: 2;
  inset: 0;
  min-height: 100%;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

.envelope-content, .stationery-area, .stationery,
.stationery-back, .stationery-pocket, .stationery-flap, .flap-face,
.shadow-receiver, .flap-penumbra, .flap-umbra, .flap-cast {
  position: absolute;
  inset: 0;
}
.envelope-content > .eyebrow {
  position: absolute;
  z-index: 6;
  top: max(24px, env(safe-area-inset-top));
  width: 100%;
  color: var(--ink);
  font-size: .6rem;
  pointer-events: none;
}
.stationery {
  --seal-top: var(--flap-depth);
  perspective: 1200px;
}
.stationery-back {
  background:
    var(--paper-grain) 0 0 / 160px 160px,
    linear-gradient(155deg, #253b76, #111c40 88%);
}

/* Pre-rendered cotton shading preserves the grain without recomputing
   procedural noise as the sheet rotates. */
.envelope {
  --cotton-relief: url("cotton-relief.webp");
  --cotton-lustre: url("cotton-lustre.webp");
}
.paper-surface, .paper-surface::before, .paper-surface::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.paper-surface { z-index: 1; mix-blend-mode: multiply; }
.paper-surface::before, .paper-surface::after { content: ""; }
.paper-surface::before {
  background: var(--cotton-relief) 0 0 / 256px 256px repeat;
  mix-blend-mode: multiply;
  opacity: .58;
}
.paper-surface::after {
  background: radial-gradient(ellipse at var(--paper-light-x, 28%) 25%, #fff5df38, transparent 66%), var(--cotton-lustre) 0 0 / 256px 256px repeat;
  mix-blend-mode: screen;
  opacity: var(--paper-rake, .14);
}
.flap-outer > .paper-surface { inset: -2% 0 2%; clip-path: url(#flap-outline); }
.flap-inner > .paper-surface { inset: 0 0 2px; clip-path: url(#flap-outline); }
.stationery-back > .paper-surface::before, .flap-inner > .paper-surface::before { opacity: .34; }
.invitation-card > .paper-surface { z-index: 0; }
.invitation-card > .paper-surface::before { opacity: .5; }
.invitation-card > .card-door, .card-initials { z-index: 1; }

.card-slot {
  position: absolute;
  z-index: 1;
  inset: -140% 12% 9%;
  overflow: hidden;
  pointer-events: none;
}
.invitation-card {
  --card-rest: .52;
  position: absolute;
  inset: auto 0 0;
  aspect-ratio: 2 / 3;
  transform: translateY(calc(var(--card-rest) * 100%));
  background: var(--paper-grain) 0 0 / 180px 180px, #faf0dc;
  border: 1px solid #beac8c;
  border-radius: 2px;
  box-shadow: 0 2px 4px #10152b80, 0 13px 27px #10152b70;
}
.card-door {
  position: absolute;
  top: 13%;
  left: 50%;
  width: var(--door-width, 63%);
  aspect-ratio: var(--scene-aspect, .56);
  transform: translateX(-50%);
}
.card-initials {
  position: absolute;
  inset: 3% 0 auto;
  color: var(--ink);
  font: 1.65rem/1.1 "Cormorant Garamond", var(--display);
  letter-spacing: .12em;
}
.stationery-pocket {
  z-index: 2;
  clip-path: url(#pocket-outline);
  background:
    radial-gradient(ellipse 44% 9% at 50% calc(var(--seal-top) + var(--seal-size) * .67 + 23px), #f8edddc9, transparent),
    linear-gradient(155deg, #f6ebd867, #f6ebd837 55%, #f6ebd84c),
    #f1e7d5 url("moonflower-paper.webp") 50% 62% / cover no-repeat;
}
.stationery-pocket::before,
.stationery-pocket::after {
  position: absolute;
  inset: 0;
  content: "";
}
.stationery-pocket::before {
  clip-path: polygon(0 100%, 50% 82%, 100% 100%);
  background: linear-gradient(180deg, #fff6e543, #71583e12);
}
.stationery-pocket::after {
  clip-path: polygon(0 100%, 50% 82%, 100% 100%, 50% 82.2%);
  background: #af997e44;
}
.shadow-receiver { z-index: 3; clip-path: url(#pocket-outline); pointer-events: none; }
.flap-penumbra, .flap-umbra { transform-origin: top left; will-change: transform, opacity; }
.flap-penumbra { opacity: .32; filter: blur(24px); transform: translate(4px, 12px); }
.flap-umbra { opacity: .38; filter: blur(2.5px); transform: translate(2px, 6px); }
.flap-cast {
  clip-path: url(#flap-outline);
  background: #080d19;
}
.seal-cast {
  position: absolute;
  top: var(--seal-top);
  left: 50%;
  width: var(--seal-size);
  aspect-ratio: 449 / 601;
  background: #080d19;
  mask: url("wax-blank.webp") center / 100% 100% no-repeat;
  -webkit-mask: url("wax-blank.webp") center / 100% 100% no-repeat;
  transform: translate(-50%, -50%);
}
.stationery-flap {
  z-index: 4;
  transform-origin: center top;
  transform-style: preserve-3d;
  will-change: transform;
}
.flap-face { overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap-outer { transform: translateZ(.3px); will-change: filter; }
.flap-inner { transform: rotateY(180deg) translateZ(.3px); }
.flap-face::before, .flap-face::after {
  position: absolute;
  inset: 0;
  clip-path: url(#flap-outline);
  content: "";
}
.flap-face::before { background: #a790704d; }
.flap-face::after { inset: 0 0 2px; }
.flap-outer::before {
  background:
    linear-gradient(210deg, #fff9ee30, transparent 50%, #75604629),
    #f4ebdc url("ivory-paper.webp") 50% 22% / cover no-repeat;
}
.flap-outer::after {
  inset: -2% 0 2%;
  background:
    linear-gradient(180deg, #f8edddbd, #f8eddd22 14%, #f8eddd18 36%, #f8eddd54),
    #f4ebdc url("moonflower-paper.webp") 50% 22% / cover no-repeat;
}
.flap-inner::after {
  background:
    linear-gradient(210deg, #6579aa, #2c4279 57%, #1e315e),
    #f4ebdc url("ivory-paper.webp") 50% 30% / cover no-repeat;
  background-blend-mode: multiply;
}
.wax-art, .seal-button {
  position: absolute;
  z-index: 1;
  top: var(--seal-top);
  left: 50%;
  width: var(--seal-size);
  min-width: 48px;
  aspect-ratio: 449 / 601;
  transform: translate(-50%, -50%);
}
.wax-art { display: block; overflow: visible; }
.wax-monogram { font: 400 174px/1 "Cormorant Garamond", Georgia, serif; fill: url(#wax-letter-color); stroke: #0a205e; stroke-width: .8px; paint-order: stroke fill; filter: url(#wax-letterpress); }
.seal-button { z-index: 5; border: 0; border-radius: 42%; background: transparent; cursor: pointer; }
.seal-button { touch-action: none; cursor: grab; }
.envelope[data-stage="dragging"] .seal-button { cursor: grabbing; }
.card-reveal { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; }
.card-reveal:disabled { pointer-events: none; }
.card-reveal:focus-visible { outline-offset: -6px; }
.seal-hint {
  position: absolute;
  z-index: 6;
  top: calc(var(--flap-depth) + var(--seal-size) * .67 + 14px);
  width: 100%;
  margin: 0;
  font: italic 1.2rem/1.1 var(--display);
  letter-spacing: .065em;
  pointer-events: none;
  transition: opacity .3s ease;
}
.envelope:is([data-stage="dragging"], [data-stage="settling"]) .seal-hint { opacity: 0; }
.swipe-mark { display: block; margin-bottom: 12px; font: 300 1.25rem/1 var(--ui); animation: swipe-cue 2.8s ease-in-out infinite; }
.envelope:not([data-stage="sealed"]) .swipe-mark { visibility: hidden; animation: none; }
@keyframes swipe-cue {
  0%, 100% { transform: translateY(3px); opacity: .35; }
  50% { transform: translateY(-4px); opacity: .85; }
}
.skip {
  position: absolute;
  z-index: 6;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: .76rem;
}
.card-door { background: #0c1736; clip-path: url(#doorway-cutout); }
.portal-rim { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #d0a56e; stroke-width: 1.3; opacity: .84; }

/* Native scroll moves the camera; the stage itself stays at the viewport origin. */
.zoom-chapter, .journey-controls, .reply-art { display: none; }
.couple-chapter {
  position: relative;
  display: grid;
  align-items: end;
  min-height: max(720px, 100svh);
  padding: 75px 32px 80px;
  overflow: hidden;
  isolation: isolate;
  background: #0a132d;
  color: var(--ivory);
  text-align: center;
}
.couple-chapter::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(transparent 46%, #09122d26 58%, #09122de8 82%, #09122df2);
}
.view-toggle {
  position: fixed;
  z-index: 9;
  top: max(12px, env(safe-area-inset-top));
  right: max(18px, calc((100vw - 480px) / 2 + 18px));
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  background: #f4ebdd;
  color: var(--ink);
  font: 500 .66rem/1 var(--ui);
  letter-spacing: .08em;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}
body.sealed .view-toggle, body.sealed .journey-controls { visibility: hidden; }
body.zoom-mode { background: #0a132d; }
.zoom-mode .invitation { background: #0a132d; }
.zoom-mode .journey { height: var(--journey-height, 680svh); }
.zoom-mode .journey-stage { position: sticky; top: 0; height: 100svh; min-height: 480px; overflow: hidden; isolation: isolate; background: #101e45; }
.zoom-mode .journey-stage > .invitation-note,
.zoom-mode .journey-stage > .details,
.zoom-mode .footer { display: none; }
.zoom-mode [data-chapter] { position: absolute; inset: 0; height: 100%; min-height: 0; margin: 0; background: transparent; overflow: hidden; }
.zoom-mode .hero { padding: 0; z-index: 5; }
.zoom-mode .hero-copy { position: absolute; inset: 0; pointer-events: none; }
.zoom-mode .hero-titles { position: absolute; top: 16%; left: 20px; right: 20px; color: #142a54; text-shadow: 0 1px 5px #e2e5f34d; }
.zoom-mode .hero-kicker { color: #273d66; font-size: .6rem; letter-spacing: .18em; }
.zoom-mode .hero-kicker span { width: 19px; background: #273d6655; }
.zoom-mode .hero h1 { font-size: clamp(2.8rem, 13vw, 3.65rem); margin: 9px 0 13px; }
.zoom-mode .hero .wedding-date { font-size: .65rem; letter-spacing: .13em; }
.zoom-mode .hero .venue-name { position: absolute; bottom: 182px; left: 16px; right: 16px; margin: 0; font-size: 1.1rem; }
.zoom-mode .hero-actions { position: absolute; bottom: 120px; left: 0; right: 0; pointer-events: auto; }
.zoom-mode .hero .primary-button { min-width: 130px; background: #0e244ab8; border-color: #ede1c7b3; }
.zoom-mode .world-art::after { background: linear-gradient(#08152c26, transparent 15% 72%, #09173638 80%, #091736b3); }
.zoom-mode .hero .details-link { display: none; }
.zoom-mode .zoom-chapter { display: grid; align-items: end; padding: 75px 28px 117px; text-align: center; color: var(--ivory); }
.couple-chapter { z-index: 4; }
.ceremony-chapter { z-index: 3; }
.dinner-chapter { z-index: 2; }
.zoom-mode .reply { z-index: 1; padding: 0; overflow: hidden; }
.chapter-art { position: absolute; inset: 0; background-position: 50% 43%; background-size: cover; background-repeat: no-repeat; transform-origin: 50% 43%; }
.couple-art { background-image: url("scene-couple-v2.webp"); }
.ceremony-art { background-image: url("scene-ceremony.webp"); }
.dinner-art { background-image: url("scene-dinner.webp"); }
.reply-art { background-image: url("scene-reply.webp"); }
.zoom-mode .chapter-art { display: block; }
/* The card's viewport-sized painting and this scene share the same center. */
.zoom-mode .hero > .world-art { transform-origin: 50% 50%; }
.zoom-mode .hero > .world-art, .zoom-mode .chapter-art { will-change: transform; }
.zoom-mode .zoom-chapter::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 35%, #09122d38 50%, #09122de8 82%, #09122df2); }
.chapter-copy { position: relative; z-index: 1; text-shadow: 0 2px 14px #061029; }
.chapter-copy .eyebrow { color: #edcfa0; font-size: .61rem; letter-spacing: .2em; }
.chapter-copy h2 { font-size: clamp(3.4rem, 15vw, 4.8rem); line-height: .88; margin: 17px 0 20px; letter-spacing: -.035em; }
.chapter-copy > p:not(.eyebrow) { margin: 0 0 12px; font: 400 1.2rem/1.4 var(--display); }
.chapter-copy .chapter-time { font: 400 2rem/1.1 var(--display) !important; }
.chapter-time span { font: .7rem/1 var(--ui); }
.chapter-copy .chapter-date { color: #d4cbbd; font: .66rem/1.5 var(--ui) !important; letter-spacing: .08em; }
.chapter-copy .calendar-link { margin-top: 2px; color: var(--ivory); border-color: #ead2aa88; font-size: 1rem; }
.couple-chapter .couple-names { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin: 15px 0 18px; font-size: clamp(2.7rem, 13vw, 3.7rem); line-height: .95; }
.couple-names > span { min-width: 0; }
.couple-names > span > span { display: block; overflow-wrap: anywhere; }
.couple-names small { display: block; margin-bottom: 9px; color: #edcfa0; font: 500 .59rem/1.2 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.couple-names em { color: #edcfa0; font-size: .62em; font-style: normal; }
.chapter-copy > .story-copy { max-width: 29ch; margin: 0 auto; font: 400 1.09rem/1.45 var(--display); text-wrap: pretty; }
.zoom-mode .reply-content { position: absolute; inset: 0; overflow-y: auto; padding: max(75px, env(safe-area-inset-top)) clamp(26px, 8vw, 40px) 120px; background: linear-gradient(#07102a12, #07102a8c 25%, #0a1632cc); scrollbar-width: thin; scrollbar-color: #d6c4a477 transparent; }
.zoom-mode .reply-content > .ornament { margin-bottom: 16px; }
.zoom-mode .reply form { margin-top: 22px; }
.zoom-mode .reply .form-field { margin-bottom: 19px; }
.zoom-mode .reply .choice { min-height: 60px; }
.zoom-mode .reply .form-field textarea { min-height: 70px; }
.zoom-mode .view-toggle { background: transparent; color: #fff6e4; text-shadow: 0 1px 8px #07102a; }
.zoom-mode .journey-controls { display: block; position: absolute; z-index: 7; inset: 0; pointer-events: none; color: #fff4df; background: linear-gradient(#08152c66, transparent 78px); }
.journey-position { position: absolute; top: max(28px, env(safe-area-inset-top)); left: 28px; margin: 0; font: 500 .64rem/1.2 var(--ui); letter-spacing: .08em; text-shadow: 0 1px 8px #07102a; }
.journey-position span:first-child { margin-right: 10px; color: #eed2a5; font-variant-numeric: tabular-nums; }
.journey-cue { position: absolute; bottom: 58px; left: 0; right: 0; margin: 0; text-align: center; color: #f5e3c8; font: italic 1.07rem/1.3 var(--display); }
.journey-cue span { display: inline-block; margin-left: 9px; font-style: normal; }
.journey-nav { position: absolute; bottom: 10px; left: 18px; right: 72px; display: flex; justify-content: center; gap: 2px; pointer-events: auto; }
.journey-nav button { flex: 1; min-width: 44px; max-width: 52px; height: 44px; padding: 19px 2px; border: 0; background: none; cursor: pointer; }
.journey-nav button span { display: block; height: 2px; background: #f1dfb749; }
.journey-nav button[aria-current] span { background: #f1dfb7; }
.journey-replay { position: absolute; bottom: 10px; right: 17px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: #e2d9ca; font: .62rem/1 var(--ui); cursor: pointer; pointer-events: auto; }
.zoom-mode :is(.journey-nav, .view-toggle, .journey-replay) :focus-visible,
.zoom-mode .view-toggle:focus-visible, .zoom-mode .journey-replay:focus-visible { outline-color: #f1dfb7; }
.zoom-chapter h2:focus, #rsvp-title:focus { outline: none; }

@media (max-height: 680px) {
  .zoom-mode .hero-titles { top: 15%; }
  .zoom-mode .hero h1 { font-size: clamp(2.45rem, 12vw, 3.15rem); }
  .zoom-mode .hero .venue-name { bottom: 156px; font-size: 1rem; }
  .zoom-mode .hero-actions { bottom: 98px; }
  .zoom-mode .zoom-chapter { padding-bottom: 95px; }
  .chapter-copy h2 { font-size: 3.3rem; margin-block: 12px; }
  .chapter-copy > p:not(.eyebrow) { font-size: 1.05rem; }
  .journey-cue { bottom: 54px; }
  .journey-replay { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
