/* ==========================================================================
   Tomás & Alejandra — invitación
   ========================================================================== */
:root {
  --bordo: #65262f;
  --bordo-deep: #4b1a22;
  --cream: #fffcf6;
  --ivory: #f8f2e8;
  --paper: #e6ddd2;
  --green: #26332b;
  --gold-1: #f3d98b;
  --gold-2: #c9a04a;
  --gold-3: #8f6a22;
  --ink: #3a2326;
  --script: 'Pinyon Script', cursive;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --strip-h: clamp(120px, 20svh, 220px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--serif);
  color: var(--bordo);
  background: var(--paper) url('/img/paper.webp') center top / 648px auto repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.is-intro, body.is-page { overflow: hidden; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ==========================================================================
   INTRO — sobre
   ========================================================================== */
#intro {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center; align-content: center; gap: 4svh;
  background: inherit;
  background: var(--paper) url('/img/paper.webp') center top / 648px auto repeat;
}
body:not(.is-intro):not(.intro-leaving) #intro { display: none; }
body.intro-leaving #intro { pointer-events: none; }

.env {
  position: relative;
  width: min(84vw, 520px, 90svh);
  aspect-ratio: 776 / 553;
  container-type: inline-size;
  animation: env-float 5s ease-in-out infinite;
}
.env > img, .env > button { position: absolute; }
.env-closed { inset: 0; width: 100%; height: 100%; z-index: 4; filter: drop-shadow(0 18px 24px rgba(40, 30, 20, .18)); }
/* open envelope aligned to the closed one's body (measured from the artwork) */
.env-back, .env-front { left: 3.5cqw; width: 92.9cqw; top: -41.2cqw; opacity: 0; }
.env-back { z-index: 1; }
.env-front { z-index: 3; clip-path: polygon(0 40.5%, 25% 66%, 72% 66%, 100% 40.5%, 100% 100%, 0 100%); }
.env-card { z-index: 2; left: 29cqw; width: 42cqw; top: 6cqw; opacity: 0; filter: drop-shadow(0 8px 14px rgba(40, 20, 20, .2)); }
.env-seal {
  z-index: 5; left: 49.1cqw; top: 37.8cqw; width: 19cqw; aspect-ratio: 420 / 436;
  translate: -50% -50%;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%;
  animation: seal-pulse 2.4s ease-in-out infinite;
}
.env-seal img { width: 100%; filter: drop-shadow(0 3px 4px rgba(60, 40, 0, .35)); }
.env-seal:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 6px; }
.env-flowers { z-index: 6; left: -12cqw; top: 40cqw; width: 40cqw; pointer-events: none; transform-origin: 80% 30%; animation: sway 6s ease-in-out infinite; }

.intro-hint {
  margin: 0; font-size: clamp(14px, 3.6vw, 17px); letter-spacing: .32em; text-transform: uppercase;
  font-weight: 600; color: var(--bordo); opacity: .8; animation: hint 2.4s ease-in-out infinite;
}

@keyframes env-float { 50% { transform: translateY(-8px) rotate(-.6deg); } }
@keyframes seal-pulse { 50% { transform: scale(1.06); } }
@keyframes hint { 50% { opacity: .35; } }
@keyframes sway { 50% { transform: rotate(-4deg); } }
body.opening .env { animation: none; }
body.opening .env-seal { animation: none; }

/* ==========================================================================
   HOME — collage
   ========================================================================== */
#home {
  min-height: 100svh;
  display: flex; flex-direction: column;
}
body.is-intro #home { visibility: hidden; }

.stage {
  --ar: 0.6;
  position: relative;
  width: min(100vw, calc((100svh - var(--strip-h)) * var(--ar)));
  aspect-ratio: var(--ar);
  margin: 0 auto;
  container-type: inline-size;
  flex: none;
}
.piece {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w);
  rotate: var(--r, 0deg);
  z-index: var(--z, 1);
  transform-origin: 50% 50%;
}
.pin { display: block; }
.piece img { width: 100%; filter: drop-shadow(0 10px 14px rgba(50, 25, 20, .18)); }
.piece.link { text-decoration: none; cursor: pointer; transition: scale .5s var(--ease), filter .5s var(--ease); }
.piece.link:hover, .piece.link:focus-visible { scale: 1.05; z-index: 20; outline: none; }
.piece.link:focus-visible img { filter: drop-shadow(0 0 0 var(--gold-2)) drop-shadow(0 14px 20px rgba(50, 25, 20, .28)); }
.piece.link:active { scale: .97; }

.tag {
  position: absolute; left: 50%; bottom: 2%; translate: -50% 0; rotate: calc(var(--r, 0deg) * -1);
  white-space: nowrap; z-index: 30;
  font-size: max(9.5px, 2.45cqw); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cream); background: var(--bordo);
  padding: .45em .9em .4em; border-radius: 2px;
  box-shadow: 0 4px 10px rgba(75, 26, 34, .25);
  pointer-events: none;
}
.tag::before, .tag::after {
  content: ''; position: absolute; top: 50%; width: .7em; height: .7em; background: var(--bordo);
  translate: 0 -50%; rotate: 45deg; z-index: -1;
}
.tag::before { left: -.3em; } .tag::after { right: -.3em; }

.p-polaroid .tag { bottom: -7%; }
/* mobile collage (portrait) */
.p-envelope { --x: 2%;  --y: 0%;   --w: 50%; --r: -6deg; --z: 1; }
.p-fl-a     { --x: 38%; --y: 0%;   --w: 18%; --r: 10deg; --z: 4; }
.p-names    { --x: 52%; --y: 1%;   --w: 44%; --r: 4deg;  --z: 5; }
.p-date     { --x: 2%;  --y: 24%;  --w: 46%; --r: -8deg; --z: 6; }
.p-vinyl    { --x: 79%; --y: 37%;  --w: 26%; --r: 0deg;  --z: 2; }
.p-granday  { --x: 51%; --y: 38%;  --w: 25%; --r: 7deg;  --z: 7; }
.p-polaroid { --x: 9%;  --y: 50%;  --w: 32%; --r: -6deg; --z: 7; }
.p-fl-d     { --x: 38%; --y: 53%;  --w: 14%; --r: 18deg; --z: 8; }
.p-fl-b     { --x: -9%; --y: 63%;  --w: 26%; --r: -12deg; --z: 9; }
.p-hogar    { --x: 60%; --y: 63%;  --w: 34%; --r: 8deg;  --z: 6; }
.p-letter   { --x: 3%;  --y: 72%;  --w: 44%; --r: -6deg; --z: 6; }
.p-locket   { --x: 43%; --y: 81%;  --w: 19%; --r: -4deg; --z: 7; }
.p-fl-c     { --x: 82%; --y: 86%;  --w: 20%; --r: 10deg; --z: 9; }
.p-vinyl img { animation: spin 18s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* desktop / landscape collage */
@media (min-aspect-ratio: 1/1) and (min-width: 760px) {
  .stage { --ar: 1.75; }
  .p-envelope { --x: 3%;  --y: 4%;  --w: 20%; --r: -8deg; }
  .p-fl-a     { --x: 18.5%; --y: 0%; --w: 7.5%; --r: 10deg; }
  .p-date     { --x: 17%; --y: 31%; --w: 16%; --r: -8deg; }
  .p-names    { --x: 40.5%; --y: 1%; --w: 17%; --r: 3deg; }
  .p-vinyl    { --x: 55%; --y: 8%;  --w: 12%; }
  .p-hogar    { --x: 73%; --y: 5%;  --w: 14%; --r: 7deg; }
  .p-fl-d     { --x: 84.5%; --y: 1%; --w: 7.5%; --r: 18deg; }
  .p-polaroid { --x: 6%;  --y: 58%; --w: 12.5%; --r: -6deg; }
  .p-fl-b     { --x: -1%; --y: 84%; --w: 9.5%; --r: -10deg; --z: 3; }
  .strip-home { --fy: 40% !important; }
  .p-letter   { --x: 32%; --y: 57%; --w: 16%; --r: -5deg; }
  .p-granday  { --x: 57%; --y: 42%; --w: 10.5%; --r: 7deg; }
  .p-locket   { --x: 74%; --y: 55%; --w: 11%; --r: -5deg; }
  .p-fl-c     { --x: 86%; --y: 73%; --w: 8.5%; --r: 10deg; }
  .tag { font-size: max(11px, .95cqw); }
}

/* ==========================================================================
   Photo strip + countdown
   ========================================================================== */
.strip {
  position: relative; overflow: hidden; height: var(--strip-h); flex: none;
  background: #222;
}
.strip img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--fy, 50%);
  transform-origin: 50% var(--fy, 50%);
  filter: grayscale(1) contrast(1.05);
  animation: kenburns 22s ease-in-out infinite alternate;
}
.strip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(230, 221, 210, .55), transparent 28%, transparent 60%, rgba(0, 0, 0, .35)); pointer-events: none; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translateX(-2%); } }
.strip-home { margin-top: auto; }

.countdown-strip {
  position: absolute; inset: auto 0 18%; z-index: 2;
  display: flex; justify-content: center; align-items: baseline; gap: .15em;
  font-size: clamp(34px, 9vw, 64px); font-weight: 500; color: var(--cream);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
.countdown-strip i { font-style: normal; opacity: .7; translate: 0 -.06em; }

/* ==========================================================================
   PAGES
   ========================================================================== */
.page {
  position: fixed; inset: 0; z-index: 40;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper) url('/img/paper.webp') center top / 648px auto repeat;
  display: flex; flex-direction: column;
}
.page[hidden] { display: none; }
.page > * { flex-shrink: 0; }
.page > .strip { margin-top: auto; height: clamp(150px, 26svh, 300px); }

.page-inner {
  width: min(100%, 620px); margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 72px) 24px 48px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.page-inner + .page-inner { padding-top: 8px; }

.back {
  position: fixed; z-index: 60; top: calc(env(safe-area-inset-top) + 14px); left: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px;
  background: rgba(255, 252, 246, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(101, 38, 47, .18);
  text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(60, 30, 30, .12);
  transition: background .3s, transform .3s var(--ease);
}
.back::before { content: '←'; font-size: 17px; letter-spacing: 0; line-height: 1; }
.back:hover { background: var(--cream); transform: translateX(-2px); }

.hero-badge { width: min(62vw, 300px); margin: 0 auto 18px; filter: drop-shadow(0 14px 22px rgba(60, 25, 25, .22)); }
.hero-polaroid { width: min(56vw, 250px); rotate: -4deg; }
.hero-granday { width: min(40vw, 190px); transform-origin: 50% 4%; }
.hero-hogar { width: min(52vw, 250px); }
.hero-letter { width: min(66vw, 320px); }

.eyebrow { margin: 6px 0 0; font-size: 15px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.title {
  margin: 10px 0 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  font-size: clamp(28px, 7.4vw, 44px); line-height: 1.12;
}
.amp { font-family: var(--script); text-transform: none; letter-spacing: 0; font-size: 1.15em; font-weight: 400; padding: 0 .08em; }
.script-title { margin: 6px 0 4px; font-family: var(--script); font-weight: 400; font-size: clamp(38px, 10vw, 64px); line-height: 1.1; }
.nowrap { white-space: nowrap; }
.year { margin: -4px 0 0; font-family: var(--script); font-size: clamp(44px, 12vw, 64px); line-height: 1; }
.amp-big { display: inline-block; font-size: 1.6em; line-height: .6; vertical-align: -.1em; margin-left: .05em; }
.lead { margin: 10px auto 0; max-width: 34em; font-size: clamp(18px, 4.6vw, 21px); line-height: 1.5; font-style: italic; }
.lead-strong { font-weight: 600; }
.fine { margin: 14px auto 0; max-width: 30em; font-size: 15px; opacity: .75; font-style: italic; }

.subtitle {
  margin: 56px 0 18px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em;
  font-size: clamp(24px, 6vw, 32px); display: inline-flex; align-items: baseline;
}
.subtitle .initial { font-family: var(--script); text-transform: none; font-size: 2em; letter-spacing: 0; margin-right: .02em; line-height: .5; }

.next { margin-top: 56px; }
.next a { text-decoration: none; font-size: 18px; letter-spacing: .04em; border-bottom: 1px solid rgba(101, 38, 47, .35); padding-bottom: 4px; transition: border-color .3s; }
.next a:hover { border-color: var(--bordo); }
.next em { font-family: var(--script); font-style: normal; font-size: 1.5em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border-radius: 3px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-bordo { background: var(--bordo); color: var(--cream); box-shadow: 0 8px 18px rgba(75, 26, 34, .28); margin-top: 22px; }
.btn-bordo:hover { background: var(--bordo-deep); transform: translateY(-2px); }
.btn-ivory { background: var(--cream); color: var(--bordo); border: 1px solid rgba(101, 38, 47, .28); box-shadow: 0 6px 16px rgba(60, 30, 30, .1); }
.btn-ivory:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(60, 30, 30, .16); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  color: #4a3208; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 14px rgba(120, 80, 10, .3); border-radius: 999px;
}

/* countdown cards */
.countdown-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 460px; margin-top: 32px; }
.countdown-cards > div {
  background: var(--cream); border: 1px solid rgba(101, 38, 47, .2); border-radius: 4px;
  padding: 14px 4px 10px; box-shadow: 0 8px 20px rgba(60, 30, 30, .08);
  position: relative;
}
.countdown-cards > div::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(101, 38, 47, .12); border-radius: 2px; pointer-events: none; }
.countdown-cards span { display: block; font-size: clamp(30px, 8.5vw, 46px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown-cards small { display: block; margin-top: 6px; font-size: clamp(9.5px, 2.6vw, 12px); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .7; }
.countdown span.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-30%); } }

.cal-buttons { display: flex; justify-content: center; gap: 10px; width: min(100%, 460px); }
.cal-buttons .btn-bordo { margin-top: 0; }
.cal-buttons .btn { flex: 1 1 0; min-width: 0; gap: 8px; padding: 12px 6px; font-size: 13px; letter-spacing: .14em; }
.cal-buttons .btn svg { width: 17px; height: 17px; }

/* programa */
.program { list-style: none; margin: 0; padding: 0; width: min(100%, 380px); }
.program li {
  display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center;
  padding: 16px 0; font-size: 19px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  position: relative;
}
.program li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bordo); opacity: .55; transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease) .25s; }
.program li.in::after { transform: scaleX(1); }
.program time { text-align: right; font-variant-numeric: tabular-nums; }
.program li::before { content: '•'; grid-column: 2; grid-row: 1; text-align: center; }
.program span { grid-column: 3; text-align: left; }

/* atuendo */
.dress { position: relative; max-width: 460px; }
.dress p { margin: 10px 0 0; font-size: 18px; line-height: 1.5; }
.dress-code { font-size: 22px !important; font-weight: 700; letter-spacing: .04em; }
.dress-cols { display: grid; gap: 18px; margin-top: 22px; }
.dress-cols h4 { margin: 0; font-size: 16px; letter-spacing: .28em; text-transform: uppercase; }
.dress-cols p { margin-top: 4px; }
.dress-warn { margin-top: 26px !important; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 16px !important; }
.dress-flowers { position: absolute; width: clamp(100px, 28vw, 150px); right: clamp(-70px, -6vw, -20px); top: -84px; rotate: 12deg; opacity: .95; pointer-events: none; }
@media (min-width: 640px) { .dress-cols { grid-template-columns: 1fr 1fr; text-align: left; } .dress-cols h4 { text-align: left; } }

/* historia gallery */
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 26px max(24px, calc(50vw - 150px)) 40px; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.pola {
  flex: none; margin: 0; width: min(72vw, 300px); scroll-snap-align: center;
  background: #fdfbf6; padding: 12px 12px 46px; box-shadow: 0 14px 30px rgba(50, 25, 20, .2);
  rotate: var(--pr, 0deg); transition: rotate .6s var(--ease), transform .6s var(--ease); cursor: zoom-in;
}
.pola:nth-child(odd) { --pr: -2.5deg; } .pola:nth-child(even) { --pr: 2deg; } .pola:nth-child(3n) { --pr: -1deg; }
.pola:hover { rotate: 0deg; transform: translateY(-6px); }
.pola img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.92); }
@media (min-width: 900px) {
  .gallery { flex-wrap: wrap; justify-content: center; overflow: visible; padding: 26px 40px 40px; max-width: 1200px; margin: 0 auto; }
  .pola { width: 240px; }
}

/* regalos */
.gift-options { display: grid; gap: 18px; width: min(100%, 360px); margin-top: 34px; }
.ribbon {
  position: relative; display: block; text-decoration: none;
  background: var(--bordo); color: var(--cream);
  padding: 20px 22px 22px;
  clip-path: polygon(0 6%, 4% 0, 96% 0, 100% 6%, 100% 94%, 96% 100%, 4% 100%, 0 94%);
  box-shadow: 0 10px 22px rgba(75, 26, 34, .25);
}
.ribbon::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(255, 252, 246, .3); pointer-events: none; }
.ribbon h4 { margin: 0 0 10px; font-style: italic; font-size: 20px; font-weight: 600; letter-spacing: .03em; }
.ribbon dl { margin: 0; display: grid; gap: 4px; }
.ribbon dt { font-size: 12px; letter-spacing: .3em; font-weight: 700; opacity: .75; margin-top: 6px; }
.ribbon dd { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 17px; letter-spacing: .06em; font-variant-numeric: tabular-nums; word-break: break-all; }
.copy {
  border: 1px solid rgba(255, 252, 246, .55); background: transparent; color: var(--cream); cursor: pointer;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; padding: 5px 10px; border-radius: 2px;
}
.copy:hover { background: rgba(255, 252, 246, .14); }
.ribbon-link { transition: transform .4s var(--ease), background .3s; }
.ribbon-link:hover { transform: translateY(-3px); background: var(--bordo-deep); }
.ribbon-cta { display: inline-block; font-size: 15px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid rgba(255, 252, 246, .5); padding-bottom: 2px; }

.gift-list { width: 100%; scroll-margin-top: 70px; }
.name-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(100%, 440px); margin: 0 auto; text-align: left; }
.name-form label { font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }
.name-row { display: flex; gap: 10px; }
.name-row .btn { margin: 0; padding-inline: 18px; }
.name-form input {
  flex: 1; min-width: 0; width: 100%; height: 50px; padding: 0 16px; font: inherit; font-size: 19px; color: var(--ink);
  background: var(--cream); border: 1px solid rgba(101, 38, 47, .3); border-radius: 3px; outline: none;
}
.name-form input:focus { border-color: var(--bordo); box-shadow: 0 0 0 3px rgba(101, 38, 47, .12); }
.guest-chip { font-size: 18px; }
.guest-chip button { background: none; border: 0; text-decoration: underline; cursor: pointer; font-style: italic; color: var(--bordo); font-size: 16px; }
.gift-message { min-height: 26px; margin: 14px 0 0; font-weight: 700; font-size: 17px; }

.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: 12px; margin-top: 12px; text-align: center; }
.gift {
  position: relative; display: flex; flex-direction: column; align-items: center;
  background: var(--cream); padding: 18px 10px 14px; border-radius: 3px;
  box-shadow: 0 8px 20px rgba(60, 30, 30, .09);
  border: 1px solid rgba(101, 38, 47, .18);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .4s;
}
.gift::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(101, 38, 47, .12); pointer-events: none; }
.gift:not(.taken):hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(60, 30, 30, .15); }
.gift .num { font-family: var(--script); font-size: 34px; line-height: .8; opacity: .55; }
.gift h5 { margin: 8px 0 6px; font-size: clamp(15px, 4vw, 18px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.gift p { margin: 0 0 12px; font-size: 15px; font-style: italic; line-height: 1.35; flex: 1; }
.gift button {
  border: 1px solid var(--bordo); background: transparent; color: var(--bordo); cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; padding: 9px 16px; border-radius: 2px;
  transition: background .3s, color .3s;
}
.gift button:hover:not(:disabled) { background: var(--bordo); color: var(--cream); }
.gift button:disabled { cursor: not-allowed; opacity: .5; }
.gift.taken { opacity: .62; }
.gift.taken::after {
  content: 'Reservado'; position: absolute; top: 14px; right: -6px; rotate: 10deg;
  background: var(--bordo); color: var(--cream); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; padding: 4px 10px;
}
.gifts.locked .gift:not(.taken) button { opacity: .5; }

.selected-list { margin: 34px auto 0; max-width: 440px; border-top: 1px solid rgba(101, 38, 47, .25); padding-top: 18px; }
.selected-list h4 { margin: 0 0 8px; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; }
.selected-list ul { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 1.7; font-style: italic; }

/* confirmar */
.rsvp-hero { position: relative; }
.rsvp-locket { position: absolute; width: 34%; left: -10%; bottom: -6%; rotate: -10deg; filter: drop-shadow(0 8px 12px rgba(60, 30, 0, .25)); }
.deadline { margin-top: 30px; font-size: 19px; letter-spacing: .1em; text-transform: uppercase; font-style: italic; line-height: 1.5; }
.deadline strong { font-size: 24px; letter-spacing: .14em; }

/* dialog */
.dialog {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 420px); width: 100%;
}
.dialog::backdrop { background: rgba(40, 20, 22, .45); backdrop-filter: blur(3px); }
.dialog form {
  background: var(--cream) url('/img/paper.webp') center / 648px auto; color: var(--bordo);
  padding: 34px 26px 26px; text-align: center; border-radius: 4px; position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
}
.dialog[open] form { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.dialog-seal { width: 64px; margin: -66px auto 10px; filter: drop-shadow(0 4px 6px rgba(60, 40, 0, .35)); }
.dialog h3 { margin: 0; font-size: 22px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.dialog p { font-size: 19px; font-style: italic; line-height: 1.45; }
.dialog-actions { display: flex; gap: 10px; justify-content: center; }
.dialog-actions .btn { margin: 0; flex: 1; padding-inline: 12px; }

/* toast */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px);
  translate: -50% 20px; opacity: 0; pointer-events: none;
  background: var(--bordo); color: var(--cream); padding: 12px 22px; border-radius: 3px;
  font-weight: 700; letter-spacing: .12em; font-size: 14px; text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  transition: opacity .35s, translate .45s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20, 12, 12, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90svh; max-width: 92vw; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: pop .45s var(--ease); }

/* scroll hint */
.scroll-hint {
  position: fixed; z-index: 55; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); translate: -50% 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 18px 8px; border-radius: 999px;
  background: rgba(255, 252, 246, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(101, 38, 47, .18); box-shadow: 0 8px 20px rgba(60, 30, 30, .15);
  font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--bordo);
  opacity: 0; pointer-events: none; transition: opacity .5s, translate .6s var(--ease);
}
.scroll-hint.show { opacity: 1; translate: -50% 0; }
.scroll-hint i { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 4px; } }

/* reveal */
.static .program li::after { transform: scaleX(1); }
.static .scroll-hint { transition: none; }
.static .rv, .static .strip img { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.floaty.in { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { translate: 0 -10px; } }
.swing.in { animation: swing 4.5s ease-in-out infinite; }
@keyframes swing { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

/* desktop page polish */
@media (min-width: 900px) {
  .page-inner { padding-top: 96px; }
  .page::before, .page::after {
    content: ''; position: fixed; width: 260px; height: 260px; pointer-events: none; z-index: 0;
    background: center / contain no-repeat; opacity: .95;
  }
  .page::before { background-image: url('/img/flowers-1.webp'); left: 3vw; top: 22vh; rotate: -12deg; }
  .page::after { background-image: url('/img/flowers-5.webp'); right: 3vw; top: 52vh; rotate: 14deg; width: 220px; height: 220px; }
  .page > * { position: relative; z-index: 1; }
  .page > .back { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}
