:root {
  /* Paleta clara: blanco, crema y beige, con verde oliva de acento */
  --white: #fffdf8;
  --cream: #f6f0e3;
  --beige: #ebe1cc;
  --olive: #5f6b2e;       /* acento: botones, líneas, detalles */
  --olive-soft: #8f9a5e;  /* líneas finas y adornos */
  --text: #4a3828;        /* texto principal, marrón cálido */
  --muted: #6b5846;       /* texto secundario, marrón suave */
  --error: #9c3d22;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Century Gothic", sans-serif;
  --script: "WindSong", "Snell Roundhand", cursive;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: max(1.5rem, env(safe-area-inset-left), env(safe-area-inset-right));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--cream);
  scrollbar-color: var(--olive-soft) var(--cream);
}
html.motion { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--text);
  font: 300 1.125rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--olive); color: var(--white); }
:focus-visible { outline: 1px solid var(--olive); outline-offset: 4px; }

h1, h2, h3, p, fieldset, legend { margin: 0; padding: 0; border: 0; }
img { display: block; }
a, button { touch-action: manipulation; }
button, .btn { user-select: none; -webkit-user-select: none; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Cabecera ---------- */
.top {
  position: absolute; z-index: 10; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 1.1rem) var(--gutter) 0;
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 400;
}
.top a { color: var(--text); text-decoration: none; }
.top__mono {
  display: inline-flex; align-items: center; gap: .55em; padding-block: .6rem;
  font: 400 1rem/1 var(--serif); letter-spacing: .08em;
}
.top__mono i { width: 1px; height: 1.05em; background: currentColor; }
.top__right { display: flex; align-items: center; gap: 1.25rem; }
.langs {
  display: flex; justify-content: center; flex-wrap: wrap; margin-top: 3rem;
  font-size: .8125rem; font-weight: 400; letter-spacing: .06em; color: var(--muted);
}
.langs[hidden] { display: none; }
.langs button {
  all: unset; cursor: pointer; padding: .75rem .55rem; border-radius: 2px;
  transition: color 160ms ease;
}
.langs button + button::before { content: "·"; display: inline-block; margin-right: .75rem; color: var(--olive-soft); }
.langs button + button { padding-left: 0; }
.langs button[aria-current="true"] { color: var(--text); text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--olive); }
.langs button:focus-visible { outline: 1px solid var(--olive); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .langs button:hover { color: var(--text); } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .85rem 1.6rem;
  border: 1px solid var(--olive); border-radius: 0; background: transparent;
  color: var(--text); font: 400 .8125rem/1.2 var(--sans);
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn--ink { border-color: var(--olive); color: var(--text); }
.btn--solid { width: 100%; border-color: var(--olive); background: var(--olive); color: var(--white); }
.btn[disabled] { opacity: .65; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--olive); color: var(--white); }
  .btn--ink:hover { background: var(--olive); color: var(--white); }
  .btn--solid:hover { background: var(--text); border-color: var(--text); }
}

/* ---------- 1 · Portada ---------- */
.open__stage { position: relative; background: var(--beige); color: var(--text); }
.open__ground { display: none; }
.open__hero { position: relative; height: 100svh; min-height: 34rem; background: var(--cream); color: var(--text); overflow: hidden; }
.open__photo { position: absolute; inset: 0; }
.open__photo { overflow: hidden; }
.open__photo img { position: absolute; left: 0; top: -12%; width: 100%; height: 114%; object-fit: cover; object-position: 50% 50%; }
.open__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(255 253 248 / .55) 0, transparent 14%, transparent 50%, rgb(246 240 227 / .72) 64%, rgb(246 240 227 / .94) 78%, var(--cream) 100%);
}
.open__title {
  position: absolute; inset: 0 var(--gutter) auto; height: 100svh; min-height: 34rem;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center;
  padding-bottom: calc(env(safe-area-inset-bottom) + 4.25rem);
}
.vow { position: relative; line-height: .8; margin-bottom: 1.6rem; }
.vow__big {
  display: block; overflow: clip; overflow-clip-margin: .05em; padding-top: .2em;
  font: 400 clamp(8rem, 42vw, 15rem)/.92 var(--serif); font-variation-settings: "opsz" 96;
  letter-spacing: -.02em; text-transform: uppercase;
}
.vow__big > span { display: block; }


.vow__script {
  position: absolute; left: 50%; bottom: -.12em; translate: -38% 0;
  font: 500 clamp(3.4rem, 17vw, 6.5rem)/1 var(--script); color: var(--olive); white-space: nowrap;
  padding: .3em .5em; margin: -.3em -.5em;
}
.names {
  font: 500 clamp(1.3rem, 6vw, 2.5rem)/1.15 var(--serif); font-variation-settings: "opsz" 11;
  letter-spacing: .1em; text-transform: uppercase;
}
.amp { font-style: italic; text-transform: none; color: var(--olive); letter-spacing: 0; }
.meta {
  display: flex; gap: 1.1rem; margin-top: .7rem;
  font-size: .8125rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase;
}
.meta span + span { padding-left: 1.1rem; border-left: 1px solid var(--olive); }
.cue {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.1rem);
  width: 1px; height: 2.25rem; background: var(--olive); transform-origin: top;
}
.open__frame { display: none; }

.open__invite { padding: 4.5rem var(--gutter) 5rem; text-align: center; }
.open__invite h2 { font: 500 clamp(2.75rem, 12.5vw, 5rem)/1.05 var(--serif); font-variation-settings: "opsz" 14; }
.open__invite p { max-width: 30ch; margin: .8rem auto 0; color: var(--muted); text-wrap: balance; }
.open__invite .sign {
  margin-top: .6rem; font: 500 2.5rem/1.4 var(--script); color: var(--olive);
  max-width: none; white-space: nowrap;
}

/* Modo con movimiento: escena fijada */
.motion .open { height: 300svh; }
.motion .open__stage {
  position: sticky; top: 0; height: 100lvh; overflow: hidden; background: var(--cream);
}
.motion .open__ground { display: block; position: absolute; inset: 0; background: var(--beige); opacity: 0; }
.motion .open__hero { position: absolute; inset: 0; height: auto; min-height: 0; background: none; overflow: visible; }
.motion .open__photo { will-change: clip-path; overflow: hidden; }
.motion .open__photo img { will-change: transform; }
.motion .open__frame {
  display: block; position: absolute; visibility: visible;
  top: calc(env(safe-area-inset-top) + 8svh); left: 13vw; width: 74vw; height: 48svh;
  opacity: 0; pointer-events: none;
}
.motion .open__frame::after {
  content: ""; position: absolute; inset: -9px -9px 0;
  border: 1px solid var(--olive); border-bottom: 0; border-radius: 100vw 100vw 0 0;
}
.motion .open__invite {
  position: absolute; left: var(--gutter); right: var(--gutter);
  top: calc(env(safe-area-inset-top) + 58.5svh); bottom: auto; padding: 0;
  visibility: hidden;
}
.motion .open__invite.is-in { visibility: visible; }
.motion .open__invite { transition: visibility 0s .4s; }
.motion .open__invite.is-in { transition-delay: 0s; }
.motion .open__invite h2 { font-size: min(12.5vw, 7svh); }
.motion .open__invite p { font-size: min(1.125rem, 2.3svh); margin-top: .45rem; }
.motion .open__invite .sign { font-size: min(2.5rem, 4.6svh); margin-top: .2rem; }

/* Entrada de la portada */
@keyframes settle { from { opacity: 0; transform: scale(1.07); } }
@keyframes rise { from { transform: translateY(102%); } }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -5% 0 0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw-y { from { transform: scaleY(0); } }
@keyframes pulse-y { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }

.motion .open__photo { animation: settle 1.8s var(--ease-out) both; }
.motion .vow__big > span { animation: rise 1.2s var(--ease-out) .35s both; }
.motion .vow__script { animation: write 1.5s var(--ease-in-out) 1s both; }
.motion .names { animation: fade-up 1s var(--ease-out) 1.5s both; }
.motion .meta { animation: fade-up 1s var(--ease-out) 1.65s both; }
.motion .top { animation: fade-up 1s var(--ease-out) 1.8s both; }
.motion .cue { animation: draw-y .8s var(--ease-out) 2s both, pulse-y 2.6s ease-in-out 3s 2; }

/* ---------- 2 · Fecha ---------- */
.date { background: var(--beige); color: var(--text); }
.date__stage {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem var(--gutter);
}
.mirror { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; font-size: min(36vw, 58svh, 30rem); }
.mirror__half {
  flex: 1 1 0; display: flex; overflow: clip; overflow-clip-margin: 0;
  font-family: var(--serif); font-variation-settings: "opsz" 96;
  font-variant-numeric: lining-nums; letter-spacing: -.02em; line-height: 1;
}
.mirror__half b { font-weight: 400; display: block; }
.mirror__half--l { justify-content: flex-end; margin-right: .06em; }
.mirror__half--r { justify-content: flex-start; margin-left: .06em; color: var(--olive); }
.mirror__half--r b { margin-top: -.053em; }
.mirror__month, .mirror__year { display: block; line-height: 1; white-space: nowrap; }
.mirror__month { font-size: .6em; font-variation-settings: "opsz" 40; letter-spacing: .01em; text-transform: uppercase; }
.mirror__year { margin-top: -.113em; font-size: .31em; font-variation-settings: "opsz" 28; letter-spacing: .41em; margin-right: -.41em; font-variant-numeric: lining-nums; }
.mirror__line { flex: none; width: 1px; height: 1.3em; background: var(--olive); }
.date__meta {
  display: flex; gap: clamp(1.1rem, 5vw, 3rem); margin-top: 2.25rem;
  font-size: .875rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase;
}
.motion .date { height: 240svh; }
.motion .date__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.motion .mirror__half b, .motion .mirror__line { will-change: transform; }
.motion .mirror__half--l b { transform: translateX(110%); }
.motion .mirror__half--r b { transform: translateX(-110%); }
.motion .mirror__line { transform: scaleY(0); }

/* ---------- 3 · Cuenta atrás ---------- */
.count {
  background: var(--beige); padding: 3rem var(--gutter) 6.5rem; text-align: center;
}
.count__title { font: italic 500 2.25rem/1.2 var(--serif); font-variation-settings: "opsz" 14; color: var(--olive); }
.timer {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  max-width: 44rem; margin: 1.5rem auto 0;
}
.timer[hidden] { display: none; }
.timer__unit { padding-block: .25rem; }
.timer__unit + .timer__unit { border-left: 1px solid rgb(95 107 46 / .35); }
.timer__unit b {
  display: block; font: 400 clamp(2.25rem, 11vw, 4.75rem)/1.1 var(--serif); font-variation-settings: "opsz" 72;
  font-variant-numeric: lining-nums tabular-nums;
}
.timer__unit span { font-size: .75rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cal { margin-top: 4.5rem; }
.cal h3 { font: 500 1.5rem/1.25 var(--serif); font-variation-settings: "opsz" 11; }
.cal__btns { display: flex; justify-content: center; gap: .75rem; margin-top: 1.25rem; }
.cal__btns .btn { min-width: 7.5rem; min-height: 2.75rem; padding: .55rem 1.1rem; font-size: .75rem; }

/* ---------- 4 · Lugar ---------- */
.place { background: var(--cream); color: var(--text); }
.place__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 4rem var(--gutter); }
.place__canvas { display: none; }
.place__card {
  position: relative; width: min(100%, 30rem); padding: 3.5rem 1.5rem;
  border: 1px solid var(--olive); border-radius: 100vw 100vw 0 0; text-align: center;
}
.place__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.place h2 {
  font: 500 clamp(3rem, 15vw, 5.25rem)/.98 var(--serif); font-variation-settings: "opsz" 14;
}
.place__where { margin-bottom: .9rem; font-size: 1rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--olive); }
.place h2 span, .place h2 em { display: block; }
.place h2 em { font-size: .5em; line-height: 1.3; color: var(--olive); }
.place address {
  font-style: normal; margin-top: 1.5rem; font-size: 1.0625rem; line-height: 1.5; color: var(--muted);
}
.place .btn { margin-top: 1.75rem; }
.place__after {
  max-width: 24ch; margin-top: 1.25rem; text-wrap: balance;
  font: italic 400 1.125rem/1.4 var(--serif); font-variation-settings: "opsz" 14; color: var(--muted);
}

.motion .place { height: 320svh; }
.motion .place__stage { position: sticky; top: 0; height: 100lvh; padding: 0; overflow: hidden; }
.motion .place__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.motion .place__card {
  position: absolute; left: 8vw; right: 8vw; width: auto;
  top: calc((100svh - 78svh) / 2); height: 78svh; padding: 0 1rem; border-color: transparent;
}
.motion .place__inner > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms var(--ease-out);
}
.motion .place__card.is-in .place__inner > * {
  opacity: 1; transform: none;
  transition: opacity 900ms ease, transform 1100ms var(--ease-out);
}
.motion .place__card.is-in address { transition-delay: 120ms; }
.motion .place__card.is-in .place__after { transition-delay: 320ms; }
.motion .place__card.is-in .btn { transition: opacity 900ms ease 220ms, transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.motion .place__card:not(.is-in) { pointer-events: none; }
.motion .place__card.is-in .btn:active { transform: scale(.97); }

/* ---------- 5 · RSVP ---------- */
.rsvp { background: var(--white); padding: 6rem calc(var(--frame-inset, 14px) + 2.25rem) 6.75rem; }
.rsvp__wrap { max-width: 32rem; margin-inline: auto; }
.rsvp h2 { font: 500 clamp(2.5rem, 11.5vw, 4.25rem)/1.08 var(--serif); font-variation-settings: "opsz" 14; }
.rsvp__lead { margin-top: .9rem; max-width: 34ch; color: var(--muted); text-wrap: pretty; }
.rsvp__deadline {
  display: inline-flex; flex-direction: column; gap: .2rem; margin-top: 1.25rem; padding: .65rem 1rem .7rem;
  border: 1px solid rgb(95 107 46 / .3); background: rgb(95 107 46 / .07);
}
.rsvp__deadline-label {
  font-size: .6875rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--olive);
}
.rsvp__deadline-date {
  font: 500 clamp(1.0625rem, 4.6vw, 1.25rem)/1.2 var(--serif); font-variation-settings: "opsz" 14; color: var(--text);
  text-wrap: balance;
}
.rsvp__closed {
  margin-top: 1.5rem; padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid rgb(95 107 46 / .3); background: rgb(95 107 46 / .07); color: var(--muted);
}
.rsvp__closed[hidden], .rsvp__deadline[hidden], .form[hidden] { display: none; }
.rsvp__closed-title { margin-bottom: .4rem; font: 500 1.375rem/1.25 var(--serif); font-variation-settings: "opsz" 14; color: var(--text); }
.form { margin-top: 2.5rem; }
.form > * + * { margin-top: 1.75rem; }
.form > .reveal-rows { margin-top: 0; }
.field { min-width: 0; }
.field label:not(.choice label), .field legend, .field__label {
  display: block; margin-bottom: .2rem; font-size: 1rem; font-weight: 400; color: var(--muted);
}
.field input[type="text"], .field textarea {
  display: block; width: 100%; padding: .55rem 0 .6rem; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0;
  background: transparent; color: var(--text); caret-color: var(--olive);
  font: 400 1.125rem/1.4 var(--sans); outline: 0; appearance: none; resize: vertical;
  transition: border-color 160ms ease;
}
.field input[type="text"]:focus, .field textarea:focus { border-bottom-color: var(--olive); box-shadow: 0 1px 0 var(--olive); }
.field.has-error input[type="text"] { border-bottom-color: var(--error); }
.field__err, .form__err { color: var(--error); font-size: .9375rem; font-weight: 400; }
.field__err:not(:empty) { margin-top: .4rem; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.choice label { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .5rem .6rem; text-align: center;
  border: 1px solid var(--muted); font-size: 1rem; font-weight: 400; line-height: 1.2;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
  user-select: none; -webkit-user-select: none;
}
.choice label:active span { transform: scale(.97); }
.choice input:checked + span { background: var(--olive); color: var(--white); border-color: var(--olive); }
.choice input:focus-visible + span { outline: 1px solid var(--olive); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .choice label:hover span { border-color: var(--olive); } }

.reveal-rows { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease-out); }
.reveal-rows.is-open { grid-template-rows: 1fr; }
.reveal-rows__in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s 320ms; }
.reveal-rows__in > .field { padding-top: 1.75rem; }
.reveal-rows.is-open > .reveal-rows__in { visibility: visible; overflow: visible; transition-delay: 0s; }
html:not(.js) .reveal-rows { grid-template-rows: 1fr; }
html:not(.js) .reveal-rows__in { visibility: visible; }

.stepper { display: inline-flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.stepper button {
  display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0;
  border: 1px solid var(--muted); background: none; color: var(--text); cursor: pointer;
  transition: transform 140ms var(--ease-out), border-color 160ms ease, opacity 160ms ease;
}
.stepper button:active { transform: scale(.94); }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; }
.stepper output { min-width: 2.75rem; text-align: center; font: 400 1.75rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
@media (hover: hover) and (pointer: fine) { .stepper button:not([disabled]):hover { border-color: var(--olive); } }

.hp { position: absolute; left: -9999px; }
.form__err:empty { display: none; }

.thanks { margin-top: 2rem; text-align: center; outline: 0; }
.thanks[hidden] { display: none; }
.thanks__script { font: 500 clamp(2.75rem, 12vw, 4rem)/1.35 var(--script); color: var(--olive); }
.thanks p + p { margin-top: .5rem; color: var(--muted); }
.motion .thanks { animation: fade-up 700ms var(--ease-out) both; }
.link {
  all: unset; cursor: pointer; margin-top: 1.5rem; padding: .75rem 0; display: inline-block;
  font-size: .8125rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - .55rem) / 100% 1px no-repeat;
}
.link:focus-visible { outline: 1px solid var(--olive); outline-offset: 4px; }

/* ---------- 6 · Cierre ---------- */
.close {
  background: var(--cream); color: var(--text); text-align: center;
  padding: 6rem var(--gutter) calc(env(safe-area-inset-bottom) + 5rem);
}
.close__script { font: 500 clamp(2.5rem, 11.5vw, 7rem)/1.5 var(--script); color: var(--olive); white-space: nowrap; }
/* En inglés y sueco "we do" va un poco más abajo y más grande, para que se lea bien bajo "YES" */
html:is([lang="en"], [lang="sv"]) .vow__script { bottom: -.56em; translate: -46% 0; font-size: clamp(4rem, 20vw, 7.5rem); }
html:is([lang="en"], [lang="sv"]) .vow { margin-bottom: 3.2rem; }
@media (min-width: 900px) {
  html:is([lang="en"], [lang="sv"]) .vow__script { font-size: min(6.5rem, 14svh); }
  html:is([lang="en"], [lang="sv"]) .vow { margin-bottom: 3.9rem; }
}
/* En inglés y sueco la frase es más larga: dos líneas equilibradas y un poco más pequeña */
html:is([lang="en"], [lang="sv"]) .close__script { white-space: normal; text-wrap: balance; font-size: clamp(2.25rem, 10vw, 5.5rem); line-height: 1.2; max-width: 12em; margin-inline: auto; padding-block: .15em; }
.close__names {
  margin-top: .25rem; font: 500 clamp(1.2rem, 5.2vw, 2rem)/1.2 var(--serif); font-variation-settings: "opsz" 11;
  letter-spacing: .1em; text-transform: uppercase;
}
.close__date {
  display: flex; align-items: center; justify-content: center; gap: .8em; margin-top: 1rem;
  font-size: .875rem; font-weight: 400; letter-spacing: .24em;
}
.close__date i { width: 1px; height: 1.1em; background: var(--olive); }

/* ---------- Revelados ---------- */
/* Espacio extra abajo para que no se corten letras con rabo (g, p, y) */
.mask { overflow: clip; overflow-clip-margin: .1em; padding-bottom: .16em; margin-bottom: -.16em; }
.mask > span { display: block; }
.motion .mask > span { transform: translateY(125%); transition: transform 1.1s var(--ease-out); }
.motion .is-in > .mask > span, .motion .mask.is-in > span { transform: none; }
.motion .rv {
  opacity: 0; transform: translateY(16px); filter: blur(3px);
  transition: opacity 900ms ease var(--d, 0s), transform 1s var(--ease-out) var(--d, 0s), filter 900ms ease var(--d, 0s);
}
.motion .rv.is-in, .motion .is-in > .rv, .motion .is-in .rv-group > .rv {
  opacity: 1; transform: none; filter: none;
}

/* ---------- Escritorio ---------- */
@media (min-width: 900px) {
  .top { padding-inline: 3rem; }
  .open__photo img { top: 0; height: 100%; object-position: 50% 34%; }
  .open__shade { background: linear-gradient(to bottom, rgb(255 253 248 / .5) 0, transparent 12%, transparent 46%, rgb(246 240 227 / .82) 66%, var(--cream) 100%); }
  .vow__big { font-size: min(12rem, 25svh); }
  .vow__script { font-size: min(5.5rem, 12svh); }
  .open__invite { padding-block: 7rem; }

  .motion .open__frame { left: 14vw; top: 11svh; width: min(30vw, 52svh); height: 78svh; }
  .motion .open__invite {
    left: 52vw; right: 8vw; top: 0; height: 100svh; text-align: left;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  }
  .motion .open__invite h2 { font-size: min(6.5vw, 6.5rem); }
  .motion .open__invite p { font-size: 1.3rem; margin-inline: 0; margin-top: .8rem; }
  .motion .open__invite .sign { font-size: 3rem; margin-top: .6rem; }

  .date__meta { font-size: 1.0625rem; }
  .motion .place__card { left: calc(50% - min(24rem, 30vw)); right: calc(50% - min(24rem, 30vw)); }
  .place h2 { font-size: min(6.5rem, 12svh); }
}

/* Teléfonos bajos */
@media (max-height: 640px) {
  .place h2 { font-size: min(14vw, 9.5svh); }
  .place__where { margin-bottom: .4rem; }
  .place address { margin-top: .8rem; font-size: 1rem; }
  .place .btn { margin-top: 1rem; }
  .place__after { margin-top: .75rem; font-size: 1rem; }
}

/* ---------- Papel de algodón, grano fino (todas las secciones salvo ¿Dónde? y la ilustración de portada) ----------
   Textura propia en mosaico sin juntas: ilustracion/papel-textura.svg, exportada a site/assets/papel.jpg. */
.sheet, .rsvp, .close, .motion .open__ground {
  background-image: url("../assets/papel.jpg");
  background-size: 400px 400px; background-repeat: repeat;
  background-blend-mode: multiply;
}

.sheet { background-color: var(--beige); }
.sheet .date, .sheet .count { background-color: transparent; }
/* La franja que el visor deja bajo la página (zona del indicador de inicio) también es papel */
html {
  background-color: var(--cream); background-image: url("../assets/papel.jpg");
  background-size: 400px 400px; background-blend-mode: multiply;
}


.motion .open__ground { background-color: var(--beige); }

/* ---------- Marco de línea fina, tono sobre tono (fecha, RSVP y cierre) ----------
   Doble línea un tono más oscura que el papel, con un pequeño adorno en cada esquina. */
:root { --frame: rgb(150 120 72 / .42); --frame-inset: 14px; }
.date__stage::before, .rsvp::before, .close::before,
.date__stage::after, .rsvp::after, .close::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
}
.date__stage::before, .rsvp::before, .close::before {
  inset: var(--frame-inset);
  border: 1px solid var(--frame);
  outline: 1px solid var(--frame); outline-offset: -6px;
}
.date__stage::after, .rsvp::after, .close::after {
  inset: calc(var(--frame-inset) + 10px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='' fill='none' stroke='rgb(150 120 72 / .42)' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M3 20 C3 10 10 3 20 3'/%3E%3Cpath d='M20 3 C27 3 29 9 25 11.5 C22 13 19.5 10.5 21.5 8.5'/%3E%3Cpath d='M3 20 C3 27 9 29 11.5 25 C13 22 10.5 19.5 8.5 21.5'/%3E%3Cpath d='M11 7 L15 11 L11 15 L7 11Z' fill='rgb(150 120 72 / .42)' stroke='none'/%3E%3C/g%3E%3C/svg%3E") top left / 34px 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 0) scale(-1 1)' fill='none' stroke='rgb(150 120 72 / .42)' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M3 20 C3 10 10 3 20 3'/%3E%3Cpath d='M20 3 C27 3 29 9 25 11.5 C22 13 19.5 10.5 21.5 8.5'/%3E%3Cpath d='M3 20 C3 27 9 29 11.5 25 C13 22 10.5 19.5 8.5 21.5'/%3E%3Cpath d='M11 7 L15 11 L11 15 L7 11Z' fill='rgb(150 120 72 / .42)' stroke='none'/%3E%3C/g%3E%3C/svg%3E") top right / 34px 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(0 40) scale(1 -1)' fill='none' stroke='rgb(150 120 72 / .42)' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M3 20 C3 10 10 3 20 3'/%3E%3Cpath d='M20 3 C27 3 29 9 25 11.5 C22 13 19.5 10.5 21.5 8.5'/%3E%3Cpath d='M3 20 C3 27 9 29 11.5 25 C13 22 10.5 19.5 8.5 21.5'/%3E%3Cpath d='M11 7 L15 11 L11 15 L7 11Z' fill='rgb(150 120 72 / .42)' stroke='none'/%3E%3C/g%3E%3C/svg%3E") bottom left / 34px 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 40) scale(-1 -1)' fill='none' stroke='rgb(150 120 72 / .42)' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M3 20 C3 10 10 3 20 3'/%3E%3Cpath d='M20 3 C27 3 29 9 25 11.5 C22 13 19.5 10.5 21.5 8.5'/%3E%3Cpath d='M3 20 C3 27 9 29 11.5 25 C13 22 10.5 19.5 8.5 21.5'/%3E%3Cpath d='M11 7 L15 11 L11 15 L7 11Z' fill='rgb(150 120 72 / .42)' stroke='none'/%3E%3C/g%3E%3C/svg%3E") bottom right / 34px 34px no-repeat;
}
.rsvp, .close { position: relative; }
.rsvp__wrap, .close > * { position: relative; z-index: 1; }
@media (min-width: 900px) {
  :root { --frame-inset: 28px; }
  .date__stage::after, .rsvp::after, .close::after { background-size: 44px 44px, 44px 44px, 44px 44px, 44px 44px; }
}
