/* ==========================================================================
   Denim Romance: rustic wedding invitation, ported from landing/denim_romance.
   Mobile-first 480px column; >= 1024px switches to the full-width desktop layout
   (one @media block near the end of this file). Fonts are local (fonts/OFL.txt).
   ========================================================================== */

@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; }
@font-face { font-display: swap; font-family: "Ms Madi"; font-style: normal; font-weight: 400; src: url("fonts/ms-madi-latin-ext-400-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: "Ms Madi"; font-style: normal; font-weight: 400; src: url("fonts/ms-madi-latin-400-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; }

:root {
  color-scheme: light;
  /* palette */
  --paper:    #f1e9dc;
  --paper-2:  #f8f3ea;
  --cream:    #fbf7ef;
  --ink:      #1d2a3d;   /* navy ink */
  --ink-2:    #45506a;
  --ink-3:    #6f7484;
  --line:     #d9cdb9;
  --denim:    #2f4d75;
  --denim-2:  #46689a;
  --denim-dk: #1c3152;
  --denim-lt: #b3c5dd;
  --stitch:   #dca35a;   /* golden topstitch */
  --leather:  #8a5a33;
  --err:      #a3402f;

  /* type: script for titles, Cormorant for tracked capitals, EB Garamond for reading */
  --f-script:  "Ms Madi", "Brush Script MT", cursive;
  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-body:    "EB Garamond", Garamond, Georgia, serif;

  --gutter: 26px;
  --col: 480px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --tex-denim: url("img/denim-tex.jpg");
  --tex-denim-lt: url("img/denim-light.jpg");
  --tex-paper: url("img/paper-tex.jpg");
}

/* ---------- 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: var(--paper) var(--tex-paper) center / 240px;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
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, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--stitch); outline-offset: 3px; }

/* Garamonds 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; }
.countdown b { font-variant-numeric: lining-nums tabular-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; }
.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; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main:focus { outline: none; }

/* ---------- page column ---------- */
.page { position: relative; max-width: var(--col); margin: 0 auto; overflow: clip; background: var(--paper) var(--tex-paper) center / 240px; }
@media (min-width: 560px) and (max-width: 1023.98px) {
  body { background: #d7dde6 var(--tex-denim-lt) center / 300px fixed; }
  .page { box-shadow: 0 0 0 1px rgba(29,42,61,.06), 0 30px 80px -20px rgba(29,42,61,.45); }
}

/* ---------- shared bits ---------- */
.script { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; }
.script-title { font: 400 clamp(3.2rem, 14vw, 4.2rem)/1.05 var(--f-script); color: var(--ink); rotate: -4deg; text-wrap: balance; }
.script--light { color: var(--cream); text-shadow: 0 2px 14px rgba(10,22,40,.55); }
.caps { font: 600 .86rem/1.6 var(--f-display); letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; }
.lead { font: 400 1.14rem/1.55 var(--f-body); color: var(--ink-2); text-wrap: pretty; white-space: pre-line; overflow-wrap: anywhere; }
.amp { font-style: normal; color: var(--leather); }

.sec { position: relative; isolation: isolate; overflow: hidden; }
.sec > picture { display: contents; }
.sec-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 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(transparent 0, #000 7%, #000 93%, transparent 100%);
}

/* stitched denim button */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 54px; padding: 0 30px;
  font: 600 .98rem/1 var(--f-display); letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  border-radius: 999px;
  transition: transform .2s, box-shadow .3s, filter .3s, background-color .3s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn--denim {
  color: #fff;
  background: var(--denim) var(--tex-denim) center / 180px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 -8px 16px rgba(10,22,40,.35), 0 12px 22px -12px rgba(15,30,55,.75);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.btn--denim::before { content: ""; position: absolute; inset: 5px; border-radius: inherit; border: 1.6px dashed rgba(240,214,170,.85); pointer-events: none; }
.btn--line { border: 1.4px dashed var(--ink-2); color: var(--ink); background: rgba(255,255,255,.45); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: .82rem; }
.btn--sm.btn--denim::before { inset: 4px; }
.btn--block { width: 100%; }

/* reveal on scroll (only when the script runs) */
.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; }

/* ==========================================================================
   1. COVER: the denim envelope
   The stage is the 768x960 frame of the stills and clips: 1.2 x the envelope width (--ew); the
   closed envelope fills x 8-92 %, y 34-79 % of it, the card rises into the top third.
   ========================================================================== */
.cover {
  --ew: min(86vw, 380px, 44vh);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh;
  display: grid; place-items: center;
  background: var(--denim-2);
}
@supports (height: 1svh) { .cover { --ew: min(86vw, 380px, 44svh); 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.4s var(--ease-out), scale 2.4s var(--ease-out);
}
.js .cover-bg { opacity: 0; scale: 1.06; }
.js .cover.is-intro .cover-bg { opacity: 1; scale: 1; }
.cover::after {   /* fade into the paper of the next section */
  content: ""; position: absolute; inset: auto 0 0; height: 7%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(241,233,220,0), var(--paper));
}

.stage {
  position: relative; z-index: 2;
  width: calc(var(--ew) * 1.2);
  margin: 40px 0 150px;
  display: flex; flex-direction: column; align-items: center;
}
.envelope { position: relative; display: block; width: 100%; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.js .cover:not(.is-ready) .envelope { pointer-events: none; }
.cover.is-open .envelope { cursor: default; }
.env { position: relative; display: block; width: 100%; aspect-ratio: 768 / 960; }
.env > img, .env > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.env-shadow {
  position: absolute; z-index: -1; left: 14%; right: 14%; top: 76%; height: 9%;
  background: radial-gradient(closest-side, rgba(8,20,38,.42), rgba(8,20,38,0));
  filter: blur(6px);
}

/* layer states: without the script the open envelope with the names is shown at once */
.env-closed, .env-idle, .env-film { opacity: 0; }
.js .env-open, .js .card-names { opacity: 0; }
.js .env-closed { opacity: 0; scale: .94; transition: opacity 1s var(--ease-out), scale 1.1s var(--ease-out); }
.js .cover.is-ready .env-closed { opacity: 1; scale: 1; }
.js .cover.is-idling .env-idle { opacity: 1; }
.js .cover.is-idling .env-closed { opacity: 0; transition: none; }
.js .cover.is-playing .env-film { opacity: 1; }
.js .cover.is-playing .env-idle, .js .cover.is-playing .env-closed { opacity: 0; transition: none; }
.js .cover.is-unsealed .env-open { opacity: 1; transition: opacity .7s var(--ease-out); }
.js .cover.is-unsealed .env-film, .js .cover.is-unsealed .env-idle { opacity: 0; }
.js .cover.is-unsealed .env-closed { opacity: 0; transition: opacity .7s var(--ease-out); }
.js .cover.is-playing.is-unsealed .env-open { transition: none; }   /* the film's last frame is the open still */

/* the names written on the card */
.card-names {
  position: absolute; z-index: 3; left: 18%; right: 18%; top: 14%;
  display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 0 .18em;
  text-align: center;
  font: 400 calc(var(--ew) * .11)/1.05 var(--f-script); color: var(--ink);
  overflow-wrap: anywhere;
  transition: opacity 1.1s var(--ease-out), translate 1.1s var(--ease-out);
}
.card-names.is-md { font-size: calc(var(--ew) * .085); }
.card-names.is-sm { font-size: calc(var(--ew) * .062); top: 12%; }
.js .card-names { translate: 0 6px; }
.js .cover.card-in .card-names { opacity: 1; translate: none; }

.cover-hint {
  position: absolute; left: 50%; top: 81%; translate: -50% 0;   /* just under the closed envelope */
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: max-content;
  color: var(--cream); text-shadow: 0 1px 10px rgba(10,22,40,.7);
  font: 600 .95rem/1 var(--f-display); letter-spacing: .34em; text-transform: uppercase; padding-left: .34em;
  opacity: 0; transition: opacity .9s var(--ease-out) .4s; pointer-events: none;
}
html:not(.js) .cover-hint { display: none; }
.hint-arrow { width: 16px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cover-hint .t-mouse { display: none; }
.js .cover.is-ready .cover-hint { opacity: 1; }
.js .cover.is-ready .hint-arrow { animation: nudge 2.2s ease-in-out 1.2s infinite; }
.js .cover.is-open .cover-hint { opacity: 0; transition-delay: 0s; transition-duration: .35s; }

.cover-after {
  position: absolute; left: 50%; top: 81%; translate: -50% 0;   /* just under the open envelope */
  width: max-content; max-width: 92vw;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--cream); text-shadow: 0 1px 10px rgba(10,22,40,.75); text-align: center;
  transition: opacity .9s var(--ease-out) .3s, translate .9s var(--ease-out) .3s, visibility 0s .3s;
}
.js .cover:not(.is-revealed) .cover-after { opacity: 0; visibility: hidden; translate: -50% 10px; transition: none; }
.cover-date { font: 600 clamp(.76rem, 3.4vw, .9rem)/1.3 var(--f-display); letter-spacing: .22em; text-transform: uppercase; padding-left: .22em; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 6px; font: italic 400 1.35rem/1 var(--f-body); text-decoration: none; }
.ico--down { width: 26px; height: 18px; stroke-width: 2; animation: nudge 2.2s ease-in-out infinite; }

/* 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; }

/* daisy petals */
.petal {
  position: absolute; z-index: 8; left: 50%; top: 30%;
  width: var(--s); height: calc(var(--s) * .38);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(10,22,40,.25);
  pointer-events: none;
  animation: petal var(--d) cubic-bezier(.2,.7,.3,1) forwards;
}
.petal.is-dot { height: var(--s); background: #f3d77a; }

@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@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. INVITATION: You're invited to our Wedding
   ========================================================================== */
.invite {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 72px var(--gutter) 64px;
  text-align: center;
}
@supports (height: 1svh) { .invite { min-height: 100svh; } }
.invite-in { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.invite-dear { max-width: 100%; margin-bottom: 18px; font: italic 500 1.25rem/1.3 var(--f-body); color: var(--ink); overflow-wrap: anywhere; }
.invite-dear span { font-style: normal; font-weight: 500; color: var(--ink); }
.invite-dear.is-md { font-size: 1.1rem; }
.invite-dear.is-sm { font-size: 1rem; }
.caps--stack span { display: block; }
.invite .caps--stack { font-size: .92rem; line-height: 1.9; color: var(--ink); }
.invite-title { position: relative; margin-top: 2px; font-weight: 400; }
.invite-title .script { display: block; font-size: clamp(5.2rem, 26vw, 7rem); line-height: 1; rotate: -6deg; padding: 0 .1em; }
.flourish { width: 74%; margin: -14px auto 0; translate: 6% 0; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.invite-names { margin-top: 12px; font: 400 2.6rem/1.1 var(--f-script); color: var(--ink); overflow-wrap: anywhere; text-wrap: balance; }
.invite-names.is-md { font-size: 2.1rem; }
.invite-names.is-sm { font-size: 1.7rem; }
.leather { position: relative; width: 150px; margin-top: 18px; rotate: -5deg; filter: drop-shadow(0 8px 10px rgba(40,22,10,.35)); }
.leather img { width: 100%; }
.leather span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 1.9rem/1 var(--f-display); letter-spacing: .06em; color: #3c2413;
  text-shadow: 0 1px 0 rgba(255,220,180,.35), 0 -1px 0 rgba(0,0,0,.35); opacity: .85;
}
.facts {
  display: grid; grid-template-columns: 1fr 1fr;
  width: min(100%, 360px); margin-top: 24px;
  background: rgba(251,247,239,.78);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-radius: 6px;
  box-shadow: 0 10px 24px -18px rgba(10,22,40,.5);
}
.facts > div { padding: 12px 14px; min-width: 0; }
.facts > div + div { border-left: 1px dashed rgba(69,80,106,.35); }
.facts dt { font: 600 .72rem/1.3 var(--f-display); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin-top: 4px; font: 400 1rem/1.3 var(--f-body); overflow-wrap: anywhere; }
.countdown { display: flex; gap: 18px; margin-top: 16px; padding: 10px 18px; background: rgba(251,247,239,.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-radius: 6px; box-shadow: 0 10px 24px -18px rgba(10,22,40,.5); }
.countdown div { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.countdown b { font: 600 1.7rem/1 var(--f-display); }
.countdown span { margin-top: 4px; font: 600 .7rem/1 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3); padding-left: .26em; }

/* ==========================================================================
   3. OUR STORY: the organizer's words and photos as polaroids
   ========================================================================== */
.story { padding: 64px var(--gutter) 70px; }
.story-text { position: relative; z-index: 2; }
.story .script-title { margin-left: 6px; }
.story .lead { margin-top: 14px; max-width: 24em; }
.story-patch { width: 150px; margin: 30px auto 10px; rotate: -6deg; filter: drop-shadow(0 12px 14px rgba(10,22,40,.35)); }

.pola-stack { position: relative; margin: 26px -6px 0; aspect-ratio: 1 / 1.12; touch-action: pan-y; }
.pola-stack--1 { aspect-ratio: 1 / .95; }
.pola {
  position: absolute;
  padding: 4.2% 4.2% 14%;
  background: #fcfaf5 var(--tex-paper) center / 200px;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(10,22,40,.08), 0 18px 28px -14px rgba(10,22,40,.45);
  transition: left .8s var(--ease-out), top .8s var(--ease-out), width .8s var(--ease-out), rotate .8s var(--ease-out), z-index 0s .3s;
}
.pola-photo { display: block; aspect-ratio: 1; overflow: hidden; background: #c9d3df; }
.pola-photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.pola[data-pos="0"] { left: 22%; top: 0;   width: 72%; rotate: 5deg;  z-index: 2; }
.pola[data-pos="1"] { left: 2%;  top: 45%; width: 52%; rotate: -7deg; z-index: 3; cursor: pointer; }
.pola[data-pos="2"] { left: 50%; top: 50%; width: 47%; rotate: 6deg;  z-index: 4; cursor: pointer; }
.pola-stack--1 .pola[data-pos="0"] { left: 14%; width: 72%; }
.pola-stack--2 .pola[data-pos="1"] { left: 6%; top: 40%; width: 56%; }

.pola-nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.nav-arrow {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(251,247,239,.92); color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(10,22,40,.5);
  transition: transform .2s, background-color .3s;
}
.nav-arrow .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.nav-arrow.prev .ico { rotate: 180deg; }
.nav-arrow:active { transform: scale(.94); }
.dots { display: flex; gap: 2px; }
.dots button { width: 26px; height: 26px; display: grid; place-items: center; }
.dots button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.4px solid var(--ink); transition: background-color .3s; }
.dots button[aria-pressed="true"]::after { background: var(--ink); }

/* ==========================================================================
   4. THE WEDDING DAY
   ========================================================================== */
.day { min-height: 100vh; padding: 76px var(--gutter) 70px; }
@supports (height: 1svh) { .day { min-height: 100svh; } }
.day .sec-bg { object-position: 100% 50%; }
.day-in { display: flex; flex-direction: column; }
.day .script-title { align-self: center; font-size: clamp(2.9rem, 13vw, 3.8rem); text-align: center; }
.day-card, .dress {
  width: min(74%, 300px); margin: 36px 0 0 auto;
  background: rgba(248,243,234,.8);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  border-radius: 6px;
}
.day-card { padding: 22px 18px 16px; }
.timeline { display: grid; gap: 20px; }
.timeline li { display: grid; grid-template-columns: 38px auto 1fr; gap: 12px; align-items: center; }
.timeline .ico { width: 36px; height: 36px; stroke-width: 1.5; color: var(--ink); }
.timeline time { font: 600 1.2rem/1 var(--f-display); white-space: nowrap; }
.timeline .tl-none { color: var(--ink-3); }
.timeline span { font: 400 1.12rem/1.2 var(--f-body); color: var(--ink-2); overflow-wrap: anywhere; }
.timeline small { display: block; margin-top: 2px; font: italic 400 .92rem/1.25 var(--f-body); color: var(--ink-3); }
.tl-zone { margin-top: 16px; font: italic 400 .9rem/1.3 var(--f-body); color: var(--ink-3); text-align: right; }
.dress { margin-top: 14px; padding: 14px 18px; }
.dress-label { display: flex; align-items: center; gap: 8px; font: 600 .74rem/1.3 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3); }
.dress-label .ico { width: 20px; height: 20px; color: var(--ink-2); }
.dress-text { margin-top: 6px; font-size: 1.04rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }

/* ==========================================================================
   5. PHOTOS
   ========================================================================== */
.gallery { padding: 64px var(--gutter) 56px; text-align: center; }
.gallery-grid { margin-top: 26px; }
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; margin: 0 auto; }
.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%; overflow: hidden;
  padding: 6px; background: #fcfaf5;
  border-radius: 2px;
  box-shadow: 0 16px 26px -16px rgba(10,22,40,.5);
}
.photo-gallery__link img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: scale .6s var(--ease-out); }

/* ==========================================================================
   6. RSVP
   ========================================================================== */
.rsvp { padding: 92px var(--gutter) 96px; text-align: center; }
.rsvp-title { font: 600 clamp(3.4rem, 17vw, 4.3rem)/1 var(--f-display); letter-spacing: .16em; padding-left: .16em; }
.rsvp-head .caps { margin-top: 10px; font-size: .95rem; }
.rsvp-by { margin-top: 8px; font: italic 400 1.05rem/1.3 var(--f-body); color: var(--ink-2); }

.form {
  margin-top: 28px; padding: 22px 20px 20px;
  text-align: left;
  background: rgba(251,247,239,.82);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border-radius: 8px;
  box-shadow: 0 20px 40px -28px rgba(10,22,40,.55);
}
.form-error { margin-bottom: 18px; padding: 12px 16px; border-radius: 6px; background: #f6e2de; border: 1px solid rgba(163,64,47,.35); color: var(--err); font: 400 1rem/1.4 var(--f-body); }
.form-current { margin-bottom: 18px; font: italic 400 1.1rem/1.4 var(--f-body); color: var(--ink-2); }
.form-current strong { font-style: normal; font-weight: 600; color: var(--ink); }
.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: 6px 0; text-align: center; font: italic 400 1.08rem/1.3 var(--f-body); color: var(--denim); text-underline-offset: 4px; }

.choice { display: grid; gap: 14px; margin-bottom: 22px; }
.patch {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 62px; padding: 0 24px;
  border-radius: 999px;
  font: 400 1.28rem/1.1 var(--f-body);
  cursor: pointer;
  transition: transform .3s var(--ease-out), box-shadow .3s, filter .3s;
  -webkit-tap-highlight-color: transparent;
}
.patch input { position: absolute; opacity: 0; pointer-events: none; }
.patch::before { content: ""; position: absolute; inset: 6px; border-radius: inherit; border: 1.7px dashed; pointer-events: none; }
.patch .ico { width: 28px; height: 28px; stroke-width: 2.4; }
.patch--dark {
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  background: var(--denim) var(--tex-denim) center / 180px;
  box-shadow: inset 0 -10px 18px rgba(10,22,40,.38), inset 0 2px 2px rgba(255,255,255,.12), 0 12px 20px -12px rgba(15,30,55,.8);
}
.patch--dark::before { border-color: rgba(240,214,170,.85); }
.patch--light {
  color: var(--denim-dk); font-weight: 500;
  background: linear-gradient(rgba(235,241,249,.42), rgba(235,241,249,.42)), var(--denim-lt) var(--tex-denim-lt) center / 180px;
  box-shadow: inset 0 -10px 18px rgba(30,55,90,.18), inset 0 2px 2px rgba(255,255,255,.3), 0 12px 20px -12px rgba(15,30,55,.55);
}
.patch--light::before { border-color: rgba(255,255,255,.9); }
.patch:has(input:focus-visible) { outline: 2px solid var(--stitch); outline-offset: 3px; }
.choice:has(input:checked) .patch:not(:has(input:checked)) { filter: saturate(.5) opacity(.6); transform: scale(.97); }
.patch:has(input:checked) { transform: translateY(-2px); }
.patch:has(input:checked)::after {   /* a brass rivet marks the answer */
  content: ""; position: absolute; right: -2px; top: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d79a, #b38a46 55%, #6e5226);
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
}

/* shared reply fields */
.rsvp-extra { display: grid; gap: 18px; margin-bottom: 22px; }
.rsvp-extra__field { display: grid; gap: 7px; min-width: 0; }
.rsvp-extra__label { display: block; font: 600 .76rem/1.4 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.rsvp-extra__optional { font: italic 400 1.1em/1 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.rsvp-extra__help { font: italic 400 .98rem/1.35 var(--f-body); color: var(--ink-3); }
.rsvp-extra__input {
  width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 4px;
  background: rgba(255,255,255,.75);
  padding: 12px 14px;
  font: 400 1.08rem/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:focus { outline: none; border-color: var(--denim-2); background: #fff; box-shadow: 0 0 0 3px rgba(70,104,154,.16); }
.rsvp-extra__textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.rsvp-extra__number { max-width: 140px; }
.rsvp-guests-block { display: grid; gap: 12px; min-width: 0; }
.rsvp-guests { display: grid; gap: 14px; }
.rsvp-guest { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px 16px 12px; border: 1.4px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,.5); }
.rsvp-guest__legend { padding: 0 6px; font: 400 1.5rem/1 var(--f-script); color: var(--denim); }
.rsvp-guest__names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsvp-guest__field { display: grid; gap: 6px; min-width: 0; }
.rsvp-guest__select { -webkit-appearance: auto; appearance: auto; }
.rsvp-guest__toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-guest__option {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 12px; border-radius: 999px;
  border: 1.4px dashed var(--ink-3); background: rgba(255,255,255,.6);
  font: 500 1rem/1 var(--f-body); color: var(--ink);
}
.rsvp-guest__option[aria-pressed="true"] { background: var(--denim) var(--tex-denim) center / 160px; border-color: rgba(240,214,170,.85); color: #fff; }
.rsvp-guest__icon { flex: none; width: 14px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-guests__add { justify-self: center; }
.rsvp-guests__count { text-align: center; font: italic 400 1rem/1.3 var(--f-body); color: var(--ink-2); }
.rsvp-guest__remove { justify-self: end; min-height: 40px; padding: 0 4px; font: italic 400 1.05rem/1 var(--f-body); color: var(--denim); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 380px) { .rsvp-guest__names { grid-template-columns: 1fr; } }

/* ==========================================================================
   7. GOOD TO KNOW: stitched tags on dark denim
   ========================================================================== */
.venue { padding: 84px var(--gutter) 70px; background: var(--denim-dk); }
.venue .sec-bg { -webkit-mask-image: none; mask-image: none; }
.venue::before, .venue::after { content: ""; position: absolute; left: 0; right: 0; height: 46px; z-index: 0; pointer-events: none; }
.venue::before { top: 0; background: linear-gradient(var(--paper), rgba(241,233,220,0)); }
.venue::after { bottom: 0; background: linear-gradient(rgba(241,233,220,0), var(--paper)); }
.venue-head { position: relative; z-index: 1; text-align: center; }
.venue-addr { margin-top: 16px; font: 400 1.08rem/1.5 var(--f-body); color: rgba(251,247,239,.92); text-shadow: 0 1px 8px rgba(10,22,40,.8); overflow-wrap: anywhere; }
.venue-addr b { font: 600 1.15rem/1.4 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.tags { position: relative; z-index: 1; display: grid; gap: 16px; margin: 30px auto 0; max-width: 360px; }
.tag {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 18px;
  min-height: 70px; padding: 0 22px 0 24px;
  text-decoration: none; color: var(--ink);
  filter: drop-shadow(0 8px 10px rgba(5,14,28,.45));
  transition: transform .3s var(--ease-out), filter .3s;
}
.tag-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.tag-shape { fill: url(#dr-paper); }
.tag-stitch { fill: none; stroke: #b8a587; stroke-width: 1.4; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.tag .ico { width: 30px; height: 30px; stroke-width: 1.5; }
.tag > span { flex: 1; font: 400 1.26rem/1.1 var(--f-body); }
.tag .chev { width: 20px; height: 20px; stroke-width: 2; }
.tag:active { transform: scale(.98); }
.rope-heart { position: relative; z-index: 1; margin: 34px auto 0; width: 92px; rotate: -6deg; filter: drop-shadow(0 6px 6px rgba(5,14,28,.5)); }

/* ==========================================================================
   8. WISHLIST
   ========================================================================== */
.gifts { padding: 80px var(--gutter) 90px; text-align: center; }
.gifts-in { display: flex; flex-direction: column; align-items: center; }
.gift-patch { width: 140px; margin: 0 auto 6px; rotate: -6deg; filter: drop-shadow(0 12px 14px rgba(10,22,40,.35)); }
.gifts .lead { margin: 14px auto 0; max-width: 22em; }
.wish-list { width: 100%; margin-top: 26px; text-align: left; }
.wishlist { width: 100%; }
.wishlist-items { display: grid; gap: 14px; }
.wishlist-item {
  display: grid; gap: 12px;
  padding: 16px 18px;
  background: rgba(251,247,239,.86);
  border: 1.4px dashed var(--line); border-radius: 8px;
  box-shadow: 0 14px 26px -20px rgba(10,22,40,.55);
}
.wishlist-item--mine { border-color: var(--stitch); box-shadow: 0 0 0 1px rgba(220,163,90,.35) inset, 0 14px 26px -20px rgba(10,22,40,.55); }
.wishlist-item--taken { opacity: .7; }
.wishlist-item__title { font: 600 1.3rem/1.2 var(--f-display); color: var(--ink); overflow-wrap: anywhere; }
.wishlist-item__description { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 1rem/1.45 var(--f-body); color: var(--ink-2); }
.wishlist-item__link { margin-top: 6px; }
.wishlist-item__link a { color: var(--denim); text-underline-offset: 4px; }
.wishlist-item__status { margin-top: 8px; font: italic 400 1.02rem/1.4 var(--f-body); color: var(--ink-3); }
.wishlist-item__status strong { font-style: normal; font-weight: 600; color: var(--denim); }
.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: 600 .72rem/1.3 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.wishlist-item__quantity input { width: 96px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font: 400 1.05rem/1 var(--f-body); }
.wishlist-item__quantity input:focus { outline: none; border-color: var(--denim-2); box-shadow: 0 0 0 3px rgba(70,104,154,.16); }
.wishlist-item__form .btn, .wishlist-item__cancel .btn { flex: 1 1 100%; width: 100%; }
.wishlist-notice, .wishlist-error { margin-bottom: 14px; padding: 12px 16px; border-radius: 6px; font: 400 1rem/1.4 var(--f-body); }
.wishlist-notice { background: rgba(251,247,239,.9); border: 1px solid var(--stitch); color: var(--ink); }
.wishlist-error { background: #f6e2de; border: 1px solid rgba(163,64,47,.35); color: var(--err); }
.wishlist-help { margin-top: 16px; text-align: center; font: italic 400 1rem/1.4 var(--f-body); color: var(--ink-3); }

/* ==========================================================================
   FOOTER and the confirmation page
   ========================================================================== */
.foot { padding: 30px var(--gutter) 64px; text-align: center; }
.foot-daisy { width: 210px; margin: 0 auto 8px; }
.foot-names { font: 400 3rem/1.15 var(--f-script); overflow-wrap: anywhere; }
.foot-names.is-md { font-size: 2.4rem; }
.foot-names.is-sm { font-size: 1.9rem; }
.foot-meta { margin-top: 6px; font: 600 .78rem/1.5 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); padding-left: .26em; overflow-wrap: anywhere; }

.saved { padding: 64px var(--gutter) 70px; text-align: center; }
.thanks {
  padding: 30px 22px 28px;
  background: rgba(251,247,239,.88);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border-radius: 8px;
  box-shadow: 0 20px 40px -28px rgba(10,22,40,.55);
}
.th-heart { width: 44px; height: 40px; margin: 0 auto 10px; fill: none; stroke: var(--leather); stroke-width: 2.6; stroke-linejoin: round; }
.thanks-title { font-size: 2.8rem; line-height: 1.05; }
.thanks .lead { margin: 10px auto 0; max-width: 22em; overflow-wrap: anywhere; }
.saved-event { margin-top: 16px; font: 400 2.2rem/1.1 var(--f-script); overflow-wrap: anywhere; }
.saved-event.is-md { font-size: 1.9rem; }
.saved-event.is-sm { font-size: 1.6rem; }
.saved-party { margin: 6px 0 0; font: italic 400 1.08rem/1.3 var(--f-body); color: var(--ink-2); }
.thanks .btn { margin-top: 20px; }
.saved-day { margin-top: 26px; }
.saved-when { font: 600 .9rem/1.5 var(--f-display); letter-spacing: .2em; text-transform: uppercase; }
.saved-where { margin-top: 6px; font: 400 1.05rem/1.4 var(--f-body); color: var(--ink-2); overflow-wrap: anywhere; }
.text-link { color: var(--denim); text-underline-offset: 4px; }
.saved .day-card, .saved .dress { margin: 18px auto 0; width: min(100%, 340px); text-align: left; }
.saved-wishlist { margin-top: 40px; }
.saved-wishlist .lead { margin-top: 10px; }
.saved > .form-link { margin-top: 26px; }

/* ==========================================================================
   Phone chrome: menu + RSVP button
   ========================================================================== */
.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: 46px; height: 46px; border-radius: 50%;
  color: #fff; font-size: 22px;
  background: var(--denim) var(--tex-denim) center / 140px;
  box-shadow: inset 0 -6px 10px rgba(10,22,40,.35), 0 6px 14px -6px rgba(10,22,40,.6);
  opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease-out);
}
.menu-btn::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1.3px dashed rgba(240,214,170,.8); }
.menu-btn .ico { stroke-width: 2; }
.is-opened .menu-btn { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; z-index: 70; inset: 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(--denim-dk) var(--tex-denim) center / 260px;
  background-blend-mode: multiply;
  color: var(--cream); text-align: center;
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.menu.is-shown { opacity: 1; }
.menu-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; color: var(--cream); }
.menu-names { font: 400 2.8rem/1.1 var(--f-script); overflow-wrap: anywhere; }
.menu-names.is-md { font-size: 2.3rem; }
.menu-names.is-sm { font-size: 1.8rem; }
.menu-names .amp { color: var(--stitch); }
.menu ul { margin: 22px 0 26px; display: grid; gap: 4px; }
.menu ul a { display: block; padding: 8px 20px; font: 400 1.6rem/1.15 var(--f-body); text-decoration: none; }
.menu-meta { font: 600 .8rem/1.5 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--stitch); }

.fab {
  position: fixed; z-index: 50;
  right: max(16px, calc(50vw - var(--col) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid; place-items: center;
  width: 66px; height: 66px; border-radius: 50%;
  font: 700 .86rem/1 var(--f-display); letter-spacing: .14em; padding-left: .14em; color: #fff; text-decoration: none;
  background: var(--denim) var(--tex-denim) center / 140px;
  box-shadow: inset 0 -8px 12px rgba(10,22,40,.4), 0 10px 20px -8px rgba(10,22,40,.6);
  opacity: 0; translate: 0 16px; pointer-events: none;
  transition: opacity .4s var(--ease-out), translate .4s var(--ease-out);
}
.fab::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.4px dashed rgba(240,214,170,.85); }
.fab.is-shown { opacity: 1; translate: none; pointer-events: auto; }
html:not(.js) .fab { display: none; }

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

@media (hover: hover) and (pointer: fine) {
  .cover-hint .t-touch { display: none; }
  .cover-hint .t-mouse { display: inline; }
}

/* ==========================================================================
   DESKTOP >= 1024px: full width, top bar, dot rail, split sections
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --gutter: 48px; --side: max(56px, 7vw); }
  body { background: var(--paper) var(--tex-paper) center / 240px; }
  .page { max-width: none; box-shadow: none; }
  .menu-btn, .menu, .fab { display: none !important; }

  /* ---- top bar ---- */
  .topbar {
    position: fixed; z-index: 60; inset: 0 0 auto;
    display: flex; align-items: center; gap: 36px;
    height: 78px; padding: 0 var(--side);
    opacity: 0; translate: 0 -12px; pointer-events: none;
    color: var(--cream);
    background: linear-gradient(rgba(20,36,60,.55), rgba(20,36,60,0));
    transition: opacity .6s var(--ease-out), translate .6s var(--ease-out), background-color .4s, color .4s, box-shadow .4s;
  }
  .is-opened .topbar, html:not(.js) .topbar { opacity: 1; translate: none; pointer-events: auto; }
  .topbar.is-solid, html:not(.js) .topbar {
    color: var(--ink);
    background: rgba(248,243,234,.9);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(29,42,61,.08);
  }
  .topbar-brand { font: 600 1.5rem/1 var(--f-display); letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
  .topbar-nav { display: flex; gap: 4px; margin-left: auto; }
  .topbar-nav a {
    position: relative; padding: 10px 12px;
    font: 600 .8rem/1 var(--f-display); letter-spacing: .22em; text-transform: uppercase;
    text-decoration: none; opacity: .85; transition: opacity .25s; white-space: nowrap;
  }
  .topbar-nav a::after {
    content: ""; position: absolute; left: 12px; right: calc(12px + .22em); bottom: 2px;
    border-bottom: 1.5px dashed var(--stitch);
    transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
  }
  .topbar-nav a:hover, .topbar-nav a[aria-current="true"] { opacity: 1; }
  .topbar-nav a:hover::after, .topbar-nav a[aria-current="true"]::after { transform: none; }
  .topbar .btn.is-active { box-shadow: 0 0 0 2px var(--stitch), inset 0 -8px 16px rgba(10,22,40,.35); }

  /* ---- rail ---- */
  .rail {
    position: fixed; z-index: 55; right: 24px; 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: 9px; height: 9px; border-radius: 50%;
    background: rgba(251,247,239,.7); border: 1.4px solid var(--denim);
    box-shadow: 0 0 0 2px rgba(251,247,239,.4);
    transition: background-color .3s, transform .3s;
  }
  .rail a:hover::after { transform: scale(1.3); }
  .rail a[aria-current="true"]::after { background: var(--denim); }
  .rail a::before {
    content: attr(aria-label); position: absolute; right: 32px; top: 50%; translate: 6px -50%;
    white-space: nowrap; padding: 6px 10px; border-radius: 3px;
    font: italic 400 1.05rem/1 var(--f-body); color: var(--ink); background: rgba(251,247,239,.92);
    opacity: 0; pointer-events: none; transition: opacity .3s, translate .3s var(--ease-out);
  }
  .rail a:hover::before { opacity: 1; translate: 0 -50%; }

  /* ---- shared scale ---- */
  .sec { min-height: 100vh; }
  .script-title { font-size: clamp(4.4rem, 5.8vw, 6.2rem); }
  .lead { font-size: 1.28rem; }
  .btn { min-height: 58px; }
  .btn--denim:hover { transform: translateY(-1px); filter: brightness(1.08); }
  .btn--line:hover { border-color: var(--ink); background: rgba(255,255,255,.7); }
  .sec-bg {
    -webkit-mask-image: linear-gradient(transparent 0, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(transparent 0, #000 9%, #000 91%, transparent 100%);
  }

  /* ---- cover ---- */
  .cover { --ew: min(460px, 44vh, 36vw); }
  @supports (height: 1svh) { .cover { --ew: min(460px, 44svh, 36vw); } }
  .stage { margin: 90px 0 120px; }
  .cover-hint { font-size: 1rem; }
  .cover.is-ready:not(.is-open) .envelope:hover .env { scale: 1.02; }
  .env { transition: scale .5s var(--ease-out); }
  .cover-date { font-size: 1rem; }
  .scroll-cue { font-size: 1.5rem; }

  /* ---- invitation: centred on the landscape paper ---- */
  .invite { padding: 110px var(--side) 70px; }
  .invite .caps--stack { font-size: 1.05rem; display: flex; gap: .6em; }
  .invite-title .script { font-size: clamp(6.4rem, min(10.5vw, 17vh), 10rem); }
  .flourish { width: 80%; margin-top: -22px; }
  .invite-names { font-size: 3rem; }
  .invite-names.is-md { font-size: 2.4rem; }
  .invite-names.is-sm { font-size: 2rem; }
  .invite-in { display: grid; grid-template-columns: auto auto; column-gap: 56px; justify-items: center; align-items: center; }
  .invite-in > * { grid-column: 1 / 3; }
  .leather { width: 170px; margin-top: 22px; }
  .facts { grid-column: 1; width: 420px; margin-top: 28px; }
  .countdown { grid-column: 2; margin-top: 28px; }
  .countdown b { font-size: 2.1rem; }

  /* ---- story: words left, polaroids right ---- */
  .story {
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(40px, 6vw, 110px);
    padding: 110px var(--side) 80px;
  }
  .story-text { grid-column: 1; grid-row: 2; align-self: center; justify-self: end; max-width: 520px; }
  .story .lead { margin-top: 22px; }
  .pola-stack { grid-column: 2; grid-row: 1 / 5; align-self: center; justify-self: start; width: min(100%, calc((100vh - 220px) / 1.12), 600px); margin: 0; }
  .pola-stack--1 { width: min(100%, calc((100vh - 220px) / .95), 520px); }
  .pola-nav { grid-column: 1; grid-row: 3; justify-self: end; width: min(100%, 520px); justify-content: flex-start; margin-top: 20px; }
  .story-patch { grid-column: 2; grid-row: 1 / 5; align-self: center; width: 240px; margin: 0; }
  .nav-arrow:hover { background: #fff; transform: scale(1.06); }

  /* ---- the day: pocket on the left of the landscape background, schedule on the right ---- */
  .day { display: grid; place-items: center; padding: 110px var(--side) 80px; }
  .day .sec-bg { object-position: 50% 50%; }
  .day-in { display: grid; grid-template-columns: auto auto; column-gap: 50px; align-items: start; margin-left: 22vw; }
  .day .script-title { grid-column: 1 / 3; justify-self: start; margin-bottom: 10px; font-size: clamp(4.4rem, 5.8vw, 6.2rem); }
  .day-card { width: 380px; margin: 26px 0 0; padding: 28px 28px 18px; }
  .timeline { gap: 24px; }
  .timeline li { grid-template-columns: 44px auto 1fr; gap: 16px; }
  .timeline .ico { width: 42px; height: 42px; }
  .timeline time { font-size: 1.42rem; }
  .timeline span { font-size: 1.26rem; }
  .dress { width: 280px; margin: 26px 0 0; }

  /* ---- photos ---- */
  .gallery { padding: 110px var(--side) 90px; }
  .photo-gallery { max-width: 980px; grid-template-columns: repeat(3, 1fr); }
  .photo-gallery__item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .photo-gallery__item:last-child:nth-child(even) { grid-column: auto; aspect-ratio: 4 / 5; }
  .photo-gallery__link:hover img { scale: 1.03; }

  /* ---- rsvp: heading left, form right ---- */
  .rsvp {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 520px);
    grid-template-rows: 1fr auto 1fr; column-gap: clamp(56px, 8vw, 140px);
    padding: 120px var(--side) 100px;
  }
  .rsvp-head { grid-column: 1; grid-row: 2; align-self: center; justify-self: center; }
  .rsvp-title { font-size: clamp(6rem, 9vw, 8.6rem); }
  .rsvp-head .caps { font-size: 1.1rem; margin-top: 16px; }
  .rsvp-by { font-size: 1.15rem; }
  .form { grid-column: 2; grid-row: 1 / 4; align-self: center; margin-top: 0; padding: 30px 30px 24px; }
  .patch:hover { transform: translateY(-2px); filter: brightness(1.06); }

  /* ---- good to know: title + address left, tags right ---- */
  .venue {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center; column-gap: clamp(48px, 7vw, 120px);
    padding: 110px var(--side) 90px;
  }
  .venue::before, .venue::after { height: 80px; }
  .venue-head { grid-column: 1; grid-row: 1; justify-self: end; max-width: 520px; }
  .venue-addr { font-size: 1.2rem; margin-top: 22px; }
  .tags { grid-column: 2; grid-row: 1; justify-self: start; width: 400px; max-width: none; margin: 0; gap: 18px; }
  .tag { min-height: 76px; }
  .tag:hover { transform: translateX(6px); filter: drop-shadow(0 12px 14px rgba(5,14,28,.55)); }
  .rope-heart { position: absolute; margin: 0; left: auto; right: 9vw; bottom: 12vh; width: 120px; }

  /* ---- wishlist ---- */
  .gifts { padding: 110px var(--side) 90px; }
  .gifts-in { max-width: 720px; margin: 0 auto; }
  .gift-patch { width: 180px; }
  .wishlist-item__form .btn, .wishlist-item__cancel .btn { flex: 0 1 auto; width: auto; }
  .wishlist-items { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  /* ---- confirmation ---- */
  .saved { padding: 120px var(--side) 90px; }
  .thanks, .saved-day, .saved-wishlist { max-width: 640px; margin-left: auto; margin-right: auto; }
  .saved-wishlist .wishlist-items { grid-template-columns: 1fr; }

  .foot { padding: 50px var(--side) 80px; }
  .foot-names { font-size: 3.8rem; }
}

@media (min-width: 1680px) {
  .story, .venue, .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; }
}
