/* Nishara & Devon — the invitation suite, laid out on the table. */

:root {
  --ivory: #F6F1EE;
  --paper: #FCF9F7;
  --blush: #FBE7E4;
  --blush-soft: #F6DCD7;
  --blush-mid: #EFCBC3;
  --blush-deep: #E2B0A5;
  --rose-field: #F4D7D0;
  --white: #FFFDFB;
  --sand: #EBDFD6;
  --champagne: #EAD9C6;
  --copper: #6F4A34;
  --copper-deep: #563826;
  --gold: #906034;
  --gold-soft: #C9A47A;
  --burgundy: #7B3A36;
  --emboss-shade: #D6C2B6;
  --emboss-lite: #FFFFFF;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;

  --t-small: 1rem;
  --t-body: 1.1875rem;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-soft: cubic-bezier(.45, 0, .2, 1);
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px; }
html.letter-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--burgundy);
  color: var(--copper);
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: clip;
}
/* paper grain, very faint */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .15 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--blush); color: var(--copper-deep); }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; text-transform: none; }
.ch { display: inline-block; }

/* ---------- Monogram ---------- */
.monogram { position: relative; display: inline-flex; align-items: center; font-weight: 500; font-size: 30px; line-height: 1; color: var(--gold); }
.monogram__n { transform: translateX(.08em); }
.monogram__d { transform: translateX(-.06em); }
.sprig { width: .42em; height: 1.3em; margin: 0 -.12em; overflow: visible; }
.sprig path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sprig circle { fill: currentColor; }

/* ---------- Wax seal ---------- */
.seal { overflow: visible; }
.seal__wax { fill: #A9783F; }
.seal__ring { fill: none; stroke: #8A5A2C; stroke-width: 2; }
.seal__sprig { fill: none; stroke: #6E4520; stroke-width: 2.2; stroke-linecap: round; }
.seal__bud { fill: #6E4520; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 0;
  font-size: var(--t-small); font-weight: 600; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .3s var(--ease-soft);
}
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--copper); color: var(--ivory); }
.btn--ink:hover { background: var(--copper-deep); }
.btn--block { width: 100%; min-height: 56px; font-size: 1.125rem; }
.text-link { font-weight: 600; color: var(--copper-deep); }
.link { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- The pocket folder you open ---------- */
.letter { display: none; }
.js .letter {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: var(--blush);
  overflow: hidden;
  perspective: 1800px;
  transition: opacity .9s var(--ease-soft), visibility 0s linear .9s;
}
.js.no-letter .letter { display: none; }
.letter.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.letter__rose { position: absolute; pointer-events: none; display: none; }

/* on a phone the folder is the whole screen */
.folder { position: absolute; inset: 0; container-type: size; }
.folder__inside {
  position: absolute; inset: 0;
  background: #E3B3A8;
  display: grid; place-items: center;
}
.folder__card {
  position: relative;
  width: min(78cqw, calc(80cqh / var(--ratio, 1.6)));
  aspect-ratio: 1 / var(--ratio, 1.6);
  background: var(--paper);
  border-radius: 999px 999px 0 0;
  -webkit-mask: radial-gradient(circle var(--notch, 24px) at 50% 0, transparent calc(var(--notch, 24px) - 1px), #000 var(--notch, 24px)); /* taste-skill-ignore: cut-out mask */
  mask: radial-gradient(circle var(--notch, 24px) at 50% 0, transparent calc(var(--notch, 24px) - 1px), #000 var(--notch, 24px)); /* taste-skill-ignore */
  opacity: 0;
  transform: translateY(26px) scale(.95);
  transition: transform 1.5s var(--ease) .9s, opacity .6s var(--ease-soft) .75s;
}
.folder__tab { position: absolute; left: 50%; width: 64px; height: 32px; margin-left: -32px; background: #E3B3A8; transition: opacity .4s var(--ease-soft); }
/* top: the same half-moon notch as the card on the page, cut so the pocket shows through */
.folder__tab--top { display: none; }
/* bottom: the pocket's tab rising over the card's flat lower edge */
.folder__tab--bottom { bottom: -1px; border-radius: 32px 32px 0 0; }

.folder__cover {
  position: absolute; inset: 0; z-index: 2;
  margin: 0; padding: 0; border: 0; background: none;
  cursor: pointer;
  /* each half of the turn is its own simple 3D move, so every browser (iPhone Safari too)
     draws it the same way: no shared 3D scene and no reliance on hiding back faces */
  perspective: 1600px;
  perspective-origin: 50% 0;
}
.folder__face, .folder__back {
  position: absolute; inset: 0;
  transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 84%, 0 60%);
  will-change: transform;
}
/* first half: the front of the flap lifts until it is edge-on, then is gone */
.folder__face { background: #F1CFC6; overflow: hidden; transform: rotateX(0deg); transition: transform .7s cubic-bezier(.55, 0, .85, .4) .35s, visibility 0s linear 1.05s; }
/* second half: the inside of the flap, with its rose liner, carries on the turn and settles above */
.folder__back { background: url("images/liner.webp") 0 0 / 130px auto, var(--sand); transform: rotateX(90deg); visibility: hidden; transition: transform .8s cubic-bezier(.15, .6, .3, 1) 1.05s, visibility 0s linear 1.05s; }
/* the cover darkens a little as it turns away from the light */
.folder__face::after { content: ""; position: absolute; inset: 0; background: #6F4A34; opacity: 0; transition: opacity 1.1s var(--ease-soft) .45s; pointer-events: none; }
.folder__mark { position: absolute; left: 0; right: 0; top: 20%; justify-content: center; font-size: clamp(84px, 30vw, 150px); color: #A8744A; }
.folder__to { position: absolute; left: 0; right: 0; top: calc(20% + clamp(120px, 40vw, 200px)); font-size: clamp(1.8rem, 8vw, 2.4rem); color: #9A6A44; text-align: center; }
.folder__seal-wrap { position: absolute; z-index: 3; cursor: pointer; left: 50%; top: 84%; width: clamp(78px, 22vw, 104px); aspect-ratio: 1; translate: -50% -50%; }
.folder__seal-wrap::before {
  content: ""; position: absolute; inset: -10%; border-radius: 50%;
  border: 1.5px solid #B8875A; opacity: 0;
  animation: ripple 2.6s var(--ease-soft) 1s infinite;
}
@keyframes ripple { 0% { opacity: .7; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.5); } }
.folder__seal { width: 100%; height: 100%; display: block; transition: transform .45s var(--ease), opacity .35s var(--ease-soft); }
.folder__cover:hover .folder__seal { transform: scale(1.06) rotate(-4deg); }
.folder__hint { position: absolute; z-index: 3; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); font-size: var(--t-small); font-weight: 600; color: var(--copper); text-align: center; }

/* the opening, step by step */
.letter.is-opening .folder__seal-wrap::before { animation: none; }
.letter.is-opening .folder__seal { transform: scale(1.35) rotate(12deg); opacity: 0; }
.letter.is-opening .folder__hint, .letter.is-opening .folder__to { opacity: 0; transition: opacity .3s; }
.letter.is-opening .folder__seal-wrap { pointer-events: none; }
.letter.is-opening .folder__face { transform: rotateX(90deg); visibility: hidden; }
.letter.is-opening .folder__back { transform: rotateX(178deg); visibility: visible; }
.letter.is-opening .folder__face::after { opacity: .28; }
.letter.is-opening .folder__card { transform: none; opacity: 1; }
.letter.is-zooming { background-color: transparent; transition: background-color .8s var(--ease-soft), opacity .45s var(--ease-soft), visibility 0s linear .45s; }
.letter.is-zooming .folder__inside { background-color: transparent; transition: background-color .7s var(--ease-soft); }
.letter.is-zooming .folder__tab, .letter.is-zooming .folder__cover, .letter.is-zooming .letter__rose { opacity: 0; transition: opacity .45s var(--ease-soft); }
html.from-letter .card { transform: none; transition: none; }

/* on wider screens the folder sits on the table */
@media (min-width: 760px) {
  .folder { position: relative; inset: auto; width: min(460px, 60vh); aspect-ratio: 3 / 4.1; }
  .folder__mark { font-size: 120px; }
  .folder__to { top: calc(20% + 160px); }
  .folder__hint { bottom: -44px; }
  .letter__rose { display: block; }
  .letter__rose--a { left: calc(50% - min(460px, 60vh) / 2 - 230px); top: 12vh; width: 260px; rotate: -12deg; }
  .letter__rose--b { right: calc(50% - min(460px, 60vh) / 2 - 220px); bottom: 8vh; width: 250px; rotate: 10deg; }
}

/* ---------- Bar ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transition: transform .5s var(--ease); }
.top.is-hidden { transform: translateY(-100%); }
.strip {
  height: 30px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 12px;
  background: var(--copper); color: var(--ivory);
  font-size: .875rem; font-weight: 600; letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden;
}
.strip__note { font-style: italic; letter-spacing: .02em; color: var(--blush-soft); }
.strip__wide { display: none; }
.bar {
  position: relative;
  background: var(--white);
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  transition: background-color .4s var(--ease-soft);
}

.bar__mark { text-decoration: none; display: inline-flex; }
.bar__links { display: none; }
.bar__links a { position: relative; text-decoration: none; font-size: var(--t-small); font-weight: 600; padding: 8px 2px; }
.bar__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.bar__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero: the suite ---------- */
main { position: relative; z-index: 1; background: var(--blush); overflow-x: clip; }
.hero { position: relative; padding: 100px 0 96px; overflow: clip; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.suite { position: relative; display: flow-root; width: 100%; }
.piece { position: absolute; z-index: 1; display: block; text-decoration: none; color: inherit; rotate: var(--r, 0deg); transition: rotate .5s var(--ease), translate .5s var(--ease); }

/* open envelope with its liner */
.envopen { --r: -9deg; left: 4vw; top: 30px; width: 52vw; aspect-ratio: 1 / 1.02; container-type: inline-size; }
.envopen__flap { position: absolute; left: 0; right: 0; top: 0; height: 46%; background: var(--blush-deep); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.envopen__flap span { position: absolute; inset: 0; background: url("images/liner.webp") 0 0 / 120px auto, var(--sand); clip-path: polygon(8% 100%, 50% 9%, 92% 100%); }
.envopen__body { position: absolute; left: 0; right: 0; top: 46%; bottom: 0; background: #E2B2A7; }
.envopen__liner { position: absolute; left: 4%; right: 4%; top: 0; height: 70%; background: url("images/liner.webp") 0 0 / 120px auto, var(--sand); }
.envopen__front { position: absolute; inset: 0; background: #EBC4BB; clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.envopen__seal { position: absolute; left: 50%; top: 73%; width: 22cqw; height: 22cqw; translate: -50% -50%; rotate: 10deg; }
.envopen__rose { position: absolute; left: -9%; bottom: -18%; width: 62%; rotate: -14deg; }

/* polaroids */
.polaroid { background: var(--paper); padding: clamp(7px, 2vw, 12px) clamp(7px, 2vw, 12px) clamp(34px, 9vw, 54px); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: clamp(6px, 1.6vw, 12px); text-align: center; font-size: clamp(1.15rem, 4.4vw, 1.6rem); line-height: 1.2; color: var(--copper); }
.polaroid--a { --r: 6deg; right: 5vw; top: 0; width: 43vw; z-index: 2; }
/* captions on the table's polaroids scale with the print so they always fit on one line */
.suite .polaroid { container-type: inline-size; }
.suite .polaroid figcaption { font-size: min(12.5cqw, 1.7rem); white-space: nowrap; }

/* the invitation card */
.card {
  --cw: min(88vw, 520px);
  position: relative; z-index: 3;
  width: var(--cw);
  margin: calc(62vw + 16px) auto 0;
  border-radius: calc(var(--cw) / 2) calc(var(--cw) / 2) 0 0;
  padding: calc(var(--cw) * .27) calc(var(--cw) * .1) 116px calc(var(--cw) * .11);
}
/* the paper of the card, with the half-moon notch cut out of it so the table shows through */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  border-radius: inherit;
  -webkit-mask: radial-gradient(circle 32px at 50% 0, transparent 31px, #000 32px); /* taste-skill-ignore: a cut-out mask, not a visible gradient */
  mask: radial-gradient(circle 32px at 50% 0, transparent 31px, #000 32px); /* taste-skill-ignore */
}
.card__body { position: relative; z-index: 1; max-width: 30em; }
.card__rose { position: absolute; z-index: 4; left: 26vw; top: -25vw; width: 26vw; rotate: -58deg; pointer-events: none; }

.vine { position: absolute; top: 0; width: 50%; height: auto; overflow: visible; pointer-events: none; }
.vine--right { left: 50%; }
.vine--left { right: 50%; transform: scaleX(-1); }
.vine path { fill: none; stroke: currentColor; stroke-linecap: round; }
.vine .v-stem { stroke-width: 1.7; }
.vine .v-twig { stroke-width: 1.1; }
.vine .v-fill { fill: currentColor; stroke: none; }
.vine .v-shade { color: var(--emboss-shade); transform: translate(1.1px, 1.2px); }
.vine .v-lite { color: var(--emboss-lite); transform: translate(-.8px, -.8px); }
.vine .v-main { color: #F2EAE5; }

.names { font-weight: 500; font-size: calc(var(--cw) * .118); line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: calc(var(--cw) * .06); }
.names__line { display: block; }
.names__and { display: flex; align-items: center; gap: .1em; margin: .08em 0 .02em; font-size: .78em; line-height: 1; }
.names__and .script { color: var(--gold); padding-left: .1em; }
.swash { width: 4.2em; height: .6em; overflow: visible; margin-top: .2em; }
.swash path { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-linecap: round; }
.card__lead { font-size: 1.0625rem; max-width: 22em; line-height: 1.55; }
.when { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.when__day, .when__month { font-size: var(--t-small); font-weight: 600; line-height: 1.25; letter-spacing: .04em; }
.when__date { font-size: calc(var(--cw) * .15); font-weight: 400; line-height: .9; color: var(--gold); letter-spacing: -.01em; }
.when__date sup { font-size: .26em; vertical-align: top; position: relative; top: .1em; margin-left: .04em; letter-spacing: .04em; }
.when__time { margin-top: 10px; font-size: var(--t-small); font-weight: 600; color: var(--gold); }
.card__place { margin-top: 20px; font-size: var(--t-body); line-height: 1.35; }
.card__place span { display: block; }
.card__small { font-size: var(--t-small); font-style: italic; margin-bottom: 2px; }
.card__love { margin-top: 30px; font-size: 2rem; line-height: 1.2; color: var(--gold); }

/* the details tag, on a string */
.tag { --r: -9deg; position: relative; display: inline-block; vertical-align: top; z-index: 4; width: 44vw; max-width: 220px; margin: -56px 0 0 5vw; }
.tag__string { position: absolute; left: 50%; bottom: calc(100% - 26px); width: 70px; height: 60px; margin-left: -30px; overflow: visible; }
.tag__string path { fill: none; stroke: var(--copper); stroke-width: 1.4; stroke-linecap: round; }
.tag__paper {
  position: relative; display: grid; justify-items: center; gap: 2px;
  padding: 40px 14px 18px;
  background: var(--champagne);
  text-align: center;
  clip-path: polygon(22% 0, 78% 0, 100% 15%, 100% 100%, 0 100%, 0 15%);
}
.tag__hole { position: absolute; left: 50%; top: 14px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--blush-soft); border: 2px solid var(--gold-soft); }
.tag__title { font-size: 2rem; line-height: 1.1; color: var(--gold); }
.tag__sub { font-size: var(--t-small); line-height: 1.3; }

/* the little reply card */
.minicard {
  --r: 6deg; position: relative; display: inline-grid; vertical-align: top; z-index: 4;
  justify-items: center; gap: 2px;
  width: 40vw; max-width: 210px; margin: -30px 0 0 4vw;
  padding: 22px 12px 18px;
  background: var(--paper);
  border: 1.5px solid var(--gold-soft);
  outline: 1px solid var(--gold-soft); outline-offset: -8px;
  text-align: center;
}
.minicard__title { font-size: 1.9rem; line-height: 1.1; color: var(--gold); }
.minicard__sub { font-size: var(--t-small); font-weight: 600; }
.is-open .tag:hover, .is-open .minicard:hover, .is-open .polaroid--a:hover { rotate: calc(var(--r) * .4); translate: 0 -6px; }

/* more things on the table */
.pearls { overflow: visible; }
.pearls circle { fill: #F8F2EC; stroke: #E0CFC1; stroke-width: 1; }
.pearls .hi { fill: #FFFFFF; stroke: none; }
.looserose { --r: -18deg; left: 0; bottom: 30px; width: 28vw; z-index: 0; pointer-events: none; }
.polaroid--b { --r: 5deg; position: relative; display: inline-block; vertical-align: top; z-index: 4; width: 42vw; max-width: 230px; margin: 30px 0 0 6vw; }
.envmini {
  --r: -6deg; position: relative; display: inline-block; vertical-align: top; z-index: 4;
  width: 42vw; max-width: 290px; margin: 46px 0 0 3vw;
  aspect-ratio: 3 / 2;
  background: #EBC4BB;
  container-type: inline-size;
}
.envmini__stamp { position: absolute; right: 7%; top: 9%; width: 17%; background: var(--paper); padding: 1.4cqw; outline: 2px dotted var(--paper); outline-offset: 1px; rotate: 4deg; }
.envmini__stamp img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.envmini__post { position: absolute; right: 21%; top: 5%; width: 27%; overflow: visible; opacity: .5; rotate: -12deg; }
.envmini__post circle, .envmini__post path { fill: none; stroke: var(--copper); stroke-width: 1.6; }
.envmini__post text { font-family: var(--serif); font-size: 11px; font-weight: 700; letter-spacing: 1px; fill: var(--copper); }
.envmini__to { position: absolute; left: 10%; bottom: 20%; font-size: 11cqw; line-height: 1; color: var(--copper); }
.pearls--a { right: 4vw; bottom: -10px; width: 20vw; max-width: 90px; }
.pearls--b, .seal--loose, .polaroid--c, .rosetuck { display: none; }
.seal--loose { --r: 18deg; width: 56px; height: 56px; }

/* pieces tucked around the details and reply cards */
.deco { position: absolute; z-index: 2; rotate: var(--r, 0deg); transition: rotate .5s var(--ease), translate .5s var(--ease); }
.deco.polaroid { padding: 6px 6px 28px; }
.deco.polaroid figcaption { font-size: 1.05rem; bottom: 3px; }
.sheet__pol2, .sheet__pearls, .reply__pol2, .reply__pearls { display: none; }
.sheet__pol3 { --r: 6deg; right: -10px; bottom: -78px; width: 128px; }
.sheet__rose2 { --r: -16deg; left: -34px; bottom: -86px; width: 118px; pointer-events: none; }
.reply__pol1 { --r: -9deg; left: -10px; top: -96px; width: 118px; }
.reply__pol1 img { aspect-ratio: 1 / 1; }
.reply__rose2 { --r: -12deg; left: -28px; bottom: -64px; width: 104px; pointer-events: none; }


/* ---------- Paper texture on every surface ---------- */
.letter::before, .hero::before, .details::before, .reply::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("images/paper.webp") 0 0 / 512px auto;
  mix-blend-mode: multiply;
}
.letter::before { transition: opacity .5s var(--ease-soft); }
.letter.is-zooming::before { opacity: 0; }
.suite, .count > .wrap, .details > .wrap, .reply > .wrap { position: relative; z-index: 1; }

/* ---------- Torn-paper edges between sections ---------- */
.count, .details, .reply { position: relative; }
.edge {
  position: absolute; left: 0; top: -35px; width: 100%; height: 36px; z-index: 1; pointer-events: none;
  /* the torn strip carries the same paper as its section, so the join has no seam */
  background: url("images/paper.webp") 0 0 / 512px auto, var(--edge);
  background-blend-mode: multiply;
  -webkit-mask: url("images/torn.svg") 0 0 / 100% 100% no-repeat;
  mask: url("images/torn.svg") 0 0 / 100% 100% no-repeat;
}
.edge--flip { transform: scaleX(-1); }
.count > .edge, .edge--bottom { background: var(--white); }
.edge--bottom { top: auto; bottom: -1px; }

/* ---------- Countdown, on a calendar card ---------- */
.count { --edge: var(--white); background: var(--white); padding: 100px 0 180px; }
.count__table { position: relative; }
.calendar {
  position: relative; z-index: 1;
  box-sizing: border-box;
  width: min(100%, 470px); margin: 0 auto;
  background: var(--paper);
  padding: 40px 22px 34px;
  border: 1.5px solid var(--gold-soft);
  outline: 1px solid var(--gold-soft); outline-offset: -9px;
  text-align: center;
  rotate: -1.5deg;
}
.calendar__title { display: flex; justify-content: center; align-items: baseline; gap: 12px; color: var(--gold); line-height: 1; }
.calendar__title .script { font-size: 3.2rem; line-height: 1.1; }
.calendar__year { font-size: 1.25rem; font-weight: 600; letter-spacing: .08em; }
.calendar__grid { list-style: none; margin: 18px auto 0; padding: 0; max-width: 340px; display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; }
.calendar__wd { font-size: .875rem; font-weight: 700; color: var(--gold); padding-bottom: 4px; }
.calendar__day { position: relative; font-size: 1.0625rem; line-height: 2; font-variant-numeric: tabular-nums; }
.calendar__day.is-ours { font-weight: 700; color: var(--burgundy); }
.calendar__ring { position: absolute; left: 50%; top: 50%; width: 46px; height: 40px; translate: -50% -50%; overflow: visible; pointer-events: none; }
.calendar__ring path { fill: none; stroke: var(--burgundy); stroke-width: 1.8; stroke-linecap: round; }
.js .calendar__ring path { stroke-dasharray: 140; stroke-dashoffset: 140; transition: stroke-dashoffset 1.4s var(--ease-soft) .6s; }
.js .calendar.is-in .calendar__ring path { stroke-dashoffset: 0; }
.calendar__note { margin-top: 18px; font-size: 2.2rem; line-height: 1.1; color: var(--gold); }
.clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.clock__unit { background: var(--sand); padding: 10px 0 8px; }
.clock__num { display: block; font-size: 2.1rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; color: var(--copper-deep); }
.clock__num.is-tick { animation: tick .55s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-.18em); } }
.clock__label { display: block; margin-top: 4px; font-size: .875rem; font-weight: 700; }
.count__pol { --r: -8deg; left: 4px; bottom: -126px; width: 108px; z-index: 2; }
.count__pol img { aspect-ratio: 4 / 5; }
.count__rose { --r: 14deg; right: -6px; top: -70px; width: 96px; z-index: 2; pointer-events: none; }
.count__pearls { display: none; }

/* ---------- The details card ---------- */
.details { --edge: var(--blush); background: var(--blush); padding: 150px 0 150px; }
.sheet {
  position: relative;
  max-width: 1000px; margin: 0 auto;
  background: var(--paper);
  padding: 76px 22px 120px;
  border: 1.5px solid var(--gold-soft);
  outline: 1px solid var(--gold-soft); outline-offset: -10px;
  text-align: center;
}
.sheet__polaroid { --r: -8deg; position: absolute; left: -6px; top: -64px; width: 128px; rotate: var(--r); padding: 6px 6px 26px; }
.sheet__polaroid img { aspect-ratio: 4 / 3; }
.sheet__polaroid figcaption { font-size: 1.05rem; bottom: 2px; }
.sheet__rose { position: absolute; right: -18px; top: -78px; width: 132px; rotate: 12deg; pointer-events: none; }
.sheet__title { display: grid; justify-items: center; line-height: 1; color: var(--gold); }
.sheet__the { font-size: var(--t-small); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 4px; }
.sheet__title .script { font-size: clamp(3.4rem, 2.6rem + 3vw, 5rem); line-height: 1.05; }
.flourish { display: block; width: 200px; height: 18px; margin: 10px auto 0; overflow: visible; }
.flourish path { fill: none; stroke: var(--gold-soft); stroke-width: 1.2; }
.facts-grid { position: relative; display: grid; gap: 48px; margin-top: 48px; }
.item { display: grid; justify-items: center; gap: 6px; }
.icon { width: 36px; height: 36px; overflow: visible; margin-bottom: 4px; }
.icon path, .icon circle { fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.item h3 { font-size: 2.1rem; line-height: 1.1; color: var(--gold); }
.item p { font-size: 1.0625rem; line-height: 1.55; max-width: 32ch; }
.times { width: min(100%, 260px); margin-top: 2px; }
.times li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 1.0625rem; }
.times li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; margin-top: 12px; justify-content: center; }
.swatches li { display: grid; justify-items: center; gap: 6px; font-size: .875rem; line-height: 1.15; }
.swatches li::before { content: ""; width: 34px; aspect-ratio: 2 / 3; border-radius: 999px 999px 0 0; background: var(--c); transition: transform .5s var(--ease); }
.swatches li:hover::before { transform: translateY(-4px); }
.sheet__foot { margin: 48px auto 0; max-width: 46ch; font-size: 1.0625rem; font-style: italic; }

/* ---------- Kindly RSVP ---------- */
.reply { --edge: var(--rose-field); background: var(--rose-field); padding: 130px 0 170px; }
.reply__card {
  position: relative;
  max-width: 620px; margin: 0 auto;
  background: var(--paper);
  padding: 64px 22px 36px;
  border: 1.5px solid var(--gold-soft);
  outline: 1px solid var(--gold-soft); outline-offset: -10px;
}
.reply__rose { position: absolute; right: -18px; top: -86px; width: 118px; rotate: 18deg; pointer-events: none; }
.reply__title { text-align: center; line-height: 1; }
.reply__title .script { font-size: clamp(3.2rem, 2.6rem + 2.4vw, 4.4rem); color: var(--gold); line-height: 1.1; }
.rsvp { display: grid; gap: 22px; }
.rsvp__sub { text-align: center; margin-top: -10px; font-size: 1.0625rem; }
.rsvp__sub .script { font-size: 1.6rem; color: var(--gold); }
.field { display: grid; gap: 6px; }
.field > span, .choice legend { font-size: var(--t-small); font-weight: 600; }
.field em { font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 10px 14px;
  border: 0; border-radius: 0;
  background: var(--sand);
  font-size: 1.125rem;
  transition: background-color .3s var(--ease-soft);
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--blush-soft); outline: 2px solid var(--gold); outline-offset: 0; }
.field input::placeholder, .field textarea::placeholder { color: #957666; }
.field select { appearance: none; }
.field--count { position: relative; }
.field--count::after { content: ""; position: absolute; right: 18px; bottom: 22px; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.field--count.is-off { opacity: .4; pointer-events: none; }
.choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 6px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 54px; padding: 6px 10px; background: var(--sand); font-size: var(--t-small); font-weight: 600; line-height: 1.2; transition: background-color .3s var(--ease-soft), transform .25s var(--ease); }
.choice label:active span { transform: scale(.97); }
.choice input:checked + span { background: var(--blush-mid); color: var(--copper-deep); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp__error { min-height: 1.4em; margin-top: -10px; font-size: var(--t-small); color: var(--burgundy); text-align: center; font-weight: 600; }
.sealed { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0 12px; }
.sealed h2 { font-size: 3rem; line-height: 1.1; color: var(--gold); }
.sealed h2:focus { outline: none; }
.sealed p { max-width: 24em; }
.seal--stamp { width: 108px; height: 108px; }
.sealed:not([hidden]) .seal--stamp { animation: stamp .8s var(--ease) both; }
.sealed:not([hidden]) > :not(.seal) { animation: rise .7s var(--ease) .35s both; }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.8) rotate(-24deg); } 60% { opacity: 1; transform: scale(.94) rotate(4deg); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.reply__after { margin-top: 36px; text-align: center; font-size: 1.125rem; font-weight: 600; }

/* ---------- With love: the last page (revealed like a curtain) ---------- */
.love {
  position: sticky; bottom: 0; z-index: 0;
  overflow: hidden;
  background: var(--white);
  color: var(--copper);
  text-align: center;
  padding: 64px 20px 0;
}
.love.no-curtain { position: relative; }
.love__inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.crest { position: relative; width: 150px; height: 190px; margin: 0 auto; }
.crest__rose { position: absolute; bottom: -34px; pointer-events: none; }
.crest__rose--a { left: -78px; width: 140px; rotate: -46deg; }
.crest__rose--b { right: -74px; width: 128px; rotate: 48deg; }
.crest__oval { position: absolute; inset: 0; display: grid; place-items: center; }
.crest__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.crest__frame ellipse { fill: none; stroke: var(--gold-soft); stroke-width: 1.3; }
.crest__frame ellipse:first-child { fill: var(--white); }
.crest .monogram { position: relative; font-size: 52px; margin-top: -16px; }
.crest__date { position: absolute; bottom: 40px; font-size: .875rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.love__title { margin-top: 46px; font-size: 2.1rem; line-height: 1.1; color: var(--gold); }
.love__names { font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.6rem); line-height: 1.15; color: var(--gold); white-space: nowrap; }
.love .flourish { margin-top: 6px; }
.love__msg { margin: 18px auto 0; max-width: 36ch; }
.love__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.btn--line { background: transparent; color: var(--copper); border: 1.5px solid var(--gold-soft); }
.btn--line:hover { background: var(--blush-soft); }
.love__base {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 56px -20px 0; padding: 16px 20px 18px;
  background: var(--copper); color: var(--blush-soft);
  font-size: .875rem;
}
.love__pol { position: absolute; display: none; z-index: 0; }
.love__pol--a img { aspect-ratio: 4 / 3; }

/* ---------- Entrances ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1.2s var(--ease) var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* the suite settles onto the table after the envelope opens */
.js .card { transform: translate3d(0, 70px, 0); opacity: 0; transition: transform 1.4s var(--ease), opacity 1s var(--ease-soft); }
.js .is-open .card { transform: none; opacity: 1; }
.js .piece, .js .card__rose { opacity: 0; translate: 0 -34px; scale: 1.06; transition: opacity .9s var(--ease-soft) var(--pd, 1s), translate 1.2s var(--ease) var(--pd, 1s), scale 1.2s var(--ease) var(--pd, 1s), rotate .5s var(--ease); }
.js .envopen { --pd: .55s; }
.js .polaroid--a { --pd: .8s; }
.js .card__rose { --pd: 1.3s; }
.js .tag { --pd: 1.5s; }
.js .minicard { --pd: 1.7s; }
.js .looserose { --pd: 1.6s; }
.js .polaroid--b { --pd: 1.85s; }
.js .envmini { --pd: 2s; }
.js .pearls--a { --pd: 2.1s; }
.js .pearls--b { --pd: 2.2s; }
.js .polaroid--c { --pd: .7s; }
.js .rosetuck { --pd: 1.75s; }
.js .seal--loose { --pd: 2.3s; }
.js .deco { opacity: 0; translate: 0 -26px; scale: 1.05; transition: opacity .9s var(--ease-soft) var(--pd, .2s), translate 1.2s var(--ease) var(--pd, .2s), scale 1.2s var(--ease) var(--pd, .2s), rotate .5s var(--ease); }
.js .deco.is-in { opacity: 1; translate: 0 0; scale: 1; }
.js .deco.is-in:hover { transition-delay: 0s; }
.js .is-open .piece, .js .is-open .card__rose { opacity: 1; translate: 0 0; scale: 1; }
.js .is-open .piece:hover { transition-delay: 0s; }
.js .polaroid img { filter: sepia(.9) brightness(1.55) contrast(.65); transition: filter 2.4s var(--ease-soft) calc(var(--pd, 0s) + .4s); }
.js .is-open .suite .polaroid img, .js .polaroid.developed img { filter: none; }
.js .card .names__line .ch { opacity: 0; transform: translateY(.35em); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: calc(.35s + var(--n) * 55ms); }
.js .is-open .card .names__line .ch { opacity: 1; transform: none; }
.js .names__line + .names__and + .names__line .ch { transition-delay: calc(.75s + var(--n) * 55ms); }
.js .card .names__and .script { opacity: 0; transition: opacity 1s var(--ease-soft) .7s; }
.js .is-open .card .names__and .script { opacity: 1; }
.js .card .swash path { stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 1.6s var(--ease-soft) .9s; }
.js .is-open .card .swash path { stroke-dashoffset: 0; }
.js .card__lead, .js .when, .js .when__time, .js .card__place, .js .card__love { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .is-open .card__lead { opacity: 1; transform: none; transition-delay: 1s; }
.js .is-open .when { opacity: 1; transform: none; transition-delay: 1.1s; }
.js .is-open .when__time { opacity: 1; transform: none; transition-delay: 1.2s; }
.js .is-open .card__place { opacity: 1; transform: none; transition-delay: 1.3s; }
.js .is-open .card__love { opacity: 1; transform: none; transition-delay: 1.45s; }
.js .vine .v-stem { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); transition: stroke-dashoffset 2.6s var(--ease-soft) .6s; }
.js .vine .v-twig { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1s var(--ease-soft); transition-delay: var(--td, 1s); }
.js .vine .v-fill { transform-box: fill-box; transform-origin: center; transform: scale(.3); opacity: 0; transition: transform .7s var(--ease), opacity .5s var(--ease-soft); transition-delay: var(--td, 1.2s); }
.js .is-open .vine .v-stem, .js .is-open .vine .v-twig { stroke-dashoffset: 0; }
.js .is-open .vine .v-fill { transform: none; opacity: 1; }
/* icons draw themselves as the details appear */
.js .item .icon path, .js .item .icon circle { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.6s var(--ease-soft) calc(var(--d, 0ms) + .2s); }
.js .item.is-in .icon path, .js .item.is-in .icon circle { stroke-dashoffset: 0; }

/* ---------- Tablet ---------- */
@media (min-width: 760px) {
  :root { --bar-h: 76px; }
  .bar__links { display: flex; gap: 28px; position: absolute; left: 50%; transform: translateX(-50%); }
  .hero { padding-top: 126px; }
  .strip__wide { display: inline; }
  .envopen { left: -4vw; width: 38vw; top: 10px; }
  .polaroid--a { right: -1vw; width: 27vw; }
  .card { --cw: min(64vw, 540px); margin-top: 34vw; padding-bottom: 130px; }
  .card__rose { left: auto; right: -9vw; top: 10vw; width: 22vw; rotate: 14deg; }
  .suite { text-align: center; }
  .card, .suite > .tag, .suite > .minicard { text-align: left; }
  .tag, .minicard { text-align: center; margin-top: -64px; }
  .tag__paper, .minicard { text-align: center; }
  .sheet { padding: 88px 56px 110px; }
  .facts-grid { grid-template-columns: 1fr 1fr; column-gap: 80px; row-gap: 56px; }
  .facts-grid::before { content: ""; position: absolute; left: 50%; top: 8px; bottom: 8px; width: 1px; background: var(--gold-soft); opacity: .6; }
  .sheet__polaroid { left: -40px; top: -80px; width: 200px; padding: 8px 8px 34px; }
  .sheet__polaroid figcaption { font-size: 1.4rem; bottom: 4px; }
  .sheet__rose { right: -60px; top: -110px; width: 220px; }
  .reply__card { padding: 72px 56px 44px; }
  .reply__rose { right: -70px; top: -110px; width: 190px; }
  .love { padding-top: 110px; }
}

/* ---------- Desktop: everything on one table ---------- */
@media (min-width: 1100px) {
  .hero { padding: 152px 0 76px; }
  .suite { --scw: clamp(320px, min(31vw, calc((100svh - 236px) / 1.62)), 560px); }
  .card { --cw: var(--scw); margin-top: 0; padding-top: calc(var(--cw) * .26); padding-bottom: calc(var(--cw) * .1); }
  .names { margin-bottom: calc(var(--cw) * .05); }
  .card__lead { font-size: max(15px, calc(var(--cw) * .035)); }
  .when { margin-top: calc(var(--cw) * .05); }
  .when__day, .when__month, .when__time, .card__small { font-size: max(14px, calc(var(--cw) * .031)); }
  .card__place { margin-top: calc(var(--cw) * .036); font-size: max(16px, calc(var(--cw) * .039)); }
  .card__love { margin-top: calc(var(--cw) * .045); font-size: calc(var(--cw) * .062); }
  .card__rose { left: auto; right: calc(var(--cw) * -.22); top: 7%; width: calc(var(--cw) * .42); rotate: 14deg; }
  .count { align-items: center; padding: 140px 0; }

  /* each keepsake has its own place; the only overlaps are deliberate tucks */
  .envopen { --r: -8deg; left: calc(50% - var(--scw) * 1.42); top: 0%; width: calc(var(--scw) * .7); }
  .pearls--a { left: calc(50% - var(--scw) * .72); right: auto; top: 44%; bottom: auto; width: calc(var(--scw) * .13); }
  .tag { --r: -9deg; position: absolute; left: calc(50% - var(--scw) * 1.46); top: 53%; margin: 0; width: max(176px, calc(var(--scw) * .38)); max-width: none; }
  .polaroid--b { --r: 5deg; position: absolute; left: calc(50% - var(--scw) * 1.0); top: 63%; margin: 0; width: calc(var(--scw) * .4); max-width: none; }
  .looserose { --r: -14deg; left: calc(50% - var(--scw) * 1.56); top: 75%; bottom: auto; width: calc(var(--scw) * .27); }
  .polaroid--a { --r: 5deg; left: calc(50% + var(--scw) * .58); right: auto; top: -3%; width: calc(var(--scw) * .5); }
  .polaroid--c { display: block; --r: -7deg; left: calc(50% + var(--scw) * 1.08); top: 19%; width: calc(var(--scw) * .36); z-index: 0; }
  .minicard { --r: -4deg; position: absolute; left: calc(50% + var(--scw) * .62); top: 55%; margin: 0; width: max(196px, calc(var(--scw) * .44)); max-width: none; padding: 26px 14px 22px; }
  .rosetuck { display: block; --r: 22deg; left: calc(50% + var(--scw) * 1.14); top: 59%; width: calc(var(--scw) * .24); z-index: 1; pointer-events: none; }
  .envmini { --r: 4deg; position: absolute; left: calc(50% + var(--scw) * .66); top: 79%; margin: 0; width: calc(var(--scw) * .5); max-width: none; }
  .pearls--b { display: block; left: calc(50% + var(--scw) * 1.22); right: auto; top: 86%; width: calc(var(--scw) * .11); }

  .count { padding: 80px 0 100px; }
  .count__pol { left: calc(50% - 470px); top: 30px; bottom: auto; width: 200px; padding: 10px 10px 44px; }
  .count__pol figcaption { font-size: 1.4rem; bottom: 6px; }
  .count__rose { right: calc(50% - 450px); top: auto; bottom: -20px; width: 190px; }
  .count__pearls { display: block; right: calc(50% - 360px); top: 40px; width: 80px; }
  .love__pol { display: block; padding: 10px 10px 44px; }
  .love__pol figcaption { font-size: 1.4rem; bottom: 6px; }
  .love__pol--a { --r: -7deg; left: max(4vw, calc(50% - 640px)); top: 110px; width: 250px; rotate: var(--r); }
  .love__pol--b { --r: 6deg; right: max(5vw, calc(50% - 600px)); top: 170px; width: 200px; rotate: var(--r); }
  .love__base { flex-direction: row; justify-content: space-between; padding: 16px max(32px, calc(50% - 640px)); }
  .reply__pol1 { left: -240px; top: 30px; width: 210px; padding: 10px 10px 44px; }
  .reply__pol2 { display: block; --r: 7deg; right: -230px; top: 44%; width: 200px; padding: 10px 10px 44px; }
  .reply__rose2 { left: -190px; bottom: -40px; width: 200px; }
  .reply__pearls { display: block; right: -130px; top: 14%; width: 90px; }
  .reply__pol1 figcaption, .reply__pol2 figcaption { font-size: 1.4rem; bottom: 6px; }
}

/* ---------- Wide screens: room beside the details card ---------- */
@media (min-width: 1360px) {
  .sheet__pol2 { display: block; --r: -7deg; left: -205px; top: 30%; width: 200px; padding: 10px 10px 44px; }
  .sheet__pol3 { right: -205px; top: 56%; bottom: auto; width: 200px; padding: 10px 10px 44px; }
  .sheet__pol2 figcaption, .sheet__pol3 figcaption { font-size: 1.4rem; bottom: 6px; }
  .sheet__rose2 { left: -170px; bottom: -90px; width: 210px; }
  .sheet__pearls { display: block; right: -120px; top: 16%; width: 90px; }
  .sheet { padding-bottom: 60px; }
}


/* ---------- Phones: a calmer layout of its own ---------- */
@media (max-width: 759px) {
  /* the extra grain layer is costly on phones; the paper texture is enough */
  body::after { display: none; }

  /* the folder is an object on the table, as on desktop, with its seal near the middle */
  .folder { position: relative; inset: auto; width: min(80vw, calc(62svh * .73)); aspect-ratio: 3 / 4.1; margin-top: -4svh; }
  .folder__mark { top: 16%; font-size: 26cqw; }
  .folder__to { top: 47%; font-size: 8.5cqw; }
  .folder__seal-wrap { width: 22cqw; }
  .folder__hint { bottom: -44px; }
  .letter__rose { display: block; }
  .letter__rose--a { left: 2vw; top: 4svh; width: 34vw; rotate: -12deg; }
  .letter__rose--b { right: 2vw; bottom: 3svh; width: 34vw; rotate: 10deg; }

  /* the hero is the card alone, whole on the first screen */
  .hero { padding: 128px 0 76px; justify-content: flex-start; }
  .suite {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "card card" "tag mini" "pol env";
    column-gap: 3vw; row-gap: 22px;
    padding: 0 5vw;
    align-items: start;
  }
  .envopen, .polaroid--b, .polaroid--c, .rosetuck, .looserose, .pearls--a, .pearls--b, .seal--loose { display: none; }
  .card {
    grid-area: card;
    --cw: min(90vw, 440px);
    margin: 0 auto;
    padding: calc(var(--cw) * .26) calc(var(--cw) * .1) calc(var(--cw) * .11) calc(var(--cw) * .11);
  }
  .names { margin-bottom: calc(var(--cw) * .05); }
  .card__lead { font-size: 15px; }
  .when { margin-top: calc(var(--cw) * .05); }
  .when__day, .when__month, .when__time, .card__small { font-size: 14px; }
  .card__place { margin-top: calc(var(--cw) * .036); font-size: 16px; }
  .card__love { margin-top: calc(var(--cw) * .045); font-size: calc(var(--cw) * .07); }
  .card__rose { left: auto; right: -5vw; top: 9%; width: 25vw; rotate: 14deg; }

  /* a tidy two-by-two of keepsakes under the card */
  .tag { grid-area: tag; justify-self: center; width: 100%; max-width: 190px; margin: -30px 0 0; }
  .minicard { grid-area: mini; justify-self: center; width: 100%; max-width: 190px; margin: -14px 0 0; }
  .polaroid--a { grid-area: pol; position: relative; right: auto; top: auto; justify-self: center; width: 92%; max-width: 200px; margin-top: 8px; }
  .envmini { grid-area: env; justify-self: center; width: 100%; max-width: 230px; margin: 48px 0 0; }
  .js .tag { --pd: 1.3s; }
  .js .minicard { --pd: 1.45s; }
  .js .polaroid--a { --pd: 1.6s; }
  .js .envmini { --pd: 1.75s; }
}


/* ---------- Enlarged print viewer ---------- */
.polaroid { cursor: zoom-in; }
.polaroid:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.viewer { position: fixed; inset: 0; z-index: 95; }
.viewer[hidden] { display: none; }
.viewer__backdrop {
  position: absolute; inset: 0;
  background: rgba(58, 36, 26, .8);
  opacity: 0; transition: opacity .45s var(--ease-soft);
  cursor: zoom-out;
}
.viewer.is-shown .viewer__backdrop { opacity: 1; }
.viewer__print {
  --pw: 400px;
  position: fixed; margin: 0;
  width: var(--pw);
  background: var(--paper);
  padding: calc(var(--pw) * .04) calc(var(--pw) * .04) calc(var(--pw) * .15);
  transform-origin: 50% 50%;
  will-change: transform;
}
.viewer__print img { display: block; width: 100%; aspect-ratio: var(--ir, .8); object-fit: cover; }
.viewer__print figcaption {
  position: absolute; left: 0; right: 0; bottom: calc(var(--pw) * .035);
  text-align: center; white-space: nowrap;
  font-size: calc(var(--pw) * .07); line-height: 1.2; color: var(--copper);
}
.viewer__btn {
  position: fixed; z-index: 2;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--copper);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; transition: opacity .35s var(--ease-soft) .15s, transform .25s var(--ease), background-color .3s var(--ease-soft);
}
.viewer.is-shown .viewer__btn { opacity: 1; }
.viewer__btn:hover { background: var(--blush-soft); }
.viewer__btn:active { transform: scale(.94); }
.viewer__close { top: 18px; right: 18px; }
.viewer__close span, .viewer__close span::after { position: absolute; width: 18px; height: 1.8px; background: currentColor; transform: rotate(45deg); }
.viewer__close span::after { content: ""; left: 0; top: 0; transform: rotate(90deg); }
.viewer__nav { top: 50%; margin-top: -24px; }
.viewer__nav--prev { left: 20px; }
.viewer__nav--next { right: 20px; }
.viewer__nav span { width: 11px; height: 11px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; }
.viewer__nav--prev span { transform: translateX(2px) rotate(-135deg); }
.viewer__nav--next span { transform: translateX(-2px) rotate(45deg); }
@media (max-width: 759px) {
  .viewer__nav { top: auto; bottom: max(22px, env(safe-area-inset-bottom)); margin-top: 0; }
  .viewer__nav--prev { left: calc(50% - 60px); }
  .viewer__nav--next { right: calc(50% - 60px); }
}

/* ---------- One hover for every print: it lifts and straightens a little ---------- */
.polaroid { transition: rotate .5s var(--ease), translate .5s var(--ease); }
.js .is-open .polaroid:hover { rotate: calc(var(--r, 0deg) * .4); translate: 0 -6px; transition-delay: 0s; }


/* ---------- Our song ---------- */
.music {
  position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 14px;
  border: 1.5px solid var(--gold-soft); border-radius: 999px;
  background: var(--white); color: var(--copper);
  font-size: var(--t-small); font-weight: 600;
  cursor: pointer;
  transition: background-color .3s var(--ease-soft), transform .25s var(--ease), opacity .6s var(--ease-soft);
}
.music[hidden] { display: none; }
.music:hover { background: var(--blush-soft); }
.music:active { transform: scale(.96); }
.music__bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.music__bars i { display: block; width: 3px; height: 4px; background: currentColor; border-radius: 2px; }
.music.is-playing .music__bars i { animation: bar 1.1s var(--ease-soft) infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: .25s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: .5s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.letter-open .music { opacity: 0; pointer-events: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
