/* =========================================================
   Minh Thảo & Thân Dương — Wedding Invitation
   ========================================================= */
:root {
  --ivory: #fbf7f1;
  --paper: #f4ece2;
  --blush: #f5e6e1;
  --wine: #7a1420;
  --wine-deep: #4a0a12;
  --rose: #b4404e;
  --gold: #a9834f;
  --gold-soft: #d8c09a;
  --ink: #3a2925;
  --muted: #7c6a63;
  --line: rgba(122, 20, 32, .14);
  --white: #fffdfa;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 22px;
  --shadow: 0 20px 50px -24px rgba(74, 10, 18, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(660px, 100% - 32px); }
.script { font-family: var(--script); font-weight: 400; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.center { text-align: center; }
.eyebrow.light { color: var(--gold-soft); }

.title {
  margin: 0 0 48px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 7.5vw, 54px);
  line-height: 1.1;
  text-align: center;
  color: var(--wine);
  letter-spacing: .01em;
}
.title::after {
  content: "";
  display: block;
  width: 120px;
  height: 12px;
  margin: 18px auto 0;
  background:
    linear-gradient(var(--gold), var(--gold)) left center / 48px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center / 48px 1px no-repeat,
    linear-gradient(45deg, transparent 42%, var(--gold) 42% 58%, transparent 58%) center / 10px 10px no-repeat,
    linear-gradient(-45deg, transparent 42%, var(--gold) 42% 58%, transparent 58%) center / 10px 10px no-repeat;
}
.title.light { color: var(--ivory); }
.title.small { font-size: clamp(30px, 6vw, 42px); margin-bottom: 18px; }
.title.small::after { margin-top: 12px; }

.section { padding: 80px 0; position: relative; }
@media (min-width: 760px) { .section { padding: 104px 0; } }
.section__lead { text-align: center; color: var(--muted); margin: -24px auto 36px; max-width: 520px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--wine); color: var(--ivory); box-shadow: 0 12px 24px -12px rgba(122, 20, 32, .6); }
.btn--primary:hover { background: var(--wine-deep); }
.btn--ghost { border-color: var(--wine); color: var(--wine); background: transparent; }
.btn--ghost:hover { background: var(--wine); color: var(--ivory); }
.btn--light { background: var(--ivory); color: var(--wine); }
.btn--light:hover { background: #fff; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 11px; }
.btn--block { width: 100%; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   COVER / ENVELOPE
   ========================================================= */
.cover {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  padding: 24px 16px;
  text-align: center;
  color: var(--ivory);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 14px, rgba(255,255,255,.025) 14px 34px, rgba(0,0,0,.06) 34px 46px),
    radial-gradient(120% 80% at 50% 30%, #9d1d2b 0%, #6b0f1a 55%, #3d070e 100%);
  transition: opacity 1s var(--ease), visibility 1s;
}
.cover__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 30% at 50% 45%, rgba(255, 214, 170, .22), transparent 70%);
}
.cover.is-gone { opacity: 0; visibility: hidden; }
.cover__eyebrow { margin: 0; font-size: 11px; letter-spacing: .45em; text-transform: uppercase; color: var(--gold-soft); }
.cover__to { margin: 0 0 12px; font-family: var(--serif); font-size: 20px; font-style: italic; }
.cover__to strong { font-style: normal; font-weight: 600; }
.cover__names { margin: 14px 0 0; font-family: var(--script); font-size: clamp(34px, 9.5vw, 54px); line-height: 1.15; }
.cover__names b { font-weight: 400; white-space: nowrap; }
.cover__names span { color: var(--gold-soft); font-size: .8em; }
.cover__btn { margin-top: 6px; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px rgba(251, 247, 241, .12); } }

.envelope {
  position: relative;
  width: min(80vw, 340px);
  aspect-ratio: 1.48;
  padding: 0; border: 0; background: none;
  perspective: 1200px;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.envelope > span { position: absolute; display: block; }
.envelope__back { inset: 0; background: #e9dbc7; border-radius: 6px; }
.envelope__letter {
  left: 7%; right: 7%; top: 6%; bottom: 6%;
  z-index: 2;
  background: var(--white);
  border-radius: 4px;
  transition: transform 1s var(--ease) .55s;
}
.envelope__letter-inner {
  position: absolute; inset: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 10%;
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  color: var(--wine);
}
.letter__small { font-size: 8px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); }
.letter__names { font-family: var(--script); font-size: clamp(20px, 6vw, 27px); line-height: 1.3; margin: 4px 0; }
.letter__names i { font-style: normal; color: var(--gold); }
.letter__date { font-family: var(--serif); font-size: 13px; letter-spacing: .2em; }
.envelope__front {
  inset: 0; z-index: 3;
  border-radius: 6px;
  background: linear-gradient(180deg, #f3e8d9, #ecdcc6);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.envelope__front::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 49.6%, rgba(122,20,32,.10) 50%, transparent 50.4%),
              linear-gradient(to top left, transparent 49.6%, rgba(122,20,32,.10) 50%, transparent 50.4%);
}
.envelope__flap {
  left: 0; right: 0; top: 0; height: 62%;
  z-index: 4;
  background: linear-gradient(180deg, #e2cfb5, #ead9c2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .8s var(--ease), z-index 0s linear .4s;
  border-radius: 6px 6px 0 0;
}
.envelope__seal {
  z-index: 5;
  left: 50%; top: 62%;
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  display: grid !important; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c0303f, #861422 60%, #5c0b15);
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,255,255,.06), inset 0 0 0 7px rgba(0,0,0,.12);
  color: var(--gold-soft);
  font-size: 24px;
  transition: transform .5s var(--ease), opacity .4s;
}
.cover.is-open .envelope { animation: none; }
.cover.is-open .envelope__seal { transform: scale(.4) rotate(-30deg); opacity: 0; }
.cover.is-open .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.cover.is-open .envelope__letter { transform: translateY(-62%); }

/* =========================================================
   PETALS
   ========================================================= */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.petal {
  position: absolute; top: -40px;
  width: var(--s, 14px); height: calc(var(--s, 14px) * .8);
  background: radial-gradient(circle at 30% 30%, #f6c9cf, #d9707f 60%, #a92c3d);
  border-radius: 150% 0 150% 0;
  opacity: .8;
  animation: fall var(--d, 12s) linear var(--delay, 0s) infinite;
}
@keyframes fall {
  0%   { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  25%  { transform: translate3d(calc(var(--x, 40px) * .6), 25vh, 0) rotate(120deg); }
  50%  { transform: translate3d(calc(var(--x, 40px) * -.4), 55vh, 0) rotate(220deg); }
  75%  { transform: translate3d(var(--x, 40px), 80vh, 0) rotate(300deg); }
  100% { transform: translate3d(0, 110vh, 0) rotate(400deg); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; animation: kenburns 18s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251,247,241,0) 38%, rgba(251,247,241,.82) 62%, var(--ivory) 86%);
}
.hero__content { position: relative; text-align: center; padding: 0 16px 92px; }
.hero__names {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(56px, 16vw, 104px);
  line-height: .95;
  color: var(--wine);
}
.hero__names span { display: block; }
.hero__names .amp { font-size: .5em; color: var(--gold); margin: 4px 0; }
.hero__date {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 22px 0 10px;
  font-family: var(--serif);
  color: var(--ink);
}
.hero__date span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.hero__date strong { white-space: nowrap; font-weight: 500; font-size: clamp(21px, 6vw, 28px); letter-spacing: .06em; padding: 2px 14px; border-left: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.hero__guest { margin: 6px 0 0; font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--muted); }
.hero__guest strong { font-style: normal; color: var(--wine); font-weight: 600; }

.scroll-hint { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid var(--gold); border-radius: 20px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--wine); animation: scroll 1.8s ease-in-out infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (min-width: 960px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 6vh 6vw; gap: 4vw; background:
      radial-gradient(60% 60% at 20% 50%, var(--blush), transparent 70%), var(--ivory); }
  .hero__media { position: relative; order: 2; height: 86vh; aspect-ratio: 2 / 3; justify-self: center;
    border-radius: 999px 999px 24px 24px; overflow: hidden; box-shadow: var(--shadow);
    outline: 1px solid var(--gold-soft); outline-offset: 12px; }
  .hero__media::after { display: none; }
  .hero__content { padding: 0; }
}

/* =========================================================
   INTRO
   ========================================================= */
.intro { text-align: center; padding-top: 72px; }
.ornament { color: var(--gold); width: 220px; margin: 0 auto 28px; }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 5vw, 30px); line-height: 1.45; color: var(--wine); margin: 0 0 24px; }
.intro__text { color: var(--muted); max-width: 540px; margin: 0 auto; }

/* =========================================================
   COUPLE
   ========================================================= */
.couple { background: linear-gradient(180deg, var(--ivory), var(--paper)); }
.couple__grid { display: grid; gap: 28px; align-items: center; justify-items: center; }
.person { text-align: center; width: min(340px, 100%); }
.person__frame {
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 26px 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.person__frame img { width: 100%; aspect-ratio: 3 / 4.1; object-fit: cover; object-position: 50% 15%; border-radius: 999px 999px 18px 18px; }
.person__role { margin: 24px 0 0; font-size: 11px; letter-spacing: .38em; text-transform: uppercase; color: var(--gold); }
.person__name { margin: 0; font-family: var(--script); font-weight: 400; font-size: 52px; line-height: 1.2; color: var(--wine); }
.person__full { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; letter-spacing: .06em; }
.person__parents { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.person__parents b { display: block; font-weight: 500; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); margin-bottom: 2px; }

.couple__amp { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.couple__amp .ring { position: absolute; inset: 0; border: 1px solid var(--gold-soft); border-radius: 50%; }
.couple__amp .ring::before { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--gold-soft); border-radius: 50%; animation: spin 30s linear infinite; }
.couple__amp .script { font-size: 48px; color: var(--gold); line-height: 1; margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 760px) {
  .couple__grid { grid-template-columns: 1fr auto 1fr; gap: 40px; }
}

/* =========================================================
   SAVE THE DATE
   ========================================================= */
.savedate { color: var(--ivory); overflow: hidden; }
.savedate__bg { position: absolute; inset: 0; }
.savedate__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.savedate__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(60,8,15,.86), rgba(74,10,18,.78) 50%, rgba(50,6,12,.9)); }
.savedate__inner { position: relative; display: flex; flex-direction: column; align-items: center; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(460px, 100%); margin-bottom: 44px; }
.countdown div {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 4px 12px;
  border: 1px solid rgba(216, 192, 154, .45);
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
}
.countdown strong { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 9vw, 46px); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); margin-top: 8px; }

.calendar {
  width: min(400px, 100%);
  padding: 28px 22px 22px;
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.calendar__head { text-align: center; margin-bottom: 16px; }
.calendar__head p { margin: 0; font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--gold); }
.calendar__head h3 { margin: 2px 0 0; font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--wine); }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar__grid .dow { font-size: 10.5px; font-weight: 500; letter-spacing: .1em; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.calendar__grid .day { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; border-radius: 50%; }
.calendar__grid .day.sun { color: var(--rose); }
.calendar__grid .day.mark { color: var(--wine); font-weight: 600; box-shadow: inset 0 0 0 1px var(--gold-soft); }
.calendar__grid .day.main { color: var(--ivory); font-weight: 600; z-index: 0; }
.calendar__grid .day.main::before {
  content: ""; position: absolute; inset: -4px; z-index: -1;
  background: var(--wine);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.3 3.1 4.5 6.8 4.5c2.1 0 3.6 1.1 5.2 3 1.6-1.9 3.1-3 5.2-3 3.7 0 5.9 3.8 4.4 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.3 3.1 4.5 6.8 4.5c2.1 0 3.6 1.1 5.2 3 1.6-1.9 3.1-3 5.2-3 3.7 0 5.9 3.8 4.4 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: beat 1.6s ease-in-out infinite;
}
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
.calendar__legend { display: flex; justify-content: center; gap: 18px; margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.calendar__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.calendar__legend .l-main { background: var(--wine); }
.calendar__legend .l-mark { box-shadow: inset 0 0 0 1px var(--gold); }

/* =========================================================
   EVENTS
   ========================================================= */
.events__list { display: grid; gap: 22px; }
@media (min-width: 760px) { .events__list { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin-inline: auto; } }
.event {
  position: relative;
  padding: 40px 26px 28px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.event::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 6px);
}
.event__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); color: var(--wine); margin-bottom: 16px; }
.event__icon svg { width: 28px; height: 28px; }
.event__side { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.event__title { margin: 2px 0 14px; font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--wine); }
.event__time { margin: 0; font-family: var(--serif); font-size: 46px; line-height: 1; font-weight: 500; letter-spacing: .04em; }
.event__date { margin: 10px 0 0; font-weight: 500; }
.event__lunar { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 16px; }
.event__sep { width: 40px; height: 1px; background: var(--gold); margin: 18px auto; border: 0; }
.event__place { margin: 0; font-weight: 500; color: var(--ink); }
.event__addr { margin: 4px 0 22px; color: var(--muted); font-size: 14px; }
.event__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: auto; }
.event__map { width: 100%; margin-top: 16px; }
.event__map summary { list-style: none; cursor: pointer; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--wine); text-decoration: underline; text-underline-offset: 4px; }
.event__map summary::-webkit-details-marker { display: none; }
.event__map iframe { display: block; width: 100%; height: 220px; margin-top: 14px; border: 0; border-radius: 14px; }

/* =========================================================
   BANNER
   ========================================================= */
.banner { position: relative; height: min(78vh, 720px); overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
@media (min-width: 760px) { .banner img { object-position: 50% 18%; } }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(74,10,18,.05) 30%, rgba(74,10,18,.75)); }
.banner__text { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 1; text-align: center; color: var(--ivory); }
.banner__text .script { display: block; font-size: clamp(60px, 15vw, 110px); line-height: 1; text-shadow: 0 6px 24px rgba(0,0,0,.35); }
.banner__sub { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); padding: 0 16px; }

/* =========================================================
   GALLERY
   ========================================================= */
.album { background: var(--paper); }
.gallery { columns: 2; column-gap: 10px; }
@media (min-width: 760px) { .gallery { columns: 3; column-gap: 14px; } }
.gallery__item {
  display: block; width: 100%;
  margin: 0 0 10px;
  padding: 0; border: 0; background: var(--blush);
  border-radius: 14px;
  overflow: hidden;
  break-inside: avoid;
  cursor: zoom-in;
}
@media (min-width: 760px) { .gallery__item { margin-bottom: 14px; } }
.gallery__item img { width: 100%; height: auto; transition: transform 1.2s var(--ease), filter .6s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item.is-hidden { display: none; }
.gallery__more { display: flex; justify-content: center; margin-top: 28px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(24, 8, 11, .95); }
.lightbox[hidden] { display: none; }
.lb__figure { margin: 0; }
.lb__figure img { max-width: 94vw; max-height: 86svh; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: lbIn .4s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } }
.lb__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.lb__btn:hover { background: rgba(255,255,255,.18); }
.lb__close { top: 16px; right: 16px; }
.lb__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb__next { right: 16px; top: 50%; translate: 0 -50%; }
.lb__count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .3em; }
@media (max-width: 600px) { .lb__prev, .lb__next { top: auto; bottom: 8px; translate: none; } }

/* =========================================================
   RSVP
   ========================================================= */
.rsvp__form { padding: 30px 22px; display: grid; gap: 20px; }
@media (min-width: 600px) { .rsvp__form { padding: 40px; } }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.field > span { font-size: 11px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--wine); }
.field input[type="text"], .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit; font-size: 16px; font-weight: 300; color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%237a1420' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(169, 131, 79, .15); }
.field.is-invalid input { border-color: var(--rose); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-block; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--ivory); cursor: pointer; transition: all .25s; }
.pills input:checked + span { background: var(--wine); border-color: var(--wine); color: var(--ivory); }
.pills input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form__msg { margin: 0; text-align: center; font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--wine); min-height: 1em; }
.btn.is-loading { opacity: .7; pointer-events: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wishes { margin-top: 56px; }
.wishes__title { text-align: center; font-family: var(--serif); font-weight: 500; font-size: 32px; color: var(--wine); margin: 0; }
.wishes__count { display: inline-block; min-width: 28px; padding: 0 8px; margin-left: 4px; border-radius: 999px; background: var(--blush); font-family: var(--sans); font-size: 13px; line-height: 26px; vertical-align: 6px; color: var(--wine); }
.wishes__count:empty { display: none; }
.wishes__sub { text-align: center; color: var(--muted); margin: 4px 0 22px; font-family: var(--serif); font-style: italic; font-size: 17px; }
.wishes__empty { text-align: center; color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: 18px; margin: 0; }
.wishes__list {
  display: grid; gap: 12px;
  max-height: 520px; overflow-y: auto;
  padding: 4px 4px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent);
          mask-image: linear-gradient(180deg, #000 88%, transparent);
  scrollbar-width: thin; scrollbar-color: var(--gold-soft) transparent;
}
.wish { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.wish.is-new { animation: wishIn .7s var(--ease); border-color: var(--gold-soft); }
@keyframes wishIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.wish__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose), var(--wine)); color: var(--ivory); font-family: var(--serif); font-size: 19px; font-weight: 600; }
.wish__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; }
.wish__name { font-weight: 500; color: var(--wine); }
.wish__meta { font-size: 12px; color: var(--muted); }
.wish__text { margin: 4px 0 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }

/* =========================================================
   GIFT
   ========================================================= */
.gift { padding-top: 0; }
.gift__card {
  padding: 44px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--white), var(--blush));
  position: relative;
}
.gift__card::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--gold-soft); border-radius: calc(var(--radius) - 6px); pointer-events: none; }
.gift__icon { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--gold); }
.gift__card .section__lead { margin: 0 auto 26px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(40, 8, 14, .6); backdrop-filter: blur(4px); animation: fadeIn .3s; }
.modal__box {
  position: relative;
  width: min(380px, 100%);
  max-height: calc(100svh - 32px); overflow-y: auto;
  padding: 30px 22px 22px;
  border-radius: 26px;
  background: var(--ivory);
  text-align: center;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
  animation: pop .45s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal__close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); border-radius: 50%; }
.modal__title { margin: -6px 0 14px; font-size: 44px; color: var(--wine); line-height: 1.2; }
.qr { width: 100%; max-width: 280px; margin: 0 auto 16px; border-radius: 18px; box-shadow: var(--shadow); }
.bank { margin: 0 0 18px; display: grid; gap: 2px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px; }
.bank > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; padding: 9px 0; }
.bank > div + div { border-top: 1px dashed var(--line); }
.bank dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bank dd { margin: 0 0 0 auto; font-weight: 500; text-align: right; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.copy { border: 1px solid var(--wine); background: none; color: var(--wine); border-radius: 999px; padding: 3px 10px; font-size: 11px; }
.copy:hover { background: var(--wine); color: var(--ivory); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { position: relative; height: min(92svh, 820px); overflow: hidden; color: var(--ivory); }
.footer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.footer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(74,10,18,0) 35%, rgba(60,8,15,.9) 85%); }
.footer__content { position: absolute; left: 0; right: 0; bottom: 44px; z-index: 1; text-align: center; padding: 0 16px; }
.footer__thanks { margin: 0; font-size: clamp(64px, 16vw, 110px); line-height: 1; }
.footer__line { margin: 8px 0 0; font-family: var(--serif); font-size: 20px; font-style: italic; }
.footer__names { margin: 18px 0 0; font-size: 12px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold-soft); }
.footer__domain { margin: 6px 0 0; font-size: 11px; opacity: .55; letter-spacing: .1em; }

/* =========================================================
   FLOATING
   ========================================================= */
.music {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: var(--wine); color: var(--ivory);
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(74, 10, 18, .6);
}
.music[hidden] { display: none; }
.music svg { width: 22px; height: 22px; }
.music.is-playing svg { animation: spin 4s linear infinite; }
.music.is-playing::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--wine); animation: ping 2s ease-out infinite; }
@keyframes ping { from { opacity: .7; transform: scale(.9); } to { opacity: 0; transform: scale(1.35); } }

.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 130;
  translate: -50% 20px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--ivory); font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, translate .3s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .petals { display: none; }
  html { scroll-behavior: auto; }
}
