/* =====================================================================
   Darven & Chearisse — civil wedding invitation
   Design system combined from design-specs/*.json + reference images.
   Mobile-first (390px) → tablet (640px) → desktop (900px+).
   ===================================================================== */
:root {
  --ivory: #FAF7EF;
  --ivory-2: #F3EDE2;
  --white: #FFFDF8;
  --navy: #123653;          /* primary navy: buttons, nav, deep panels */
  --navy-ink: #173B61;      /* headings & calligraphy */
  --text: #244563;          /* body copy */
  --dusty: #819CB4;         /* botanical line art, outlines */
  --dusty-ink: #4E6E8E;     /* dusty blue dark enough for small text */
  --pale: #DCE5ED;          /* watercolor wash */
  --gold: #B18A4B;          /* ornament gold */
  --gold-soft: #C7A875;
  --rule: #B9AE9A;          /* fine separators */
  --field: #D6D9D9;
  --err: #B74444;
  --linen: #E4DBCF;
  --navy-deep: #2F4A6B;     /* legacy token used by the envelope styles */
  --dusty-legacy: #5B7A99;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --display: "Playfair Display", "Bodoni Moda", Didot, Georgia, serif;
  --script: "Pinyon Script", "Allura", "Great Vibes", "Snell Roundhand", cursive;

  --vh: 1vh;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@supports (height: 100svh) { :root { --vh: 1svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory) url("../img/paper.webp");
  color: var(--text);
  font: 500 18px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--dusty-ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.pre { white-space: pre-line; }

/* =====================================================================
   OPENING ENVELOPE
   ===================================================================== */
html.is-intro, html.is-intro body { overflow: hidden; height: 100%; }
html.is-intro #site, html.is-intro .nav, html.is-intro .music, html.is-intro .petals { visibility: hidden; }

.intro {
  --ew: min(92vw, 640px, calc((var(--vh) * 100 - 90px) * .87));
  --eh: calc(var(--ew) / 1.6598);
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(255, 251, 244, .55) 0%, rgba(255, 251, 244, 0) 55%),
    radial-gradient(140% 120% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(90, 70, 50, .16) 100%),
    var(--linen) url("../img/linen.webp");
  overflow: hidden;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.intro__stage {
  display: flex; flex-direction: column; align-items: center;
  margin-top: calc(var(--eh) * .38);
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .9s ease, transform 1.1s var(--ease);
}
.intro.is-ready .intro__stage { opacity: 1; transform: none; }

.env { position: relative; width: var(--ew); height: var(--eh); perspective: 1600px; cursor: pointer; }
.env > * { position: absolute; inset: 0; }
.env__shadow {
  inset: 3% 1.5% 0; border-radius: 6px;
  box-shadow: 0 22px 44px -6px rgba(74, 56, 38, .34), 0 6px 14px rgba(74, 56, 38, .16);
  z-index: 0;
}
/* inner back panel + liner, seen through the open V */
.env__inside {
  z-index: 1; border-radius: 3px;
  background:
    linear-gradient(to bottom, rgba(47, 74, 107, .0) 40%, rgba(47, 74, 107, .22) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%235B7A99' stroke-width='1' opacity='.55'%3E%3Cpath d='M22 6c4 5 4 10 0 15-4-5-4-10 0-15zM6 30c5-1 9 1 11 6-5 1-9-1-11-6zM38 30c-5-1-9 1-11 6 5 1 9-1 11-6z'/%3E%3C/g%3E%3Ccircle cx='22' cy='38' r='1.6' fill='%23B8975A' opacity='.7'/%3E%3C/svg%3E") 0 0 / 22px 22px,
    #DCE5EE;
}
.env__letter { z-index: 3; inset: 5% 5.5% auto; height: 88%; will-change: transform; }
.env__letter.is-front { z-index: 8; }
.env__pocket {
  z-index: 4;
  clip-path: polygon(0 14.7%, 29.15% 50.25%, 49.5% 75.1%, 70.6% 49.6%, 100% 14.2%, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 14.7%, 29.15% 50.25%, 49.5% 75.1%, 70.6% 49.6%, 100% 14.2%, 100% 100%, 0 100%);
}
.env__pocket img, .env__flap img { width: 100%; height: 100%; border-radius: 3px; }
.env__flap { z-index: 5; transform-origin: 50% 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; will-change: transform; }
.env.is-open .env__flap { z-index: 2; }
.env__flap-front, .env__flap-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.env__flap-front {
  clip-path: polygon(0 0, 100% 0, 100% 14.2%, 70.6% 49.6%, 49.5% 75.1%, 29.15% 50.25%, 0 14.7%);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 14.2%, 70.6% 49.6%, 49.5% 75.1%, 29.15% 50.25%, 0 14.7%);
}
/* back of the flap = envelope liner (mirrored polygon, pre-flipped) */
.env__flap-back {
  transform: rotateX(180deg);
  clip-path: polygon(0 100%, 100% 100%, 100% 85.8%, 70.6% 50.4%, 49.5% 24.9%, 29.15% 49.75%, 0 85.3%);
  -webkit-clip-path: polygon(0 100%, 100% 100%, 100% 85.8%, 70.6% 50.4%, 49.5% 24.9%, 29.15% 49.75%, 0 85.3%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%235B7A99' stroke-width='1' opacity='.6'%3E%3Cpath d='M22 6c4 5 4 10 0 15-4-5-4-10 0-15zM6 30c5-1 9 1 11 6-5 1-9-1-11-6zM38 30c-5-1-9 1-11 6 5 1 9-1 11-6z'/%3E%3C/g%3E%3Ccircle cx='22' cy='38' r='1.6' fill='%23B8975A' opacity='.8'/%3E%3C/svg%3E") 0 0 / 22px 22px,
    linear-gradient(to top, #F7F3EC, #E7EDF3);
}
.env__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(47, 60, 80, .15), rgba(47, 60, 80, .55)); opacity: 0; pointer-events: none; }
.env__flap-back .env__shade { opacity: .5; background: linear-gradient(to top, rgba(47, 60, 80, .1), rgba(47, 60, 80, .5)); }

/* the letter card inside */
.letter {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4% 10%; text-align: center; overflow: hidden;
  background: #FFFDF8 url("../img/paper.webp");
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(60, 45, 30, .18), 0 10px 26px -10px rgba(60, 45, 30, .35);
  color: var(--navy-deep);
}
.letter::before, .letter::after { content: ""; position: absolute; pointer-events: none; }
.letter::before { inset: 4.5%; border: 1px solid rgba(91, 122, 153, .55); }
.letter::after { inset: 6%; border: .5px solid rgba(184, 151, 90, .55); }
.letter__floral { position: absolute; width: 30%; height: 47.6%; }
.letter__floral--l { left: -3%; top: -4%; }
.letter__floral--r { right: -3%; bottom: -4%; transform: scale(-1, -1); }
.letter__kicker { font-weight: 600; font-size: calc(var(--ew) * .022); letter-spacing: .22em; text-transform: uppercase; color: var(--dusty-ink); }
.letter__names { font-family: var(--script); font-size: calc(var(--ew) * .085); line-height: 1.15; margin: 1.5% 0 2%; white-space: nowrap; }
.letter__names em { font-style: normal; font-size: .62em; color: var(--dusty-legacy); padding: 0 .1em; }
.letter__divider { width: 34%; height: calc(var(--ew) * .03); margin: 3% auto 2%; }
.letter__date { font-family: var(--display); font-size: calc(var(--ew) * .026); letter-spacing: .3em; }

/* the wax seal */
.seal {
  position: absolute; z-index: 7;
  inset: auto; left: 39.238%; top: 48.263%; width: 21.3%; height: 36.104%;
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.seal:focus-visible { outline-offset: -8%; }
.seal__half { position: absolute; inset: 0; }
.seal__half img { width: 100%; height: 100%; }
.seal__half--l { clip-path: polygon(0 0, 53% 0, 48% 22%, 55% 41%, 47% 60%, 53% 79%, 49% 100%, 0 100%); -webkit-clip-path: polygon(0 0, 53% 0, 48% 22%, 55% 41%, 47% 60%, 53% 79%, 49% 100%, 0 100%); }
.seal__half--r { clip-path: polygon(52.4% 0, 100% 0, 100% 100%, 48.4% 100%, 52.4% 79%, 46.4% 60%, 54.4% 41%, 47.4% 22%); -webkit-clip-path: polygon(52.4% 0, 100% 0, 100% 100%, 48.4% 100%, 52.4% 79%, 46.4% 60%, 54.4% 41%, 47.4% 22%); }
.seal__glow {
  position: absolute; inset: 2%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 228, .95) 0%, rgba(214, 228, 242, .65) 38%, rgba(214, 228, 242, 0) 70%);
  animation: sealGlow 2.4s ease-in-out infinite;
}
.seal__shine {
  position: absolute; left: 17%; top: 16%; width: 66%; height: 66%;
  border-radius: 50%; overflow: hidden; pointer-events: none;
}
.seal__shine::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 250, 235, .55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-140%) skewX(-18deg);
  animation: sealShine 3.4s ease-in-out 1s infinite;
}
.seal__stars { position: absolute; inset: 0; pointer-events: none; }
.seal__stars svg {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--ew) * .062 * var(--s)); height: calc(var(--ew) * .062 * var(--s));
  margin: calc(var(--ew) * -.031 * var(--s));
  fill: #FFF6DA;
  filter: drop-shadow(0 0 3px rgba(255, 244, 210, .95));
  opacity: 0; transform: scale(0);
  animation: twinkle 2.3s ease-in-out var(--d) infinite;
}
.seal__stars svg:nth-child(odd) { fill: #fff; }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.burst i { position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle, #fff 0 35%, rgba(255, 240, 200, .85) 36%, rgba(255, 240, 200, 0) 70%); }
.burst i.is-star { width: 12px; height: 12px; border-radius: 0; background: #FFF4D4; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); -webkit-clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }

@keyframes sealGlow { 0%, 100% { transform: scale(1); opacity: .45; } 50% { transform: scale(1.32); opacity: .95; } }
@keyframes sealShine { 0% { transform: translateX(-140%) skewX(-18deg); } 45%, 100% { transform: translateX(330%) skewX(-18deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: .2; transform: scale(.4) rotate(80deg); } }

.intro__hint {
  margin-top: max(22px, calc(var(--eh) * .1));
  font-size: 13px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--navy-deep);
  display: flex; align-items: center; gap: 12px;
}
.intro__hint span { animation: breathe 2.4s ease-in-out infinite; }
.intro__hint::before, .intro__hint::after { content: ""; width: 26px; height: 1px; background: var(--dusty-legacy); opacity: .7; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.intro__skip {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .55);
  font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--navy-deep);
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .6s;
}
.intro__skip svg { width: 14px; height: 14px; }
.intro__skip.is-visible { opacity: .8; pointer-events: auto; }

.flash {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 48%, #fff 0%, #fffdf8 45%, #f9f3e8 100%);
}


/* =====================================================================
   SHARED
   ===================================================================== */
#site { overflow-x: hidden; overflow-x: clip; }
.wrap { width: min(100% - 36px, 1040px); margin: 0 auto; position: relative; z-index: 3; }
.wrap--narrow { width: min(100% - 40px, 440px); }
.wrap--map { width: min(100% - 28px, 560px); }
.wrap--attire { width: min(100% - 28px, 640px); }
.section { position: relative; padding: 64px 0 72px; text-align: center; background: var(--ivory) url("../img/paper.webp"); scroll-margin-top: 50px; }

/* torn paper top edge (in the section's own colour) with a pale fibre layer */
.torn::before, .torn::after {
  content: ""; position: absolute; left: 0; right: 0; pointer-events: none;
  -webkit-mask: url("../img/torn-a.svg") repeat-x 0 100% / 640px 100%;
  mask: url("../img/torn-a.svg") repeat-x 0 100% / 640px 100%;
}
.torn::before { top: -21px; height: 22px; background: var(--ivory); z-index: 5; }
.torn::after {
  top: -26px; height: 27px; z-index: 4;
  background: linear-gradient(to bottom, rgba(220, 229, 237, .95), rgba(255, 255, 255, .95));
  -webkit-mask-image: url("../img/torn-b.svg"); mask-image: url("../img/torn-b.svg");
  -webkit-mask-position: 37px 100%; mask-position: 37px 100%;
}

/* fine-line botanical sprigs (navy ink, as in the reference) */
.sprig { position: absolute; width: min(42vw, 280px); height: min(39.2vw, 261px); color: var(--navy-ink); pointer-events: none; z-index: 1; opacity: .9; }
.sprig--sm { width: min(30vw, 200px); height: min(28vw, 187px); }
.sprig--tl { left: 0; top: 0; }
.sprig--tr { right: 0; top: 0; transform: scaleX(-1); }
.sprig--br { right: 0; bottom: 0; transform: scale(-1, -1); }
.sprig--bl { left: 0; bottom: 0; transform: scaleY(-1); }
.sprig--r { right: 0; top: 4%; transform: scaleX(-1) rotate(-20deg); width: min(26vw, 170px); height: min(24vw, 159px); }
.sprig--light { color: #A9BED3; opacity: .55; }

.script { font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 12.5vw, 4.4rem); line-height: 1.12; color: var(--navy-ink); padding: 0 .12em; }
.title-caps { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 11vw, 3.2rem); letter-spacing: .06em; color: var(--navy-ink); line-height: 1.05; }
.lead { font-size: 18px; color: var(--text); margin-top: 6px; }
.small { font-size: 15px; margin-top: 14px; color: var(--dusty-ink); }
.small a { color: var(--dusty-ink); text-underline-offset: 3px; }
.divider { width: 190px; height: 19px; margin: 0 auto 8px; color: var(--dusty); }
.divider--navy { color: var(--navy-ink); }
.divider--gold { color: var(--gold); }
.rule { width: 88%; max-width: 760px; margin: 10px auto 0; border: 0; border-top: 1px solid var(--rule); opacity: .8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 28px; border: 0; border-radius: 999px;
  background: var(--navy); color: var(--white); text-decoration: none; cursor: pointer;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 8px 18px -10px rgba(18, 54, 83, .75);
  transition: transform .18s var(--ease), box-shadow .25s, background-color .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover { background: #1D4A70; transform: translateY(-1px); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.96); box-shadow: 0 4px 10px -6px rgba(18, 54, 83, .7); }
.btn--sm { min-height: 44px; padding: 9px 22px; font-size: 12px; }
.btn--block { width: 100%; }
.btn--wide { width: min(86%, 380px); margin-top: 16px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* =====================================================================
   NAV — mobile: hamburger only (reference); desktop: navy bar
   ===================================================================== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 8px 0 18px; transition: background-color .35s, box-shadow .35s; }
.nav.is-scrolled, .nav.is-menu { background: rgba(250, 247, 239, .96); box-shadow: 0 6px 20px -14px rgba(18, 54, 83, .45); }
.nav__mono { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 19px; color: var(--navy-ink); text-decoration: none; transition: opacity .3s; }
.nav__mono i { width: 1px; height: 20px; background: var(--dusty); }
.nav:not(.is-scrolled):not(.is-menu) .nav__mono { opacity: 0; pointer-events: none; }
.nav__toggle { width: 46px; height: 46px; border: 0; background: none; display: grid; place-content: center; gap: 5px; cursor: pointer; }
.nav__toggle span { width: 22px; height: 1.5px; background: var(--navy-ink); transition: transform .3s var(--ease), opacity .2s; }
.nav.is-menu .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-menu .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-menu .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav__menu { position: absolute; top: 54px; left: 0; right: 0; display: flex; flex-direction: column; padding: 6px 0 16px; background: rgba(250, 247, 239, .98); box-shadow: 0 16px 30px -18px rgba(18, 54, 83, .5); opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s; }
.nav.is-menu .nav__menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .25s, transform .3s var(--ease); }
.nav__menu a { padding: 12px 26px; min-height: 44px; text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--navy-ink); text-align: center; }
.nav__menu a.is-active { color: var(--dusty-ink); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; width: 100%; aspect-ratio: 828 / 3240; overflow: hidden; text-align: center; background: var(--ivory); outline: none; }
.hero__photo { position: absolute; inset: 0; display: block; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* the photo carries an ivory torn-paper panel between ~9% and ~46% of its height: the text sits on it */
.hero__panel { position: absolute; left: 6%; right: 6%; top: 8.9%; height: 37.6%; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.hero__eyebrow { font-size: clamp(10px, 3vw, 13px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dusty-ink); }
.names { margin: 2.2vw 0 1.6vw; font-weight: 400; line-height: .9; color: var(--navy-ink); }
.names__one, .names__two { display: block; font-family: var(--display); font-size: clamp(3rem, 16.4vw, 6.4rem); letter-spacing: -.01em; }
.names__and { position: relative; display: flex; align-items: center; justify-content: center; gap: .1em; font-family: var(--script); font-size: clamp(2.2rem, 11.5vw, 4.4rem); color: var(--dusty-ink); line-height: .85; margin: -.06em 0 -.02em; }
.swash { width: 1.9em; height: .38em; color: var(--dusty); flex: none; }
.swash--l { margin-top: .22em; }
.swash--r { margin-top: -.08em; }
.hero__invite { font-size: clamp(11px, 3.3vw, 14px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dusty-ink); max-width: 19em; line-height: 1.55; }
.divider--hero { width: 46%; max-width: 220px; margin: 2.2vw auto 1.6vw; color: var(--navy-ink); }
.hero__date { font-size: clamp(12px, 3.6vw, 15px); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.6; color: var(--navy-ink); }
.hero__venue { font-family: var(--display); font-size: clamp(17px, 5.2vw, 25px); color: var(--navy-ink); margin-top: 1.4vw; }
.hero__addr { font-size: clamp(13px, 3.9vw, 17px); line-height: 1.35; max-width: 19em; color: var(--text); }
.hero__cta { margin-top: 4vw; width: 72%; max-width: 320px; }
.hero__scrollrow { display: none; }
.hero__tagline { position: absolute; z-index: 2; left: 10%; top: 91.6%; text-align: left; font-size: clamp(9px, 2.6vw, 12px); font-weight: 600; letter-spacing: .2em; line-height: 1.6; text-transform: uppercase; color: var(--navy-ink); }
.hero__scroll { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--navy-ink); border-radius: 50%; color: var(--navy-ink); background: rgba(255, 253, 248, .7); }
.hero__scroll svg { width: 18px; height: 18px; animation: bob 2.2s ease-in-out infinite; }
.hero__scroll--m { position: absolute; z-index: 2; left: 50%; bottom: 1.4%; margin-left: -21px; }
.hero__sprig { display: none; }
@keyframes bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

.hero__step { opacity: 0; transform: translateY(16px); }
html.is-open .hero__step { animation: stepIn 1s var(--ease) forwards; animation-delay: calc(var(--i) * .13s + .2s); }
html.is-open .names__one { animation-name: nameIn; }
html.is-open .names__two { animation-name: nameIn2; }
html.is-open .names__and { animation-name: andIn; }
@keyframes stepIn { to { opacity: 1; transform: none; } }
@keyframes nameIn { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes nameIn2 { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes andIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* =====================================================================
   OUR STORY — watercolour torn-paper panel overlapping the photograph
   ===================================================================== */
.story { padding: 44px 0 50px; }
.story__wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 57% 43%; align-items: center; width: min(100%, 1040px); margin: 0 auto; }
.story__panel {
  position: relative; z-index: 2; margin-right: -9%; padding: 30px 18px 34px 16px;
  background: url("../img/watercolor-blue.webp") center / cover;
  -webkit-mask: url("../img/torn-panel.svg") 0 0 / 100% 100% no-repeat; mask: url("../img/torn-panel.svg") 0 0 / 100% 100% no-repeat;
}
.story__panel .script { font-size: clamp(2.3rem, 11vw, 4.2rem); }
.story__panel .divider { width: 70%; max-width: 190px; }
.story__text { font-size: clamp(13.5px, 3.7vw, 18px); line-height: 1.5; color: var(--text); margin: 4px 0 16px; }
.story__panel .btn { font-size: clamp(10px, 2.8vw, 12px); padding: 9px 16px; letter-spacing: .12em; }
.sprig--panel { position: absolute; right: 2%; bottom: 0; width: 34%; height: 30%; transform: scale(-1, -1); opacity: .75; }
.story__photo { position: relative; z-index: 1; height: 100%; min-height: 300px; }
.story__photo img { width: 100%; height: 100%; object-fit: cover; -webkit-mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100%; mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100%; }
.story__photo.reveal.is-in { transform: none; }

/* =====================================================================
   WEDDING DETAILS + venue photo + navy countdown band
   ===================================================================== */
.details { padding-bottom: 0; }
.details .script { margin-top: 2px; }
.details__grid { display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 860px); margin: 18px auto 0; }
.details__col { padding: 2px 6px; }
.details__col + .details__col { border-left: 1px solid var(--rule); }
.details__icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--navy-ink); }
.details h3 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-ink); line-height: 1.35; margin-bottom: 4px; }
.details__col p { font-size: 15px; line-height: 1.4; color: var(--text); word-break: break-word; }
.venue-photo { position: relative; margin-top: 30px; height: clamp(220px, 58vw, 520px); z-index: 2; }
.venue-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; -webkit-mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100%; mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100%; }
.venue-photo.reveal, .venue-photo.reveal.is-in { transform: none; }
.countdown-band {
  position: relative; margin-top: -16px; padding: 46px 18px 64px; color: var(--white); text-align: center; overflow: hidden;
  background: var(--navy) url("../img/watercolor-navy.webp") center / cover;
}
.countdown-band__title { font-family: var(--script); font-size: clamp(1.8rem, 7.4vw, 3rem); line-height: 1.2; color: var(--white); margin-bottom: 14px; position: relative; z-index: 2; }
.countdown-band__after { font-size: 20px; position: relative; z-index: 2; }
.countdown { position: relative; z-index: 2; display: flex; justify-content: center; gap: 9px; }
.countdown div { width: 70px; padding: 10px 0 8px; border: 1px solid rgba(255, 253, 248, .35); border-radius: 8px; background: rgba(255, 253, 248, .06); }
.countdown b { display: block; font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #C9D6E3; }

/* =====================================================================
   ATTIRE
   ===================================================================== */
.attire { padding-top: 56px; }
.attire.torn::before { top: -21px; }
.attire .script { font-size: clamp(2.3rem, 10vw, 4.2rem); }
.countdown-band .sprig { width: min(34vw, 220px); height: min(31.7vw, 205px); opacity: .28; z-index: 0; }
.attire__grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.attire__side + .attire__side { border-left: 1px solid #C9B99F; }
.attire__figs { display: flex; justify-content: center; align-items: flex-end; gap: 2px; height: clamp(150px, 42vw, 240px); margin-bottom: 14px; }
.attire__fig { height: 100%; width: auto; max-width: 48%; object-fit: contain; }
.swatches { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; min-height: 28px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(18, 54, 83, .15), 0 0 0 3px #fff, 0 0 0 4px rgba(18, 54, 83, .1); }
.attire h3 { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-ink); }
.attire__side p { font-size: 15.5px; line-height: 1.35; padding: 2px 8px 0; color: var(--navy-ink); }

/* =====================================================================
   ENTOURAGE / PRINCIPAL SPONSORS
   ===================================================================== */
.entourage { padding-top: 40px; }
.group + .group { margin-top: 30px; }
.group .script { font-size: clamp(2.3rem, 10.5vw, 4rem); margin-top: 2px; }
.group__pending { font-style: italic; color: var(--dusty-ink); margin: 10px 0 6px; font-size: 18px; }
.names-cols { margin: 14px auto 6px; display: grid; gap: 4px; max-width: 760px; }
.names-cols--two { grid-template-columns: 1fr auto 1fr; gap: 10px; }
.names-cols ul { list-style: none; margin: 0; padding: 0; }
.names-cols li { font-size: clamp(13.5px, 3.8vw, 18px); line-height: 1.55; color: var(--text); }
.names-cols li.is-unconfirmed { color: #8A7752; text-decoration: underline dotted rgba(177, 138, 75, .9); text-underline-offset: 3px; }
.names-cols li.is-unconfirmed::after { content: " ?"; font-size: .75em; color: var(--gold); }
.names-cols__mid { position: relative; display: flex; align-items: center; justify-content: center; width: 12px; }
.names-cols__mid::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 50%; width: 1px; background: var(--rule); }
.names-cols__mid svg { position: relative; width: 13px; height: 13px; fill: var(--gold); background: var(--ivory); }
.divider--bottom { margin-top: 14px; }

/* =====================================================================
   GALLERY
   ===================================================================== */
.gallery { padding-top: 40px; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 12px 0 18px; }
.tabs button { min-height: 34px; padding: 6px 9px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-ink); transition: background-color .25s, color .25s, transform .15s; }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); padding: 6px 15px; }
.tabs button:active { transform: scale(.94); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 28vw; grid-auto-flow: dense; gap: 5px; }
.tile { position: relative; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: var(--ivory-2); }
.tile--tall { grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile.pop { animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
#galleryMore { margin-top: 22px; }

.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(12, 26, 40, .94); padding: 56px 12px; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); animation: pop .35s var(--ease); }
.lightbox__btn { position: absolute; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 10px; top: 50%; margin-top: -23px; }
.lightbox__next { right: 10px; top: 50%; margin-top: -23px; transform: scaleX(-1); }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #C9D6E3; font-size: 15px; letter-spacing: .1em; }

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; background: rgba(12, 26, 40, .6); }
.modal__card { position: relative; width: min(100%, 560px); max-height: 88vh; overflow: auto; padding: 0 0 30px; text-align: center; background: var(--ivory) url("../img/watercolor-blue.webp") center / cover; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); animation: pop .4s var(--ease); }
.modal__photo { width: 100%; height: 220px; object-fit: cover; margin-bottom: 16px; }
.modal__text { padding: 0 26px; font-size: 18px; line-height: 1.65; }
.modal__close { top: 10px; right: 10px; background: rgba(18, 54, 83, .55); }

/* =====================================================================
   RSVP
   ===================================================================== */
.rsvp { padding-top: 48px; }
.rsvp .sprig { opacity: .85; }
.form { margin-top: 22px; text-align: left; }
.field { margin: 0 0 15px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; padding: 0; font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field b { color: var(--err); font-weight: 600; }
.opt { font-weight: 500; color: var(--dusty-ink); }
.field input[type=text], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 13px;
  font: 500 17px/1.3 var(--serif); color: var(--text);
  background: var(--white); border: 1px solid var(--field); border-radius: 6px;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #858A8E; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--dusty); box-shadow: 0 0 0 3px rgba(129, 156, 180, .25); }
.field [aria-invalid="true"] { border-color: var(--err); }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1.5px solid var(--navy-ink); border-bottom: 1.5px solid var(--navy-ink); transform: rotate(45deg); pointer-events: none; }
.field.is-disabled { opacity: .45; }
.radio { display: flex !important; align-items: center; gap: 12px; min-height: 40px; font-weight: 500 !important; cursor: pointer; }
.radio input { -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--dusty); border-radius: 50%; background: var(--white); display: grid; place-items: center; cursor: pointer; }
.radio input::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--navy); transform: scale(0); transition: transform .2s var(--ease); }
.radio input:checked { border-color: var(--navy); }
.radio input:checked::after { transform: scale(1); }
.field__err { font-size: 15px; color: var(--err); margin-top: 5px; }
.field__err::before { content: "⚠ "; }
.field__err:empty { display: none; }
.form__status { font-size: 16px; line-height: 1.45; margin-bottom: 14px; }
.form__status:empty { display: none; }
.form__status.is-error { padding: 12px 14px; border-radius: 8px; background: #FBEFEE; color: var(--err); border: 1px solid rgba(183, 68, 68, .25); }
.form__privacy { margin-top: 10px; font-size: 14px; text-align: center; color: var(--dusty-ink); }
.btn.is-busy { opacity: .75; pointer-events: none; }
.thanks { margin-top: 24px; padding: 28px 18px; text-align: center; border: 1px solid rgba(129, 156, 180, .45); border-radius: 12px; background: rgba(255, 253, 248, .75); outline: none; animation: pop .6s var(--ease); }
.thanks__text { font-family: var(--script); font-size: 2.2rem; line-height: 1.25; color: var(--navy-ink); }

/* =====================================================================
   VENUE MAP
   ===================================================================== */
.venue { padding-top: 52px; }
.venue.torn::after, .rsvp.torn::after { background: linear-gradient(to bottom, rgba(205, 218, 230, .95), rgba(255, 255, 255, .9)); }
.map { margin: 14px auto 0; border-radius: 8px; overflow: hidden; background: var(--white); box-shadow: 0 12px 30px -22px rgba(18, 54, 83, .55); }
.map iframe { display: block; width: 100%; aspect-ratio: 1 / .88; border: 0; background: #E8E9E5; }
.map__addr { margin-top: 12px; font-size: 16.5px; line-height: 1.4; color: var(--navy-ink); }

/* =====================================================================
   SEE YOU THERE
   ===================================================================== */
.closing { padding: 30px 6px 24px; background: var(--ivory) url("../img/paper.webp"); text-align: center; }
.closing__frame { max-width: 760px; margin: 0 auto; padding: 5px; background: var(--ivory); box-shadow: 0 0 0 1px rgba(185, 174, 154, .5); }
.closing__panel {
  position: relative; z-index: 2; padding: 56px 24px 64px; margin-bottom: -40px; color: var(--white); overflow: hidden;
  background: var(--navy) url("../img/watercolor-navy.webp") center / cover;
  -webkit-mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100% no-repeat; mask: url("../img/torn-panel-b.svg") 0 0 / 100% 100% no-repeat;
}
.closing__panel .script { color: var(--white); font-size: clamp(2.6rem, 13vw, 4.4rem); position: relative; z-index: 2; }
.closing__msg { position: relative; z-index: 2; max-width: 26em; margin: 10px auto 0; font-size: clamp(15px, 4.2vw, 19px); line-height: 1.5; color: #F1F4F8; }
.closing__sig { position: relative; z-index: 2; font-size: clamp(1.9rem, 9vw, 2.8rem) !important; margin-top: 18px; }
.closing__photo { position: relative; z-index: 1; height: clamp(230px, 62vw, 460px); }
.closing__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.footer__mono { margin: 22px 0 calc(70px + var(--safe-b)); font-family: var(--display); font-size: 18px; letter-spacing: .1em; color: var(--dusty-ink); }
.footer__mono i { font-style: normal; opacity: .6; }

/* =====================================================================
   MUSIC BUTTON + PETALS
   ===================================================================== */
.music {
  position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 60;
  width: 50px; height: 50px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer; background: var(--navy); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(18, 54, 83, .7), 0 0 0 4px rgba(255, 255, 255, .6);
  transition: transform .18s var(--ease); animation: pop .5s var(--ease);
}
.music:active { transform: scale(.9); }
.music svg { width: 20px; height: 20px; transition: transform .25s; }
.music::after { content: ""; position: absolute; width: 28px; height: 2px; background: #fff; border-radius: 2px; transform: rotate(-45deg) scaleX(0); transition: transform .25s var(--ease); box-shadow: 0 0 0 1.5px var(--navy); }
.music.is-muted::after { transform: rotate(-45deg) scaleX(1); }
.music__bars { position: absolute; bottom: 9px; display: flex; gap: 2px; height: 7px; align-items: flex-end; opacity: 0; transition: opacity .3s; }
.music__bars i { width: 2px; height: 7px; background: #A9BED3; border-radius: 1px; transform-origin: bottom; transform: scaleY(.3); }
.music.is-playing .music__bars { opacity: 1; }
.music.is-playing .music__bars i { animation: eq 1s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: -.35s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: -.7s; }
.music.is-playing svg { transform: translateY(-3px); }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.petals { position: fixed; inset: 0; z-index: 45; overflow: hidden; pointer-events: none; }
.petal { position: absolute; top: -30px; width: var(--w); height: calc(var(--w) * .8); opacity: var(--o); animation: fall var(--dur) linear var(--delay) infinite; will-change: transform; }
.petal span { display: block; width: 100%; height: 100%; background: radial-gradient(120% 120% at 30% 25%, #FFFFFF 0%, #F3EEE6 55%, #DCE5EE 100%); border-radius: 80% 0 80% 0; box-shadow: inset -1px -1px 2px rgba(129, 156, 180, .3); animation: sway var(--sway) ease-in-out infinite alternate; }
.petal span.alt { background: radial-gradient(120% 120% at 30% 25%, #FFFFFF 0%, #E3EAF1 60%, #BFD0E0 100%); }
@keyframes fall { from { transform: translate3d(0, -40px, 0); } to { transform: translate3d(-60px, calc(var(--vh) * 100 + 60px), 0); } }
@keyframes sway { from { transform: translateX(-16px) rotate(-30deg); } to { transform: translateX(16px) rotate(50deg); } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 359px) {
  .story__wrap { grid-template-columns: 1fr; }
  .story__panel { margin: 0 4% -20px; }
  .story__photo { height: 280px; }
  .details__grid { grid-template-columns: 1fr; gap: 18px; }
  .details__col + .details__col { border-left: 0; border-top: 1px solid var(--rule); padding-top: 18px; }
  .countdown div { width: 60px; }
}

/* tablet + desktop: editorial two-column hero (gown photograph | invitation) */
@media (min-width: 640px) {
  .hero { aspect-ratio: auto; display: grid; grid-template-columns: 44% 56%; min-height: max(620px, calc(var(--vh) * 100)); padding-top: 0; }
  .hero__photo { position: relative; inset: auto; overflow: hidden; min-height: 0; }
  .hero__photo img { position: absolute; inset: 0; }
  .story > .sprig--tr { display: none; }
  .sprig--panel { width: 17%; height: 22%; right: 1%; bottom: 1%; opacity: .5; }
  .hero__photo::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 22%; background: linear-gradient(to right, rgba(250, 247, 239, 0), var(--ivory)); }
  .hero__photo img { object-position: 55% 8%; }
  .hero__panel { position: relative; left: auto; right: auto; top: auto; height: auto; padding: 40px 5% 46px; }
  .hero__tagline { top: 22%; left: 7%; font-size: clamp(10px, 1.2vw, 13px); line-height: 2.7; letter-spacing: .22em; color: var(--dusty-ink); }
  .hero__eyebrow { font-size: clamp(11px, 1.3vw, 14px); }
  .names { margin: 18px 0 16px; }
  .names__one, .names__two { font-size: clamp(3.4rem, 8.2vw, 7.2rem); }
  .names__and { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
  .hero__invite { font-size: clamp(11px, 1.4vw, 15px); }
  .divider--hero { margin: 18px auto 16px; }
  .hero__date { font-size: clamp(12px, 1.5vw, 16px); }
  .hero__venue { font-size: clamp(19px, 2.4vw, 28px); margin-top: 12px; }
  .hero__addr { font-size: clamp(14px, 1.6vw, 18px); }
  .hero__cta { display: none; }
  .hero__scrollrow { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
  .hero__scrollrow i { width: 70px; height: 1px; background: var(--dusty); }
  .hero__scroll--m { display: none; }
  .hero__sprig { display: block; width: min(12vw, 150px); height: min(11.2vw, 140px); color: var(--navy-ink); opacity: .7; }
  .grid { grid-auto-rows: 170px; gap: 8px; }
  .story { padding: 70px 0 80px; }
  .story__panel { padding: 48px 34px 54px; }
  .story__photo { min-height: 420px; }
}
@media (min-width: 900px) {
  body { font-size: 19px; }
  .section { padding: 96px 0 104px; }
  .nav { height: 58px; padding: 0 28px; background: var(--navy); box-shadow: 0 6px 24px -12px rgba(10, 25, 40, .6); justify-content: center; }
  .nav.is-scrolled { background: var(--navy); }
  .nav__mono { position: absolute; left: 28px; color: #fff; opacity: 1 !important; pointer-events: auto !important; }
  .nav__mono i { background: #A9BED3; }
  .nav__toggle { display: none; }
  .nav__menu { position: static; flex-direction: row; gap: 6px; padding: 0; background: none; box-shadow: none; opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav__menu a { padding: 10px 16px; font-size: 12.5px; color: #fff; position: relative; letter-spacing: .2em; }
  .nav__menu a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 1px; background: #A9BED3; transform: scaleX(0); transition: transform .3s var(--ease); }
  .nav__menu a:hover::after, .nav__menu a.is-active::after { transform: scaleX(1); }
  .nav__menu a.is-active { color: #fff; }
  .hero { padding-top: 58px; }
  .details__col { padding: 2px 24px; }
  .details h3 { font-size: 14px; }
  .details__col p { font-size: 17px; }
  .attire__fig { max-width: 46%; }
  .grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; }
  .countdown div { width: 92px; padding: 14px 0 10px; }
  .countdown b { font-size: 36px; }
  .sprig { width: 300px; height: 280px; }
  .sprig--sm { width: 220px; height: 205px; }
  .closing { padding: 60px 20px 30px; }
  .closing__panel { padding: 80px 40px 90px; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal, .hero__step { opacity: 1 !important; transform: none !important; }
  .petals, .seal__stars, .seal__shine { display: none; }
  .seal__glow { opacity: .6; }
}
