:root {
  --cream: #fff8f3;
  --paper: #fffaf5;
  --blush: #f7e1e6;
  --pink: #efc3cf;
  --rose: #c77d91;
  --rose-deep: #a24c66;
  --wine: #6f2c43;
  --gold: #b8935a;
  --gold-soft: #e3cfa6;
  --lav: #e9def7;
  --text: #4a2f3a;
  --muted: #86677a;

  --f-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-script: "Great Vibes", "Brush Script MT", cursive;
  --f-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow: 0 18px 50px rgba(150, 80, 105, 0.16);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* { box-sizing: border-box; font-variant-numeric: lining-nums; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-weight: 300;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(120% 60% at 10% 0%, #fde9ee 0%, transparent 60%),
    radial-gradient(90% 50% at 100% 20%, #efe4fb 0%, transparent 60%),
    radial-gradient(100% 60% at 50% 100%, #fbe6dc 0%, transparent 65%),
    var(--cream);
  background-attachment: fixed;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#petals, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#petals { z-index: 0; }
#fx { z-index: 60; }

/* ---------------------------------- buttons --------------------------------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  padding: 0.85em 2.1em;
  border-radius: 999px;
  font-family: var(--f-body); font-weight: 400; letter-spacing: 0.08em; font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(135deg, #c9768d, #a24c66);
  box-shadow: 0 10px 24px rgba(162, 76, 102, 0.3), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(162, 76, 102, 0.36); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.big { font-size: 1.05rem; padding: 1em 2.6em; }
.link-btn {
  background: none; border: 0; cursor: pointer; padding: .6em 1em;
  color: var(--rose-deep); font-size: .9rem; letter-spacing: .04em;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(162,76,102,.35);
}

.ornament { width: 170px; height: 22px; color: var(--gold); display: block; margin: 0 auto; }

/* =================================== GATE =================================== */
.gate {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: 24px 16px;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.gate.leave { opacity: 0; transform: scale(1.06); pointer-events: none; }
.gate-inner { text-align: center; transition: opacity .8s var(--ease), transform .9s var(--ease); }
.gate-inner.away { opacity: 0; transform: translateY(70px); pointer-events: none; }
.gate-kicker { margin: 0; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.gate-to { margin: .1em 0 0; font-family: var(--f-script); font-weight: 400; font-size: clamp(2.3rem, 10vw, 3.4rem); line-height: 1.2; color: var(--rose-deep); }
.gate-hint { margin: 0; font-size: .85rem; color: var(--muted); letter-spacing: .05em; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* --------------------------------- envelope --------------------------------- */
.envelope {
  position: relative;
  width: min(320px, 82vw);
  aspect-ratio: 3 / 2;
  margin: 34px auto 22px;
  cursor: pointer;
  perspective: 1200px;
  filter: drop-shadow(0 22px 30px rgba(150, 80, 105, .22));
  animation: floaty 5s ease-in-out infinite;
}
.envelope.open { animation: none; cursor: default; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-.6deg); } }
.env-back { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, #e6a9b9, #d9909f); }
.env-card {
  position: absolute; left: 6%; right: 6%; top: 6%; height: 88%;
  z-index: 2;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--gold-soft);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--gold-soft);
  display: flex; flex-direction: column; align-items: center; padding-top: 9%;
  transition: transform 1s var(--ease) .45s;
}
.env-card span { font-family: var(--f-display); font-style: italic; color: var(--muted); font-size: 1rem; }
.env-card b { font-family: var(--f-script); font-weight: 400; color: var(--rose-deep); font-size: 2rem; line-height: 1.1; }
.env-pocket {
  position: absolute; inset: 0; z-index: 3; border-radius: 10px;
  background: linear-gradient(180deg, #f3c4cf, #eab2c0);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-pocket::before, .env-pocket::after { content: ""; position: absolute; inset: 0; }
.env-pocket::before { background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); clip-path: polygon(0 0, 50% 54%, 0 100%); }
.env-pocket::after { background: linear-gradient(270deg, rgba(120,40,70,.08), transparent); clip-path: polygon(100% 0, 50% 54%, 100% 100%); }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%;
  z-index: 4;
  transform-origin: top center;
  background: linear-gradient(180deg, #f0b9c7, #e3a0b1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
  transition: transform .7s var(--ease), z-index 0s .32s;
}
.env-seal {
  position: absolute; left: 50%; top: 60%; z-index: 5;
  width: 66px; height: 66px; transform: translate(-50%, -55%);
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #c45a77, #8d2f4a 70%);
  box-shadow: 0 4px 10px rgba(110, 30, 55, .35), inset 0 -3px 6px rgba(0,0,0,.2), inset 0 2px 4px rgba(255,255,255,.25);
  transition: opacity .4s, transform .5s var(--ease);
}
.env-seal::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed rgba(255, 220, 230, .55); }
.env-seal span { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; color: #ffe6ec; letter-spacing: .03em; }
.envelope:not(.open):hover .env-seal { transform: translate(-50%, -55%) scale(1.07); }
.envelope.open .env-seal { opacity: 0; transform: translate(-50%, -55%) scale(.5); }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.envelope.open .env-card { transform: translateY(-62%); }

.envelope.small { width: min(280px, 78vw); margin-top: 18px; }
.envelope.small .env-card b { font-size: 1.8rem; }
.envelope.small .env-seal span { font-size: 1.4rem; }

/* ---------------------------------- invite ---------------------------------- */
.invite { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.invite.show { visibility: visible; }
.invite-card {
  position: relative;
  width: 100%; max-width: 390px;
  padding: 34px 20px 28px;
  text-align: center;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow), inset 0 0 0 8px var(--paper), inset 0 0 0 9px var(--gold-soft);
  transform-origin: center;
  transition: transform .95s var(--ease);
}
.invite-card::before, .invite-card::after {
  content: ""; position: absolute; width: 46px; height: 46px; border: 1px solid var(--gold);
  opacity: .55; pointer-events: none;
}
.invite-card::before { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.invite-card::after { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.inv-content { opacity: 0; transition: opacity .7s ease .1s; }
.invite-card.ready .inv-content { opacity: 1; }
.inv-small { margin: 12px 0 0; font-family: var(--f-display); font-style: italic; font-size: 1.05rem; color: var(--muted); }
.inv-names { margin: .15em 0; font-family: var(--f-script); font-weight: 400; color: var(--rose-deep); font-size: clamp(1.9rem, 8.6vw, 2.5rem); line-height: 1.15; }
.inv-names span { display: block; }
.inv-names em { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--gold); font-style: italic; margin: .1em 0; }
.inv-divider { width: 60px; height: 1px; margin: 14px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.inv-q { margin: 0 0 16px; font-size: .9rem; color: var(--muted); line-height: 1.6; }

.pin { position: relative; display: block; width: max-content; max-width: 100%; margin: 0 auto; cursor: text; }
.pin input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent; background: transparent; cursor: text;
}
.pin-boxes { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pin-boxes .grp { display: flex; gap: 4px; }
.pin-boxes i { font-style: normal; color: var(--gold); font-family: var(--f-display); font-size: 1.2rem; }
.box {
  width: clamp(26px, 7.6vw, 34px); height: clamp(36px, 10vw, 44px);
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid #ead2d9;
  background: #fff;
  font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; color: var(--wine);
  transition: border-color .2s, box-shadow .2s, transform .2s, background .3s;
}
.box.filled { border-color: var(--rose); transform: translateY(-2px); }
.box.active { border-color: var(--rose-deep); box-shadow: 0 0 0 3px rgba(199, 125, 145, .2); }
.box.active::after { content: ""; width: 1.5px; height: 50%; background: var(--rose-deep); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pin.shake { animation: shake .5s; }
@keyframes shake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } }
.pin-msg { min-height: 1.6em; margin: 12px 0 14px; font-size: .85rem; color: var(--muted); }
.pin-msg.err { color: var(--rose-deep); }
.invite-card.success .box { background: linear-gradient(160deg, #fff4e0, #f2dcb3); border-color: var(--gold); color: #7a5520; }
.invite-card.success .pin-msg { color: var(--gold); font-family: var(--f-display); font-size: 1.3rem; font-style: italic; }

/* ================================== MAIN ==================================== */
main { position: relative; z-index: 1; opacity: 0; transition: opacity 1.2s ease .2s; }
main.show { opacity: 1; }
.section { position: relative; max-width: 860px; margin: 0 auto; padding: 88px 16px; text-align: center; }
.kicker { margin: 0 0 6px; font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.h2 { margin: 0 0 34px; font-family: var(--f-display); font-weight: 500; font-style: italic; font-size: clamp(2rem, 7vw, 2.9rem); line-height: 1.15; color: var(--wine); }
.h3 { font-family: var(--f-display); font-weight: 500; font-style: italic; font-size: 1.5rem; color: var(--wine); margin: 34px 0 12px; }

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

/* hero */
.hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding-top: 60px; }
.hero-title { margin: 8px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.3rem, 9vw, 4.2rem); line-height: 1.05; color: var(--wine); }
.hero-title em { font-weight: 500; }
.hero-names { margin: 12px 0 0; font-family: var(--f-script); font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 1.2; color: var(--rose-deep); }
.amp { font-family: var(--f-display); font-style: italic; font-size: .55em; color: var(--gold); vertical-align: middle; }
.hero-text { max-width: 520px; margin: 18px auto 0; font-size: 1.02rem; color: var(--muted); }
.scroll-cue { display: inline-block; margin-top: 44px; width: 26px; height: 42px; border: 1.5px solid var(--rose); border-radius: 14px; position: relative; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--rose); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* counter */
.counter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 620px; margin: 0 auto; }
.counter div {
  padding: 16px 4px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(234, 205, 214, .9);
  box-shadow: 0 8px 26px rgba(150, 80, 105, .08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.counter b { display: block; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 7vw, 2.6rem); line-height: 1; color: var(--wine); font-variant-numeric: tabular-nums; }
.counter span { display: block; margin-top: 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.counter-total { margin: 22px auto 0; max-width: 480px; font-family: var(--f-display); font-style: italic; font-size: 1.2rem; color: var(--muted); }
.counter-total b { color: var(--rose-deep); font-weight: 600; }

/* timeline */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 600px; text-align: left; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--pink), var(--gold-soft), var(--pink)); }
.tl-item { position: relative; padding: 0 0 34px 46px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 4px; top: 6px; width: 19px; height: 19px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--rose); display: grid; place-items: center; }
.tl-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.tl-item.special .tl-dot { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(227, 207, 166, .35); }
.tl-item.special .tl-dot::after { background: var(--gold); }
.tl-date { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.tl-title { margin: 2px 0 6px; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; color: var(--wine); }
.tl-body { margin: 0; color: var(--text); }
.tl-card { padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.6); border: 1px solid rgba(234,205,214,.8); }
.tl-item.special .tl-card { background: linear-gradient(160deg, rgba(255,247,232,.9), rgba(255,255,255,.7)); border-color: var(--gold-soft); }

/* gallery */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; max-width: 760px; margin: 0 auto; }
.gallery .polaroid { width: calc(50% - 7px); }
.gallery .polaroid img, .gallery .ph { aspect-ratio: 4 / 5; object-position: center 30%; }
.baby-photos { display: flex; justify-content: center; gap: 14px; margin: 6px auto 26px; max-width: 520px; }
.baby-photos .polaroid { width: calc(50% - 7px); padding: 8px 8px 0; }
.baby-photos .polaroid img, .baby-photos .ph { aspect-ratio: auto; height: auto; }
.baby-photos .polaroid figcaption { font-size: 1.2rem; }
.polaroid {
  margin: 0; padding: 10px 10px 0; background: #fff; border-radius: 4px;
  box-shadow: 0 10px 26px rgba(120, 60, 80, .15);
  transform: rotate(var(--r, 0deg));
  transition: transform .4s var(--ease), box-shadow .4s;
}
.polaroid:hover { transform: rotate(0) translateY(-4px) scale(1.02); box-shadow: 0 16px 34px rgba(120, 60, 80, .2); }
.polaroid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.polaroid img, .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.ph {
  display: grid; place-items: center; align-content: center; gap: 4px;
  background: repeating-linear-gradient(45deg, #fbf0f2 0 10px, #f7e6ea 10px 20px);
  color: var(--rose); font-size: .72rem; padding: 8px; text-align: center; line-height: 1.4;
}
.ph svg { width: 28px; height: 28px; opacity: .7; }
.polaroid figcaption { padding: 8px 4px 12px; font-family: var(--f-script); font-size: 1.35rem; line-height: 1.15; color: var(--wine); text-align: center; }

/* letter */
.letter-stage { max-width: 640px; margin: 0 auto; }
.letter-stage .envelope { transition: opacity .7s, transform .7s var(--ease), margin .7s, height .7s; }
.letter-stage .envelope.gone { opacity: 0; transform: translateY(30px) scale(.9); pointer-events: none; }
.paper {
  position: relative; text-align: left;
  padding: 38px 24px 26px;
  background:
    linear-gradient(transparent 31px, rgba(199, 125, 145, .12) 32px) 0 22px / 100% 32px,
    var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow);
  animation: unfold 1s var(--ease) both;
}
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 6px 6px 0 0; background: linear-gradient(90deg, var(--pink), var(--gold-soft), var(--pink)); }
@keyframes unfold { from { opacity: 0; transform: translateY(30px) scaleY(.85); } }
.paper-text { white-space: pre-wrap; font-family: var(--f-display); font-size: 1.22rem; line-height: 32px; color: #4a2a35; min-height: 200px; }
.paper-text.typing::after { content: "|"; color: var(--rose); animation: blink 1s steps(1) infinite; margin-left: 1px; }
.paper .link-btn { display: block; margin: 12px auto 0; }

/* baby */
.baby-card {
  max-width: 660px; margin: 0 auto; padding: 44px 22px 36px;
  border-radius: 28px;
  background: linear-gradient(170deg, rgba(240, 232, 252, .85), rgba(255, 246, 240, .85));
  border: 1px solid rgba(220, 205, 240, .9);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.moon { width: 92px; height: 92px; margin: 0 auto 8px; display: block; animation: floaty 6s ease-in-out infinite; }
.baby-card .h2 { margin-bottom: 10px; }
.baby-days { margin: 0 0 18px; font-size: .95rem; color: var(--muted); }
.baby-days b { font-family: var(--f-display); font-size: 1.8rem; font-weight: 600; color: var(--rose-deep); vertical-align: -2px; }
.baby-text { margin: 0 auto; max-width: 520px; font-size: 1.02rem; }
.promises { list-style: none; padding: 0; margin: 0 auto; max-width: 480px; text-align: left; }
.promises li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px dashed rgba(199, 125, 145, .25); }
.promises li:last-child { border-bottom: 0; }
.promises li::before { content: "♡"; position: absolute; left: 4px; top: 9px; color: var(--rose); font-size: 1.05rem; }

/* reasons */
.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 760px; margin: 0 auto 18px; }
.reason { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; aspect-ratio: 4 / 5; min-height: 170px; }
.r-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.reason.flipped .r-inner { transform: rotateY(180deg); }
.r-front, .r-back {
  position: absolute; inset: 0; border-radius: 18px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px;
}
.r-front {
  background: linear-gradient(160deg, #f3c6d1, #e7a7b8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(162, 76, 102, .2), inset 0 0 0 6px rgba(255,255,255,.12), inset 0 0 0 7px rgba(255,255,255,.35);
}
.r-front small { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; opacity: .9; }
.r-front b { font-family: var(--f-display); font-weight: 500; font-size: 2.8rem; line-height: 1.1; }
.r-front i { font-style: normal; font-size: 1rem; opacity: .85; }
.r-back {
  transform: rotateY(180deg);
  background: var(--paper);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 10px 24px rgba(150, 80, 105, .12);
  font-family: var(--f-display); font-size: 1.12rem; line-height: 1.35; color: var(--wine); font-style: italic;
}

/* finale */
.finale { padding-bottom: 60px; }
.finale-title { margin: 16px auto 14px; max-width: 640px; font-family: var(--f-script); font-weight: 400; font-size: clamp(2.5rem, 10vw, 4rem); line-height: 1.2; color: var(--rose-deep); }
.finale-text { max-width: 540px; margin: 0 auto; font-size: 1.05rem; }
.finale-names { margin: 22px 0 26px; font-family: var(--f-display); font-size: 1.35rem; font-style: italic; color: var(--wine); }
.hug-msg { min-height: 1.6em; margin: 14px 0 6px; font-family: var(--f-display); font-style: italic; font-size: 1.2rem; color: var(--rose-deep); }
.foot { margin-top: 50px; font-size: .74rem; letter-spacing: .12em; color: var(--muted); }

/* music */
.music {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(234, 205, 214, .9); cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .85); color: var(--rose-deep);
  box-shadow: 0 8px 20px rgba(150, 80, 105, .18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.music svg { width: 22px; height: 22px; }
.music.playing svg { animation: spin 4s linear infinite; }
.music:not(.playing)::after { content: ""; position: absolute; width: 30px; height: 1.6px; background: var(--rose-deep); transform: rotate(-45deg); border-radius: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 56px 16px;
  background: rgba(60, 25, 40, .82);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(900px, 100%); }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox figcaption { margin-top: 12px; text-align: center; color: #fbe9ee; font-family: var(--f-script); font-size: 1.7rem; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 1.7rem; line-height: 1; }
.lb-close { top: 12px; right: 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }

/* ---------------------------------- larger --------------------------------- */
@media (min-width: 640px) {
  .gallery { gap: 26px 22px; }
  .gallery .polaroid { width: calc(33.333% - 15px); }
  .reasons { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .counter { gap: 14px; }
  .paper { padding: 48px 46px 32px; }
  .invite-card { padding: 42px 30px 32px; }
}
@media (min-width: 900px) {
  .reasons { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 110px 24px; }
}
@media (max-width: 370px) {
  .counter { gap: 5px; }
  .counter span { font-size: .58rem; letter-spacing: .08em; }
  .r-back { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
