/* ==========================================================================
   Pearl: a pearl-and-hydrangea wedding invitation, ported from landing/pearl (css/style.css).
   Class names follow the landing, so its changes carry over.
   - phone: a full-width column; >=560px: a centred 480px column; >=1024px: full width (the DESKTOP block)
   - everything works without JavaScript; .js (set by invitation.js) adds the envelope intro, the scroll
     lock until it opens, reveals and the top bar / rail / menu
   ========================================================================== */

/* local fonts (OFL, see fonts/OFL.txt): no third-party requests under the CSP */
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-normal.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-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-italic.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-italic.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-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; src: url("fonts/eb-garamond-latin-wght-normal.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-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-latin-ext-wght-italic.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; src: url("fonts/eb-garamond-latin-wght-italic.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; }

:root {
  color-scheme: light;
  /* palette */
  --paper:    #f2eee8;
  --paper-2:  #f7f4ef;
  --ivory:    #fbf9f5;
  --ink:      #37322e;
  --ink-2:    #5c554f;
  --ink-3:    #8a837b;
  --line:     #ddd6cd;
  --line-2:   #c8c0b6;
  --blue:     #c8d5e5;   /* button fill */
  --blue-2:   #b4c5db;   /* hover / selected */
  --blue-3:   #dfe7f1;   /* soft tint */
  --blue-ink: #5e7495;
  --err:      #9a4b3e;

  /* type */
  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-body:    "EB Garamond", Garamond, Georgia, serif;
  --f-ui:      "EB Garamond", Garamond, Georgia, serif;   /* tracked uppercase captions */

  /* layout */
  --gutter: 28px;
  --col: 480px;
  --radius: 4px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .29 0 0 0 0 .3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked, html.is-locked body, html.menu-open, html.menu-open body { overflow: hidden; }
body {
  margin: 0;
  background: #e7e2db var(--noise);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
main:focus { outline: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
p, h1, h2, h3, figure, ol, ul, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 1.5px solid var(--blue-ink); outline-offset: 3px; }

/* Cormorant/EB Garamond default to old-style figures; the design uses lining ones.
   !important because every `font:` shorthand resets font-variant-numeric. */
*, *::before, *::after { font-variant-numeric: lining-nums !important; }

.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--arrow { width: 1.3em; }

/* ---------- page column ---------- */
.page {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  background: var(--paper) var(--noise);
  overflow: clip;
}
@media (min-width: 560px) {
  body {
    background:
      radial-gradient(ellipse at 70% 0%, rgba(255,255,255,.6), transparent 55%),
      #e4dfd8 var(--noise);
    background-attachment: fixed;
  }
  .page { box-shadow: 0 0 0 1px rgba(60,60,70,.05), 0 30px 80px -20px rgba(60,55,60,.25); }
}

/* ---------- shared bits ---------- */
.eyebrow {
  font: 400 .84rem/1.6 var(--f-ui);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink);
  padding-left: .3em;              /* optical centering of tracked caps */
}
.rule { display: block; width: 46px; height: 1px; margin: 22px auto 0; background: currentColor; opacity: .6; }
.rule--left { margin-left: 0; }
.title {
  font: italic 400 clamp(3rem, 14vw, 3.6rem)/.9 var(--f-display);
  letter-spacing: -.01em;
  color: var(--ink);
}
.title > span { display: block; }
.title--left { text-align: left; }
.title--xl { font-size: clamp(4.2rem, 21vw, 5.4rem); line-height: 1; }
.title--sm { font-size: 2.4rem; line-height: 1.05; }
.lead {
  font: 400 1.16rem/1.5 var(--f-body);
  color: var(--ink-2);
  text-wrap: pretty;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .9em;
  min-height: 54px; padding: 0 32px;
  font: 400 .84rem/1 var(--f-ui);
  letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color .3s, color .3s, border-color .3s, transform .2s, box-shadow .3s;
}
.btn .ico { font-size: 1.05rem; }
.btn:active { transform: scale(.98); }
.btn--blue {
  background: var(--blue); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 12px 26px -16px rgba(70,90,120,.55);
}
.btn--blue:hover { background: var(--blue-2); }
.btn--line { border: 1px solid var(--ink-2); color: var(--ink); background: rgba(255,255,255,.22); }
.btn--line:hover { background: rgba(255,255,255,.6); }
.btn--block { width: 100%; }

.round-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--ink-2);
  color: var(--ink);
  font-size: 20px;
  transition: background-color .3s;
}
.round-btn:hover { background: rgba(255,255,255,.5); }
.round-btn .ico { stroke-width: 1.3; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }

/* section pager dots (built by JS) */
.pager { display: flex; justify-content: center; gap: 2px; position: relative; z-index: 3; }
.pager a { width: 22px; height: 26px; display: grid; place-items: center; }
.pager a::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--ink-2);
  transition: background-color .3s;
}
.pager a[aria-current="true"]::after { background: var(--ink); border-color: var(--ink); }

/* reveal on scroll (only when JS is on) */
.js [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 1s var(--ease-out), translate 1s var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 110ms);
}
.js [data-reveal].is-in { opacity: 1; translate: none; }

/* ---------- menu ---------- */
.menu-btn {
  position: fixed; z-index: 60;
  top: calc(14px + env(safe-area-inset-top));
  right: max(14px, calc(50vw - var(--col) / 2 + 14px));
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 26px; color: var(--ink);
  background: rgba(247,244,239,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease-out), background-color .3s;
}
.menu-btn .ico { stroke-width: 1.2; }
.is-opened .menu-btn { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; z-index: 70;
  top: 0; bottom: 0; left: 50%; translate: -50% 0;
  width: 100%; max-width: var(--col);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px var(--gutter);
  background: var(--paper-2) var(--noise);
  text-align: center;
  opacity: 0;
  transition: opacity .45s var(--ease-out);
}
.menu.is-shown { opacity: 1; }
.menu[hidden] { display: none; }
.menu-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px;
}
.menu-close .ico { stroke-width: 1.2; }
.menu-sprig { width: 150px; margin-bottom: 8px; filter: saturate(.55); }
.menu-names { font: 400 1.9rem/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .08em; }
.menu-names span { font-style: italic; text-transform: none; }
.menu ul { margin: 34px 0; display: grid; gap: 6px; }
.menu ul a {
  display: block; padding: 8px 20px;
  font: italic 400 1.9rem/1.15 var(--f-display);
  text-decoration: none;
  transition: color .25s;
}
.menu ul a:hover { color: var(--blue-ink); }
.menu-meta { font: 400 .76rem/1.4 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3); }

/* ==========================================================================
   1. COVER — envelope
   ========================================================================== */
.cover {
  --ew: min(86vw, 390px, 45vh);
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #f3f0eb 0%, #efebe5 100%);
}
@supports (height: 1svh) {
  .cover { --ew: min(86vw, 390px, 45svh); min-height: 100svh; }
}
.cover-bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  transition: opacity 1.6s var(--ease-out), scale 2.4s var(--ease-out);
  pointer-events: none;
}
.js .cover-bg { opacity: 0; scale: 1.06; }
.js .cover.is-intro .cover-bg, .js .cover.is-ready .cover-bg { opacity: 1; scale: 1; }
/* phones and tablets: the moving silk over the still, shown only once it really plays (invitation.js) */
.cover-video {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; scale: 1.06;
  transition: opacity .8s var(--ease-out), scale 2.4s var(--ease-out);
  pointer-events: none;
}
.cover.is-intro .cover-video, .cover.is-ready .cover-video { scale: 1; }
.cover.is-intro .cover-video.is-playing, .cover.is-ready .cover-video.is-playing { opacity: 1; }
@media (min-width: 1024px) { .cover-video { display: none; } }
.cover::after {   /* blend into the hero below */
  content: ""; position: absolute; inset: auto 0 0; height: 8%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(242,238,232,0), var(--paper));
}

.stage {
  position: relative;
  width: var(--ew);
  height: calc(var(--ew) * 1.4);
  margin: 96px 0 150px;
  z-index: 2;
}

.cover-eyebrow {
  position: absolute; left: 50%;
  bottom: calc(100% - var(--ew) * .35 + 26px);
  width: max-content;
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  color: var(--ink);
  transition: opacity 1.2s var(--ease-out) .15s, translate 1.2s var(--ease-out) .15s;
}
.js .cover-eyebrow { opacity: 0; translate: -50% 8px; }
.cover-eyebrow p {
  font: 400 clamp(2rem, 9.6vw, 2.6rem)/1.12 var(--f-display);
  letter-spacing: .2em; text-transform: uppercase;
  padding-left: .2em;
}
.cover-eyebrow .rule--top { width: 64px; margin: 0 0 16px; opacity: .5; }
.rule-sprig { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--ink-2); }
.rule-sprig i { display: block; width: 52px; height: 1px; background: currentColor; opacity: .5; }
.rule-sprig .ico { width: 34px; height: 24px; stroke-width: 1.1; }
.js .cover.is-intro .cover-eyebrow, .js .cover.is-ready .cover-eyebrow { opacity: 1; translate: -50% 0; }
.js .cover.is-open .cover-eyebrow { opacity: 0; translate: -50% -10px; transition-delay: 0s; transition-duration: .5s; }

/* envelope position: closed = centred in stage, open = drops to bottom */
.env-wrap {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--ew) * .7);
  transform: translateY(-50%);
  transition: transform 1.3s var(--ease-out) .95s;
}
.cover.is-open .env-wrap { transform: none; }

.env-float {
  position: absolute; inset: 0;
  transition: opacity 1s var(--ease-out), scale 1.1s var(--ease-out);
}
.js .env-float { opacity: 0; scale: .9; }
.cover.is-ready .env-float { opacity: 1; scale: 1; animation: float 4.5s ease-in-out 1.1s infinite; }
.cover.is-open .env-float { animation-play-state: paused; }

.env-shadow {
  position: absolute; left: 6%; right: 6%; bottom: -9%;
  height: 14%;
  background: radial-gradient(closest-side, rgba(60,58,70,.22), rgba(60,58,70,0));
  filter: blur(4px);
  z-index: 0;
}
.cover.is-ready .env-shadow { animation: float-shadow 4.5s ease-in-out 1.1s infinite; }

.envelope {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  border-radius: 3px;
  color: inherit; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
}
.js .cover:not(.is-ready) .envelope { pointer-events: none; }
.cover.is-open .envelope { cursor: default; }
.envelope > span { position: absolute; inset: 0; display: block; }
.envelope svg { width: 100%; height: 100%; overflow: visible; }

.env-back {
  z-index: 1;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 20px 32px -16px rgba(60,58,70,.4), 0 4px 10px -4px rgba(60,58,70,.16);
}
.env-pocket { z-index: 4; }

.env-flap {
  z-index: 6;
  transform-origin: 50% 0;
  filter: drop-shadow(0 2px 2.5px rgba(60,58,70,.18));
}
.flap-in { opacity: 0; }
.flap-emboss { opacity: .55; filter: drop-shadow(.6px .9px .5px rgba(70,66,76,.35)) drop-shadow(-.4px -.5px .3px rgba(255,255,255,.9)); }

/* the card */
.env-card-slot {
  z-index: 3;
  clip-path: inset(-400% -20% 2.5% -20%);
}
.card {
  position: absolute; left: 5.5%; right: 5.5%; top: 5%;
  height: calc(var(--ew) * .82);
  display: flex; flex-direction: column; align-items: center;
  padding-top: calc(var(--ew) * .07);
  text-align: center;
  color: var(--ink);
  background: #fbf9f5 url("img/paper-tex.jpg") center / 300px 300px;
  border-radius: 2px;
  box-shadow: 0 -1px 0 rgba(255,255,255,.8) inset, 0 6px 18px -8px rgba(60,58,70,.3);
  transform: translateY(0);
  transition: transform 1.3s var(--ease-out) .95s;
}
.cover.is-open .card { transform: translateY(-89%); }

.card-frame { position: absolute; inset: calc(var(--ew) * .028); pointer-events: none; }
.card-frame svg { width: 100%; height: 100%; }
.card-frame rect { fill: none; stroke: var(--blue-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.envelope .card-sprig {
  width: calc(var(--ew) * .12); height: calc(var(--ew) * .08);
  margin-bottom: calc(var(--ew) * .02);
  fill: none; stroke: var(--blue-ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round;
}
.card-eyebrow {
  font: 400 max(8px, calc(var(--ew) * .03))/1.4 var(--f-ui);
  letter-spacing: .3em; text-transform: uppercase;
  padding-left: .3em;
  color: var(--ink-2);
}
.card-names {
  display: flex; flex-direction: column; align-items: center;
  margin-top: calc(var(--ew) * .03);
  font: 400 calc(var(--ew) * .105)/1.02 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .12em; padding-left: .12em;
}
.card-names > span { white-space: nowrap; }
.card-names .amp { font-style: italic; text-transform: none; color: var(--blue-ink); letter-spacing: 0; margin-right: .2em; }
.card-rule { width: 34px; height: 1px; background: var(--ink); opacity: .45; margin: calc(var(--ew) * .035) 0 calc(var(--ew) * .03); }
.card-date { font: 400 calc(var(--ew) * .05)/1 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; padding-left: .22em; }
.card-place {
  margin-top: calc(var(--ew) * .026);
  font: italic 400 calc(var(--ew) * .048)/1.2 var(--f-display);
  color: var(--ink-2);
}

/* seal + ribbon */
.env-deco { z-index: 7; pointer-events: none; }
.env-deco > * {
  position: absolute;
  transition: opacity .55s var(--ease-out), translate .7s var(--ease-out), rotate .7s var(--ease-out);
}
.env-ribbon {
  width: 132%; max-width: none;
  left: -16%; top: 44%;
  filter: saturate(.75) drop-shadow(0 4px 4px rgba(60,70,90,.18));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.seal {
  width: 24%; aspect-ratio: 1;
  left: 38%; top: 46%;
  border-radius: 50%;
}
.seal img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(60,58,70,.28)); }
.seal::before, .seal::after {
  content: ""; position: absolute; inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(150,170,200,.8);
  opacity: 0;
}
.cover.is-ready:not(.is-open) .seal::before { animation: ring 2.6s ease-out 1.6s infinite; }
.cover.is-ready:not(.is-open) .seal::after  { animation: ring 2.6s ease-out 2.9s infinite; }

.cover.is-open .seal { animation: seal-pop .6s var(--ease-out) both; }
.cover.is-open .env-ribbon { opacity: 0; translate: 0 26px; }

/* flap opening */
.cover.is-open .env-flap { animation: flap-open .95s .32s both, flap-z .95s .32s both; filter: none; }
.cover.is-open .flap-out { animation: hide-late .95s .32s both; }
.cover.is-open .flap-in  { animation: show-late .95s .32s both; }

/* hint + after-open block */
.cover-hint {
  position: absolute; left: 50%;
  top: calc(var(--ew) * 1.06 + 2vh);
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: max-content;
  text-align: center;
  color: var(--ink);
  opacity: 0;
  transition: opacity .9s var(--ease-out) .4s;
  pointer-events: none;
}
.hint-arrow { width: 22px; height: 32px; fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cover-hint p span { display: block; font: 400 .9rem/1.3 var(--f-ui); letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; }
.cover-hint p em { display: block; font: italic 400 1.9rem/1.15 var(--f-display); letter-spacing: .06em; }
.tap-ring {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid rgba(55,50,46,.22);
  background: rgba(255,255,255,.25);
  margin-top: 4px;
}
.tap-icon { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.cover.is-ready .cover-hint { opacity: 1; }
.cover.is-ready .tap-icon { animation: tap 2.2s ease-in-out 1.4s infinite; }
.cover.is-open .cover-hint { opacity: 0; transition-delay: 0s; transition-duration: .35s; }

.cover-after {
  position: absolute; left: 50%; top: calc(100% + 26px);
  translate: -50% 10px;
  width: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity .9s var(--ease-out) 1.7s, translate .9s var(--ease-out) 1.7s, visibility 0s 1.7s;
}
.cover-date {
  font: 400 .8rem/1 var(--f-ui);
  letter-spacing: .3em; text-transform: uppercase;
  padding-left: .3em;
  color: var(--ink-2);
}
.cover.is-open .cover-after { opacity: 1; visibility: visible; translate: -50% 0; }

/* instant open (deep link) */
.cover.no-anim *, .cover.no-anim *::before, .cover.no-anim *::after { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; }

/* petals */
.petal {
  position: absolute; z-index: 8;
  left: 50%; top: 52%;
  width: var(--s); height: var(--s);
  border-radius: 55% 45% 50% 50%;
  background: var(--c, #fff);
  box-shadow: 0 1px 2px rgba(60,58,70,.16);
  pointer-events: none;
  animation: petal var(--d) cubic-bezier(.2,.7,.3,1) forwards;
}

@keyframes flap-open {
  0%   { transform: perspective(1100px) rotateX(0);      animation-timing-function: cubic-bezier(.55,.05,.85,.45); }
  50%  { transform: perspective(1100px) rotateX(90deg);  animation-timing-function: cubic-bezier(.15,.55,.35,1); }
  100% { transform: perspective(1100px) rotateX(180deg); }
}
@keyframes flap-z    { 0%, 49.9% { z-index: 6; } 50%, 100% { z-index: 2; } }
@keyframes hide-late { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes show-late { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes seal-pop {
  0%   { transform: scale(1); opacity: 1; }
  35%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(.7) translateY(-10px); opacity: 0; }
}
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes float-shadow { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .92; opacity: .75; } }
@keyframes tap { 0%, 60%, 100% { transform: translateY(0) scale(1); } 70% { transform: translateY(3px) scale(.94); } 80% { transform: translateY(0) scale(1); } }
@keyframes petal {
  0%   { transform: translate(-50%, -50%) rotate(0) scale(.4); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(1); opacity: 0; }
}

/* ==========================================================================
   2. HERO — the card
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 84px var(--gutter) 22px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}
@supports (height: 1svh) { .hero { min-height: 100svh; } }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 8%; z-index: 0; pointer-events: none;
  background: linear-gradient(var(--paper), rgba(242,238,232,0));
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 10%; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(242,238,232,0), var(--paper));
}
.hero-card {
  position: relative; z-index: 1;
  width: min(84%, 46vh);
  filter: drop-shadow(0 22px 24px rgba(60,58,70,.18));
}
.hero-card-img { width: 100%; }
.hero-card-text {
  position: absolute;
  left: var(--ct-l, 12%); right: var(--ct-r, 12%); top: var(--ct-t, 16%);
  display: flex; flex-direction: column; align-items: center;
  container-type: inline-size;
}
.hero-names {
  display: flex; flex-direction: column; align-items: center;
  font: 400 15.5cqi/1.12 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .16em; padding-left: .16em;
}
.hero-names span { font-size: .78em; text-transform: none; letter-spacing: 0; padding: .05em 0 0; }
.hero-rule { width: 22%; height: 1px; background: var(--ink); opacity: .5; margin: 9cqi 0 6cqi; }
.hero-date { font: 400 6.6cqi/1 var(--f-ui); letter-spacing: .24em; padding-left: .24em; text-transform: uppercase; }
.hero-invited { position: relative; z-index: 1; margin-top: 26px; font-size: .92rem; }
.hero .round-btn { position: relative; z-index: 1; margin: 18px 0 26px; }
.hero .pager { margin-top: auto; }

/* ==========================================================================
   3. OUR STORY
   ========================================================================== */
.story { position: relative; padding-bottom: 28px; }
.story-photo {
  position: relative;
  aspect-ratio: 1088 / 1000;
  overflow: hidden;
  background: #dfe5ec;
}
.story-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 20%; }
.story-photo {
  -webkit-mask-image: linear-gradient(transparent 0, #000 16%);
          mask-image: linear-gradient(transparent 0, #000 16%);
}
.story-wave {
  position: relative; z-index: 1;
  display: block; width: 100%; height: auto; aspect-ratio: 400 / 120;
  margin-top: calc(-120 / 400 * 100%);
  overflow: visible;
  fill: var(--paper);
}
.story-body {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 42%; gap: 14px;
  align-items: start;
  padding: 0 var(--gutter);
  margin-top: -14%;
}
.story-text { padding-top: 6%; }
.story .title > span { margin-left: 0; }
.story .title { font-size: clamp(2.9rem, 13.4vw, 3.5rem); }
.story .title > span + * { }
.story .lead { margin-top: 20px; font-size: 1.12rem; }
.story .rule { margin-top: 24px; }
.story-snap {
  position: relative;
  margin-top: -32%;
  padding: 6px;
  background: #fbfaf8;
  box-shadow: 0 18px 30px -14px rgba(60,58,70,.35), 0 2px 4px rgba(60,58,70,.08);
  rotate: 3deg;
}
.js .story-snap[data-reveal] { translate: 0 18px; }
.js .story-snap[data-reveal].is-in { translate: none; }
.snap-fill { display: block; aspect-ratio: 832 / 1216; overflow: hidden; background: #dbe3ee; }
.snap-fill img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.story .pager { margin-top: 34px; }

/* ==========================================================================
   4. THE DETAILS
   ========================================================================== */
.details {
  position: relative;
  min-height: min(100svh, 860px);
  padding: 96px var(--gutter) 22px;
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.details-bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 70% 50%;
  filter: saturate(.62) brightness(1.02);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 9%, #000 88%, transparent 100%);
          mask-image: linear-gradient(transparent 0, #000 9%, #000 88%, transparent 100%);
}
.schedule {
  position: relative;
  margin-top: 40px;
  width: 70%;
  display: grid; gap: 30px;
}
.schedule::before {   /* the vertical hairline */
  content: ""; position: absolute; left: 58px; top: 4px; bottom: 4px; width: 1px;
  background: var(--ink-2); opacity: .45;
}
.schedule li { display: grid; grid-template-columns: 36px 1fr; gap: 44px; align-items: center; }
.schedule .ico { width: 36px; height: 36px; stroke-width: 1.15; color: var(--ink); }
.schedule b { display: block; font: 400 .9rem/1.3 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; }
.schedule time { display: block; margin-top: 2px; font: 400 .9rem/1.3 var(--f-ui); letter-spacing: .14em; color: var(--ink-2); }
.details .pager { margin-top: auto; padding-top: 40px; }

/* ==========================================================================
   5. THE VENUE
   ========================================================================== */
.venue { position: relative; padding: 84px 0 22px; text-align: center; }
.venue-title { position: relative; z-index: 2; margin-left: var(--gutter); text-align: left; }
.venue-title > span:last-child { margin-left: .2em; }
.venue-art {
  width: min(78%, 340px); margin: 26px auto 0;
  filter: saturate(.7) drop-shadow(0 14px 14px rgba(60,58,70,.12));
}
.venue-body { display: flex; flex-direction: column; align-items: center; padding: 24px var(--gutter) 0; }
.venue-pin { width: 32px; height: 32px; stroke-width: 1.2; }
.venue-name {
  margin: 14px 0 26px; max-width: 17em;
  font: 400 1rem/1.6 var(--f-ui);
  letter-spacing: .26em; text-transform: uppercase; padding-left: .26em;
  overflow-wrap: anywhere; text-wrap: balance;
}
.venue .btn { min-width: 76%; }
.venue .pager { margin-top: 34px; }

/* ==========================================================================
   6. RSVP
   ========================================================================== */
.rsvp {
  position: relative;
  padding: 104px var(--gutter) 22px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.rsvp-bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(transparent 0, #000 6%, #000 94%, transparent 100%);
}
.rsvp .eyebrow { margin-top: 18px; font-size: .9rem; }

.form { margin-top: 36px; text-align: left; }
.field { margin-bottom: 22px; border: 0; padding: 0; min-width: 0; }

/* the reply's details (shared macro classes): names on the open link, a note, extra guests */
.rsvp-extra { display: grid; gap: 22px; margin-bottom: 22px; }
.rsvp-extra__field { display: grid; gap: 8px; min-width: 0; }
.rsvp-extra__label {
  display: block;
  font: 400 .78rem/1.4 var(--f-ui);
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-2);
}
.rsvp-extra__optional { letter-spacing: .14em; color: var(--ink-3); }
.rsvp-extra__help { font: italic 400 .98rem/1.3 var(--f-body); color: var(--ink-3); }
.rsvp-extra__input {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(255,255,255,.5);
  padding: 12px 16px;
  font: 400 1.1rem/1.35 var(--f-body);
  color: var(--ink);
  transition: border-color .25s, background-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.rsvp-extra__input::placeholder { color: #a39c94; font-style: italic; }
.rsvp-extra__input:focus {
  outline: none;
  border-color: var(--blue-ink);
  background: rgba(255,255,255,.8);
  box-shadow: 0 0 0 3px rgba(94,116,149,.14);
}
.rsvp-extra__textarea { resize: vertical; min-height: 92px; }
.rsvp-guest__select { -webkit-appearance: auto; appearance: auto; }

.rsvp-deadline {
  margin-bottom: 22px; text-align: center;
  font: 400 .84rem/1.6 var(--f-ui);
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
}
.form-alert {
  margin-bottom: 22px; padding: 12px 16px;
  border: 1px solid var(--err); border-radius: 3px;
  background: rgba(255,255,255,.6);
  font: italic 400 1.04rem/1.4 var(--f-body); color: var(--err);
}
.form-current { margin-bottom: 22px; font: italic 400 1.04rem/1.45 var(--f-body); color: var(--ink-2); }
.form-current strong { font-style: normal; font-weight: 500; color: var(--ink); }

.choice { display: grid; gap: 12px; margin-bottom: 28px; }
.choice-card {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  min-height: 62px;
  padding: 12px 22px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(255,255,255,.35);
  font: 400 .88rem/1.3 var(--f-ui);
  letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .35s var(--ease-out), border-color .35s, box-shadow .35s;
  -webkit-tap-highlight-color: transparent;
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark {
  position: relative;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--ink-2);
  background: rgba(255,255,255,.6);
  flex: none;
}
.choice-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--ink-2);
  transform: scale(0); transition: transform .35s var(--ease-out);
}
.choice-card input:checked ~ .choice-mark::after { transform: scale(1); }
.choice-card input:focus-visible ~ .choice-mark { outline: 1.5px solid var(--blue-ink); outline-offset: 3px; }
.choice-card:has(input:checked) {
  background: var(--blue-3);
  border-color: var(--blue-2);
  box-shadow: 0 12px 24px -18px rgba(70,90,120,.7);
}

/* named extra guests: one fieldset per person, first name, last name and an answer */
.rsvp-guests-block { display: grid; gap: 12px; min-width: 0; }
.rsvp-guests { display: grid; gap: 16px; }
.rsvp-guest {
  display: grid; gap: 14px; min-width: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: rgba(255,255,255,.35);
}
.rsvp-guest__legend { padding: 0 6px; font: 400 .78rem/1.4 var(--f-ui); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); }
.rsvp-guest__names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsvp-guest__field { display: grid; gap: 6px; min-width: 0; }
.rsvp-guest__toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-guest__option {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 6px 10px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: rgba(255,255,255,.5);
  font: 400 .8rem/1.2 var(--f-ui);
  letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.rsvp-guest__option:hover { border-color: var(--ink-3); }
.rsvp-guest__option[aria-pressed="true"] {
  background: var(--blue-3); border-color: var(--blue-2);
  box-shadow: 0 10px 20px -16px rgba(70,90,120,.7);
}
.rsvp-guest__icon { flex: none; width: 16px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-guests__add { justify-self: center; min-height: 48px; padding: 0 28px; }
.rsvp-guests__count { text-align: center; font: italic 400 .98rem/1.3 var(--f-body); color: var(--ink-3); }
.rsvp-guest__remove {
  justify-self: end; min-height: 44px; padding: 0 6px;
  font: italic 400 1rem/1 var(--f-body); color: var(--blue-ink);
  text-decoration: underline; text-underline-offset: .2em;
}
@media (max-width: 380px) { .rsvp-guest__names { grid-template-columns: 1fr; } }

#rsvpSubmit { margin-top: 8px; }
.form-hint { margin-top: 14px; text-align: center; font: italic 400 1rem/1.4 var(--f-body); color: var(--ink-3); }
.form-link {
  display: block; margin-top: 8px; padding: 10px 0; text-align: center;
  font: italic 400 1.08rem/1.4 var(--f-body); color: var(--blue-ink); text-underline-offset: .2em;
}
.rsvp .pager { margin-top: 40px; }

/* ==========================================================================
   7. WISHLIST
   ========================================================================== */
.wishes {
  position: relative;
  padding: 72px var(--gutter) 22px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.wish-bg {   /* taller than the section: the ribbon at the bottom of the photo slides under the fade */
  position: absolute; inset: 0 0 auto; z-index: -1;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 8%, #000 90%, transparent 100%);
          mask-image: linear-gradient(transparent 0, #000 8%, #000 90%, transparent 100%);
}
.wish-title { display: inline-block; text-align: left; }
.wish-title > span:last-child { margin-left: .5em; }
.wish-sub { margin-top: 22px; font-size: .86rem; line-height: 1.75; }
.gift-img {
  width: 64%; margin: 26px auto 26px;
  filter: saturate(.62) drop-shadow(0 26px 24px rgba(60,58,70,.18));
}
.wish-list { text-align: left; }
.wishes .pager { margin-top: 40px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative;
  padding: 30px var(--gutter) 64px;
  text-align: center;
  background: linear-gradient(var(--paper), #ece7e0);
}
.footer-sprig { width: 170px; margin: 0 auto 10px; filter: saturate(.55); }
.footer-names { font: 400 2rem/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .1em; }
.footer-names span { font-style: italic; text-transform: none; letter-spacing: 0; }
.footer-meta { margin-top: 10px; font: 400 .76rem/1.5 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); }
.footer-note { margin-top: 18px; font: italic 400 1.05rem/1.4 var(--f-body); color: var(--ink-3); }
.footer-note a { color: var(--blue-ink); }

/* ==========================================================================
   Pointer wording: "Tap" on touch, "Click" with a mouse
   ========================================================================== */
.cover-hint .t-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cover-hint .t-touch { display: none; }
  .cover-hint .t-mouse { display: block; }
}

/* desktop-only chrome is hidden on phones/tablets */
.topbar, .rail { display: none; }

/* ==========================================================================
   DESKTOP ≥ 1024px — full-width layout, top bar, dot rail, split sections
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --gutter: 48px; --side: max(56px, 7vw); }

  body { background: var(--paper) var(--noise); }
  .page { max-width: none; box-shadow: none; }

  /* chrome: hamburger + per-section dots → top bar + fixed rail */
  .menu-btn, .menu, .pager { display: none !important; }

  .topbar {
    position: fixed; z-index: 60; inset: 0 0 auto;
    display: flex; align-items: center; gap: 40px;
    height: 78px; padding: 0 var(--side);
    opacity: 0; translate: 0 -12px; pointer-events: none;
    background: linear-gradient(rgba(247,244,239,.82), rgba(247,244,239,0));
    transition: opacity .6s var(--ease-out), translate .6s var(--ease-out), background-color .4s, box-shadow .4s;
  }
  .is-opened .topbar { opacity: 1; translate: none; pointer-events: auto; }
  .topbar.is-solid {
    background: rgba(247,244,239,.86);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(55,50,46,.08);
  }
  .topbar-brand { font: 400 1.7rem/1 var(--f-display); letter-spacing: .12em; text-decoration: none; }
  .topbar-brand span { font-style: italic; letter-spacing: 0; margin: 0 .12em; color: var(--blue-ink); }
  .topbar-nav { display: flex; gap: 6px; margin-left: auto; }
  .topbar-nav a {
    position: relative; padding: 10px 14px;
    font: 400 .8rem/1 var(--f-ui); letter-spacing: .24em; text-transform: uppercase;
    text-decoration: none; color: var(--ink-2);
    transition: color .25s;
  }
  .topbar-nav a::after {
    content: ""; position: absolute; left: 14px; right: calc(14px + .24em); bottom: 2px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left;
    transition: transform .4s var(--ease-out);
  }
  .topbar-nav a:hover, .topbar-nav a[aria-current="true"] { color: var(--ink); }
  .topbar-nav a:hover::after, .topbar-nav a[aria-current="true"]::after { transform: none; }
  .btn--sm { min-height: 42px; padding: 0 24px; font-size: .76rem; }
  .topbar .btn.is-active { background: var(--blue-2); }

  .rail {
    position: fixed; z-index: 55; right: 26px; top: 50%; translate: 0 -50%;
    display: flex; flex-direction: column; gap: 4px;
    opacity: 0; pointer-events: none; transition: opacity .6s var(--ease-out);
  }
  .is-opened .rail { opacity: 1; pointer-events: auto; }
  .rail a { position: relative; width: 26px; height: 26px; display: grid; place-items: center; }
  .rail a::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    border: 1px solid var(--ink-2); transition: background-color .3s, transform .3s;
  }
  .rail a:hover::after { transform: scale(1.3); }
  .rail a[aria-current="true"]::after { background: var(--ink); border-color: var(--ink); }
  .rail a::before {   /* section name on hover */
    content: attr(aria-label); position: absolute; right: 32px; top: 50%; translate: 6px -50%;
    white-space: nowrap; font: italic 400 1.1rem/1 var(--f-display); color: var(--ink-2);
    opacity: 0; pointer-events: none; transition: opacity .3s, translate .3s var(--ease-out);
  }
  .rail a:hover::before { opacity: 1; translate: 0 -50%; }

  /* shared type scales up */
  .title { font-size: clamp(4.4rem, 5.6vw, 6rem); }
  .title--xl { font-size: clamp(6rem, 8.5vw, 8.4rem); }
  .lead { font-size: 1.32rem; }
  .eyebrow { font-size: .9rem; }
  .btn { min-height: 58px; }
  .btn--blue:hover { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 30px -16px rgba(70,90,120,.6); transform: translateY(-1px); }
  .btn--line:hover { border-color: var(--ink); }

  /* ---- cover: bigger envelope, landscape background ---- */
  .cover { --ew: min(500px, 46vh, 40vw); }
  @supports (height: 1svh) { .cover { --ew: min(500px, 46svh, 40vw); } }
  .stage { margin: 104px 0 150px; }
  .cover-eyebrow p { font-size: clamp(2.4rem, 3.4vw, 3.1rem); }
  .cover-hint { top: calc(var(--ew) * 1.04 + 3vh); }
  .cover-hint p em { font-size: 2.2rem; }
  .seal img { transition: scale .5s var(--ease-out); }
  .cover.is-ready:not(.is-open) .envelope:hover .seal img { scale: 1.06; }

  /* ---- hero ---- */
  .hero { padding: 110px var(--side) 40px; }
  .hero-card { width: min(420px, 54vh); }
  .hero-invited { margin-top: 30px; font-size: 1rem; }

  /* ---- story: arched photo left, text right ---- */
  .story {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center; column-gap: clamp(48px, 6vw, 110px);
    min-height: 100vh; padding: 120px var(--side) 100px;
  }
  .story-photo {
    grid-column: 1; grid-row: 1;
    width: min(100%, calc((100vh - 220px) * .8)); aspect-ratio: 4 / 5; justify-self: end;
    border-radius: 999px 999px 0 0;
    -webkit-mask-image: none; mask-image: none;
    box-shadow: 0 30px 60px -30px rgba(60,58,70,.35);
  }
  .story-wave { display: none; }
  .story-body {
    grid-column: 2; grid-row: 1;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 38%); gap: 40px;
    align-items: center;
    margin: 0; padding: 0; max-width: 640px;
  }
  .story .title { font-size: clamp(4.4rem, 5.6vw, 6rem); }
  .story .lead { font-size: 1.4rem; max-width: 15em; margin-top: 28px; }
  .story-text { padding-top: 0; }
  .story-snap { margin: 60px 0 0; rotate: 4deg; padding: 8px; }

  /* ---- details: schedule left, arch on the right of the landscape bg ---- */
  .details { min-height: 100vh; padding: 140px var(--side) 100px; justify-content: center; }
  .details-bg {
    object-position: 50% 50%;
    filter: saturate(.8) brightness(1.01);
    -webkit-mask-image: linear-gradient(transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(transparent 0, #000 12%, #000 88%, transparent 100%);
  }
  .details .title, .details .schedule { margin-left: 4vw; }
  .schedule { width: auto; max-width: 520px; margin-top: 56px; gap: 40px; }
  .schedule::before { left: 72px; }
  .schedule li { grid-template-columns: 44px 1fr; gap: 58px; }
  .schedule .ico { width: 44px; height: 44px; }
  .schedule b, .schedule time { font-size: 1.05rem; }

  /* ---- venue: art left, address right ---- */
  .venue {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto 1fr; column-gap: clamp(48px, 6vw, 110px);
    min-height: 100vh; padding: 120px var(--side) 100px; align-items: center;
  }
  .venue-art { grid-column: 1; grid-row: 1 / 4; width: min(100%, 520px); justify-self: end; margin: 0; }
  .venue-title { grid-column: 2; grid-row: 1; align-self: end; justify-self: center; margin: 0; }
  .venue-body { grid-column: 2; grid-row: 2; padding: 40px 0 0; }
  .venue-name { font-size: 1.15rem; margin: 18px 0 34px; }
  .venue .btn { min-width: 340px; }

  /* ---- rsvp: heading left, form right ---- */
  .rsvp {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 540px);
    grid-template-rows: auto auto 1fr; column-gap: clamp(56px, 8vw, 140px);
    padding: 150px var(--side) 120px; min-height: 100vh;
  }
  .rsvp-bg { object-position: 50% 50%; }
  .rsvp > .title { grid-column: 1; grid-row: 1; align-self: end; margin-top: 14vh; }
  .rsvp > .eyebrow { grid-column: 1; grid-row: 2; align-self: start; margin-top: 22px; font-size: 1rem; }
  .rsvp .form { grid-column: 2; grid-row: 1 / 4; margin-top: 0; align-self: start; }
  .rsvp .form {
    padding: 44px 44px 30px;
    background: rgba(255,255,255,.42);
    border: 1px solid rgba(200,192,182,.6);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 40px 70px -50px rgba(60,58,70,.5);
  }
  .choice-card:hover { border-color: var(--ink-3); background: rgba(255,255,255,.6); }

  /* ---- wishlist: gift left, words and the list right ---- */
  .wishes {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto 1fr; column-gap: clamp(48px, 6vw, 110px);
    min-height: 100vh; padding: 120px var(--side) 100px; align-items: center;
  }
  .gift-img { grid-column: 1; grid-row: 1 / 6; width: min(560px, 100%, calc((100vh - 240px) * 900 / 912)); justify-self: end; margin: 0; }
  .wish-title { grid-column: 2; grid-row: 2; justify-self: center; }
  .wish-sub { grid-column: 2; grid-row: 3; margin-top: 28px; font-size: 1rem; }
  .wish-list { grid-column: 2; grid-row: 4; margin-top: 40px; max-width: 560px; }

  /* ---- footer ---- */
  .footer { padding: 60px var(--side) 80px; }
  .footer-sprig { width: 220px; }
  .footer-names { font-size: 2.6rem; }
}

/* very wide screens: keep the halves from drifting apart */
@media (min-width: 1680px) {
  .story, .venue, .gallery, .wishes, .rsvp { padding-left: calc((100vw - 1560px) / 2); padding-right: calc((100vw - 1560px) / 2); }
}

/* ==========================================================================
   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;
  }
  .js [data-reveal] { opacity: 1; translate: none; }
}

/* ==========================================================================
   Added for the application (not in the landing)
   ========================================================================== */
.skip-link { position: fixed; z-index: 90; left: 1rem; top: 1rem; padding: .8rem 1rem; background: var(--ink); color: #fff; transform: translateY(-300%); }
.skip-link:focus { transform: none; }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: .76rem; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* without JavaScript the envelope stays closed: the way on is the link under it */
html:not(.js) .cover-after { opacity: 1; visibility: visible; translate: -50% 0; }

/* names from the event title: a stacked pair when "A & B" is short, one wrapped block otherwise */
.card-names { max-width: 100%; }
.card-names.is-md { font-size: calc(var(--ew) * .085); }
.card-names.is-sm { font-size: calc(var(--ew) * .065); }
.card-names .names-solo {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
  white-space: normal; text-align: center; text-wrap: balance; overflow-wrap: anywhere; line-height: 1.12;
}
.card-place {
  max-width: 88%; text-align: center; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.hero-names.is-md { font-size: 11.5cqi; }
.hero-names.is-sm { font-size: 8.8cqi; }
.hero-names .names-solo {
  font-size: .62em; letter-spacing: .12em; text-transform: uppercase; padding: 0;
  text-align: center; text-wrap: balance; overflow-wrap: anywhere; line-height: 1.2;
}
.footer-names, .menu-names { max-width: 100%; text-wrap: balance; overflow-wrap: anywhere; }
.footer-names.is-md, .menu-names.is-md { font-size: 1.5rem; }
.footer-names.is-sm, .menu-names.is-sm { font-size: 1.2rem; }
.hero-dear {
  position: relative; z-index: 1; max-width: 100%; margin-top: 10px;
  font: italic 400 1.35rem/1.3 var(--f-display); color: var(--ink-2); overflow-wrap: anywhere;
}

/* the story: the organizer's first photo, or the landing's hydrangeas */
.story-photo--flowers img { object-position: 50% 82%; }
.story-body--solo { grid-template-columns: minmax(0, 1fr); }
.story-lead { white-space: pre-line; overflow-wrap: anywhere; }

/* details list: program notes, dress code, time zone */
.schedule b { overflow-wrap: anywhere; }
.schedule-note, .schedule-text { display: block; margin-top: 2px; font: italic 400 .98rem/1.35 var(--f-body); letter-spacing: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.schedule-text { font-style: normal; font-size: .95rem; letter-spacing: .08em; }
.schedule-zone { margin-top: 30px; font: italic 400 1rem/1.4 var(--f-body); color: var(--ink-3); }

/* event photos from the shared macro */
.gallery { position: relative; padding: 84px var(--gutter) 22px; }
.gallery-grid { margin-top: 30px; }
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-gallery__item { aspect-ratio: 4 / 5; }
.photo-gallery__item:first-child,
.photo-gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.photo-gallery__link {
  display: block; height: 100%; padding: 6px;
  background: #fbfaf8;
  box-shadow: 0 18px 30px -18px rgba(60,58,70,.35), 0 2px 4px rgba(60,58,70,.08);
}
.photo-gallery__link img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.gallery .pager { margin-top: 34px; }

/* photo viewer (built by invitation.js) */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center;
  padding: max(.75rem, env(safe-area-inset-top)) .75rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(38,35,40,.94);
}
.lightbox__close { justify-self: end; width: 2.75rem; height: 2.75rem; color: #fff; }
.lightbox svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close svg { margin: auto; }
.lightbox__stage { position: relative; width: min(100%, 64rem); height: 100%; min-height: 0; overflow: hidden; }
.lightbox__stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: contain; opacity: 0; transition: opacity .6s var(--ease-out);
}
.lightbox__stage img.is-on { opacity: 1; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-top: 1rem; color: #fff; }
.lightbox__nav { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); color: #fff; }
.lightbox__count { min-width: 4rem; font: 400 1.2rem/1 var(--f-display); letter-spacing: .2em; text-align: center; }
.lightbox button:focus-visible { outline-color: #fff; }

/* the shared wishlist list */
.wishlist { width: 100%; margin-top: 26px; text-align: left; }
.wishlist-items { display: grid; gap: 14px; }
.wishlist-item {
  display: grid; gap: 16px; padding: 20px 20px 22px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 24px 40px -34px rgba(60,58,70,.5);
  scroll-margin-top: 84px;
}
.wishlist-item--mine { background: var(--blue-3); border-color: var(--blue-2); }
.wishlist-item__title { font: 400 1.5rem/1.2 var(--f-display); overflow-wrap: anywhere; }
.wishlist-item--taken .wishlist-item__title { color: var(--ink-3); }
.wishlist-item__description { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.wishlist-item__link { margin-top: 6px; }
.wishlist-item__link a { color: var(--blue-ink); text-underline-offset: .2em; }
.wishlist-item__status { margin-top: 8px; font: italic 400 1rem/1.4 var(--f-body); color: var(--ink-3); }
.wishlist-item__status strong { font-style: normal; font-weight: 500; color: var(--ink); }
.wishlist-item__actions { display: grid; gap: 10px; }
.wishlist-item__form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.wishlist-item__quantity { display: grid; gap: 4px; font: 400 .74rem/1.3 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.wishlist-item__quantity input {
  width: 6rem; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line-2); border-radius: 3px; background: rgba(255,255,255,.6);
  font: 400 1.1rem/1.2 var(--f-body); color: var(--ink);
}
.wishlist-item__quantity input:focus { outline: none; border-color: var(--blue-ink); box-shadow: 0 0 0 3px rgba(94,116,149,.14); }
.wishlist-item__form .btn, .wishlist-item__cancel .btn { flex: 1 1 100%; width: 100%; }
.wishlist-notice, .wishlist-error {
  margin-bottom: 16px; padding: 12px 16px; border: 1px solid; border-radius: 3px;
  background: rgba(255,255,255,.6); font: italic 400 1.04rem/1.4 var(--f-body);
}
.wishlist-notice { border-color: var(--blue-ink); color: var(--blue-ink); }
.wishlist-error { border-color: var(--err); color: var(--err); }
.wishlist-help { margin-top: 18px; text-align: center; font: italic 400 .98rem/1.4 var(--f-body); color: var(--ink-3); }

/* footer: reply line and countdown */
.footer-note { font-size: 1.1rem; }

/* ---------- response saved ---------- */
.saved {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px var(--gutter) 44px;
  text-align: center;
}
@supports (height: 1svh) { .saved { min-height: 100svh; } }
.saved-bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(transparent 0, #000 6%, #000 94%, transparent 100%);
}
.saved-sprig { width: 160px; margin: 0 auto 10px; filter: saturate(.55); }
.saved .title--sm { max-width: 100%; text-wrap: balance; overflow-wrap: anywhere; }
.saved .lead { margin: 14px auto 0; max-width: 20em; }
.saved-event { margin-top: 20px; max-width: 100%; font: italic 400 1.3rem/1.4 var(--f-display); color: var(--ink-2); overflow-wrap: anywhere; }
.saved-event span { color: var(--blue-ink); }
.saved-party { margin-top: 8px; font: 400 .84rem/1.5 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.saved-schedule { width: min(100%, 340px); margin-top: 34px; text-align: left; }
.saved .schedule-zone { margin-top: 22px; }
.saved-actions { display: grid; gap: 12px; width: min(100%, 320px); margin-top: 30px; }
.saved-wishlist { width: 100%; margin-top: 48px; }
.saved-wishlist .wish-list { margin-top: 8px; }
.saved .form-link { margin-top: 18px; }

@media (min-width: 1024px) {
  .story-body--solo { grid-template-columns: minmax(0, 1fr); }
  .gallery { padding: 140px var(--side) 100px; }
  .gallery .title { margin-left: 4vw; }
  .gallery-grid { max-width: 980px; margin: 56px auto 0; }
  .photo-gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .photo-gallery__item:first-child,
  .photo-gallery__item:last-child:nth-child(even) { grid-column: auto; aspect-ratio: 4 / 5; }
  .photo-gallery__link { transition: transform .5s var(--ease-out); }
  .photo-gallery__link:hover { transform: translateY(-3px); }
  .saved { padding: 120px var(--side) 80px; }
  .saved-wishlist { max-width: 640px; }
  .footer-note { font-size: 1.2rem; }
}
