/* ------------------------------------------------------------------
   Fuentes (ver fonts/README.md).
   Si falta algún archivo, se usa la fuente provisional de Google Fonts.
------------------------------------------------------------------- */
@font-face { font-family: "Boda Script"; src: url("../fonts/Sloop-ScriptThree.woff2") format("woff2"), url("../fonts/Sloop-ScriptThree.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Boda Display"; src: url("../fonts/Brown-Sugar-Regular.woff2") format("woff2"), url("../fonts/Brown-Sugar-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --white: #ffffff;
  --soft: #f6f7f3;
  --ink: #1d1f1b;
  --muted: #5d6459;
  --sage: #7f9479;
  --sage-light: #c9d2c4;
  --sage-deep: #4f5f4b;
  --gold: #c9a45c;
  --side: #e7eae1;
  --doodle: #5f7759;
  --page: 480px;

  --script: "Boda Script", "Pinyon Script", "Snell Roundhand", cursive;
  --display: "Boda Display", "Italiana", "Didot", serif;
  --text: "Lora", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

/* La invitación vive en una columna del ancho de un móvil.
   En pantallas grandes, los lados son de un color liso. */
.page {
  container-type: inline-size;
  position: relative; z-index: 1;
  margin: 0 auto;
  background: var(--white);
  overflow: clip;
}
@media (min-width: 560px) {
  body { background: var(--side); }
  .page { max-width: var(--page); box-shadow: 0 0 0 1px rgba(79, 95, 75, .08), 0 20px 60px -20px rgba(47, 61, 42, .25); min-height: 100vh; }
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: 4rem; }
.band.soft { background: var(--soft); }
.band.green { background: var(--sage-deep); color: #eef1ea; }
.stack { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }

.script { font-family: var(--script); font-weight: 400; }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; }
.display.big { font-size: clamp(2rem, 8cqw, 2.6rem); }
.caps { text-transform: uppercase; letter-spacing: .12em; }
.eyebrow { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.small { font-size: .85rem; color: var(--muted); }
.band.green .small { color: #c9d2c4; }

.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-family: var(--text); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  background: var(--sage-deep); color: #fff; border: 1px solid var(--sage-deep);
  padding: .95rem 1.5rem;
}
.btn:hover { background: #3f4d3c; }
.btn.ghost { background: transparent; color: var(--sage-deep); }
.btn.ghost:hover { background: var(--soft); }
.buttons { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

/* ---------------- Selector de idioma ----------------
   Píldora arriba a la derecha, por encima del sobre. */
.lang {
  position: absolute; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 10px));
  display: flex; gap: 2px; padding: 4px;
  background: rgba(251, 248, 241, .86);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 999px;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35);
}
.lang button {
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif; font-size: .78rem; letter-spacing: .14em; font-weight: 600;
  min-width: 3rem; padding: .55rem .9rem; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--sage-deep);
  transition: background-color .25s ease, color .25s ease;
}
.lang button[aria-pressed="true"] { background: var(--sage-deep); color: #fff; }
.lang button:not([aria-pressed="true"]):hover { background: rgba(79, 95, 75, .1); }

/* ---------------- Botón de sonido ----------------
   Fijo abajo a la derecha (en ordenador, dentro del borde de la columna). Aparece al abrir el sobre. */
.sound-btn {
  position: fixed; z-index: 40;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(251, 248, 241, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .4);
  color: var(--sage-deep);
  animation: sound-in .6s ease both;
}
@media (min-width: 560px) { .sound-btn { right: calc((100vw - var(--page)) / 2 + 16px); } }
@keyframes sound-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.sound-btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn svg path:first-child { fill: currentColor; stroke: none; }
.sound-btn .icon-off { display: none; }
.sound-btn[aria-pressed="false"] .icon-on { display: none; }
.sound-btn[aria-pressed="false"] .icon-off { display: block; }

/* ---------------- Griego ----------------
   Sloop Script y Brown Sugar no tienen letras griegas: en griego se usan
   Noto Serif Display (títulos y toques manuscritos, en cursiva) y Literata (texto).
   Los nombres siguen en Sloop Script porque se escriben con letras latinas. */
html[lang="el"] { --display: "Noto Serif Display", "GFS Didot", "Didot", serif; --text: "Literata", Georgia, serif; }
html[lang="el"] .display { font-weight: 300; }
html[lang="el"] :is(.tap, .hand-note, .quote, .details-title .script, .love-row) {
  font-family: "Noto Serif Display", "GFS Didot", serif; font-style: italic; font-weight: 300;
}
html[lang="el"] .tap { font-size: 1.15rem; letter-spacing: .02em; }
html[lang="el"] .hand-note { font-size: 1.15rem; }
html[lang="el"] .love-row { font-size: clamp(1.4rem, 6cqw, 1.9rem); line-height: 1.5; }
html[lang="el"] .cal { padding-top: 4rem; }
html[lang="el"] .cal-note { top: 2rem; }
html[lang="el"] .thanks-title { font-size: 1.9rem; }
html[lang="el"] .quote { font-size: clamp(1.25rem, 5.2cqw, 1.7rem); line-height: 1.45; }
html[lang="el"] .details-title .script { font-size: clamp(2.2rem, 9cqw, 3rem); margin-left: .05em; }
html[lang="el"] .details-title .display { font-size: clamp(2rem, 10.5cqw, 3.6rem); }
html[lang="el"] .display.big { font-size: clamp(1.6rem, 6.6cqw, 2.2rem); }
html[lang="el"] .blessing { letter-spacing: .06em; }
html[lang="el"] .when { letter-spacing: .1em; font-size: clamp(.74rem, 3.1cqw, 1.05rem); white-space: nowrap; }

/* ---------------- Sobre ---------------- */
/* El sobre se superpone a la invitación (sin z-index propio, para que sus capas
   y #invitacion compartan el mismo orden de apilado dentro de .page). */
html.locked { overflow: hidden; }
/* mientras el sobre está cerrado, la franja de la hora y la batería (iPhone) también es verde */
html.sealed { background: var(--sage-deep); }
.envelope {
  position: absolute; top: 0; left: 0; right: 0; overflow: hidden;
  /* lvh: el alto completo, también bajo las barras del navegador del móvil */
  height: 100vh; height: 100lvh; min-height: 520px;
}
/* interior del sobre, visible cuando se abre la solapa */
.env-inside {
  position: absolute; inset: 0; z-index: 1;
  background: url("../img/paper.webp") 0 0 / 320px, radial-gradient(90% 60% at 50% 30%, #3a4737, #2c3629);
  background-blend-mode: soft-light, normal;
  transition: opacity .8s ease 1.3s;
}
.envelope.open .env-inside { opacity: 0; }
.env-pocket, .env-flap { position: absolute; left: 0; top: 0; width: 100%; }
.env-pocket { height: 100%; z-index: 3; transition: transform 1.1s cubic-bezier(.6, 0, .3, 1) 1.05s; }
.envelope.open .env-pocket { transform: translateY(105%); }
.env-flap {
  height: 50%; z-index: 4;
  transform-origin: 50% 0;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28));
  transition: transform .9s cubic-bezier(.55, 0, .25, 1) .3s;
}
.env-pocket svg, .env-flap svg, .env-pocket .paper, .env-flap .paper { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* papel: color verde + textura (img/paper.webp, gris medio) mezclada con soft-light.
   Bolsillo y solapa empiezan en la misma esquina, así la veta del papel coincide. */
.paper {
  background-image: url("../img/paper.webp");
  background-size: 320px;
  background-blend-mode: soft-light;
}
.pocket-paper {
  background-color: var(--sage-deep);
  clip-path: polygon(0.00% 6.67%, 3.90% 7.99%, 7.76% 9.59%, 11.56% 11.46%, 15.31% 13.61%, 19.01% 16.02%, 22.65% 18.71%, 26.25% 21.67%, 29.80% 24.90%, 33.29% 28.40%, 36.73% 32.18%, 40.13% 36.22%, 43.47% 40.54%, 46.76% 45.14%, 50.00% 50.00%, 53.24% 45.14%, 56.53% 40.54%, 59.87% 36.22%, 63.27% 32.18%, 66.71% 28.40%, 70.20% 24.90%, 73.75% 21.67%, 77.35% 18.71%, 80.99% 16.02%, 84.69% 13.61%, 88.44% 11.46%, 92.24% 9.59%, 96.10% 7.99%, 100.00% 6.67%, 100.00% 100.00%, 0.00% 100.00%);
}
.flap-paper {
  background-color: #566852;
  clip-path: polygon(0.00% 0.00%, 100.00% 0.00%, 100.00% 13.33%, 96.10% 15.99%, 92.24% 19.18%, 88.44% 22.93%, 84.69% 27.21%, 80.99% 32.04%, 77.35% 37.41%, 73.75% 43.33%, 70.20% 49.80%, 66.71% 56.80%, 63.27% 64.35%, 59.87% 72.45%, 56.53% 81.09%, 53.24% 90.27%, 50.00% 100.00%, 46.76% 90.27%, 43.47% 81.09%, 40.13% 72.45%, 36.73% 64.35%, 33.29% 56.80%, 29.80% 49.80%, 26.25% 43.33%, 22.65% 37.41%, 19.01% 32.04%, 15.31% 27.21%, 11.56% 22.93%, 7.76% 19.18%, 3.90% 15.99%, 0.00% 13.33%);
}
.env-pocket .gold-line, .env-flap .gold-line { fill: none; stroke: var(--gold); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .9; }
.envelope.open .env-flap { transform: perspective(1400px) rotateX(180deg); }

/* La invitación espera hundida dentro del sobre y sube cuando se abre */
.portico {
  position: relative; z-index: 2;
  background-color: var(--white);
  transform-origin: 50% 0;
  transition: transform 1.3s cubic-bezier(.3, 0, .2, 1) .95s, box-shadow 1.3s ease .95s;
}
html.sealed .portico { transform: translateY(52lvh) scale(.86); box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .45); }

.seal-btn {
  position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -66px);
  background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2rem; color: #f1ecdd;
  transition: opacity .4s ease;
}
.envelope.open .seal-btn { opacity: 0; pointer-events: none; }
.seal {
  width: 132px; height: 132px;
  border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background:
    radial-gradient(circle, transparent 52%, rgba(90,62,20,.35) 54%, transparent 60%),
    radial-gradient(circle at 34% 28%, #f3d995 0%, #d4ae63 32%, #a9813b 68%, #7d5c22 100%);
  box-shadow: 0 10px 22px -8px rgba(0,0,0,.6), inset 0 -4px 10px rgba(80,52,10,.45), inset 0 3px 6px rgba(255,240,200,.5);
  display: grid; place-items: center;
  transition: transform .6s ease, opacity .5s ease;
}
.seal > span { font-family: var(--script); font-size: 2.7rem; line-height: 1; color: #77561c; text-shadow: 0 1px 0 rgba(255,236,190,.7), 0 -1px 0 rgba(70,45,10,.4); }
.seal small { font-size: .55em; margin: 0 .05em; }
.seal-btn:hover .seal { transform: rotate(-4deg) scale(1.03); }
.envelope.open .seal { transform: scale(.6) translateY(-30px); opacity: 0; }
.tap { font-family: var(--script); font-size: 1.6rem; }

/* ---------------- Invitación: jardín mediterráneo ----------------
   img/hero-frame.jpg (904 × 1740) se ve entero, sin recortar: la sección tiene su
   misma proporción, así la fuente queda completa abajo. El texto va en el hueco
   libre bajo el arco, entre las columnas (18 %–72 % del alto, 18 %–82 % del ancho). */
.portico {
  width: 100cqw; margin: 0 auto;
  aspect-ratio: 904 / 1740;
  background-color: var(--white);
}
/* la imagen va en una capa aparte al 45 %, así el texto no pierde fuerza;
   abajo se funde con el blanco para unirse con la cuenta regresiva */
.portico::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../img/hero-frame.webp") top center / 100% auto no-repeat;
  opacity: .45;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.invite { z-index: 1; }
/* la cuenta regresiva continúa el hero: mismo fondo y poco espacio arriba */
.band.hero-count { background: var(--white); padding-block: .5rem 4rem; }
/* más aire entre la cuenta regresiva y el olivo de Reserva la fecha */
.band.save { padding-top: 4.5rem; }
.invite {
  position: absolute; top: 18%; bottom: 28%; left: 18%; right: 18%;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: clamp(.6rem, 3cqw, 1.4rem);
  text-align: center; min-width: 0;
}
.blessing { font-size: clamp(.6rem, 2.5cqw, .9rem); letter-spacing: .08em; text-transform: uppercase; line-height: 1.7; padding-inline: 10%; }
.names { display: grid; justify-items: center; font-family: var(--script); font-weight: 400; line-height: 1; width: 116%; margin-inline: -8%; }
.names .n1, .names .n2 { font-size: clamp(3.6rem, 19cqw, 6.8rem); }
.names .and { font-family: var(--display); font-size: clamp(1.5rem, 6.5cqw, 2.4rem); margin: .8em 0 .15em; color: var(--sage); text-transform: uppercase; }
.when { font-family: var(--display); font-size: clamp(.78rem, 3.3cqw, 1.1rem); text-transform: uppercase; letter-spacing: .2em; font-variant-numeric: lining-nums; }

.sprig { width: min(240px, 60%); height: auto; mix-blend-mode: multiply; }

/* ---------------- Dibujos a mano ----------------
   Símbolos SVG del principio de index.html (#d-…). Con JS se "dibujan" al entrar en pantalla;
   sin JS se ven completos. */
.doodle { fill: none; stroke: var(--doodle); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; pointer-events: none; }
html.doodles .doodle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.45, .05, .3, 1); }
html.doodles .doodle.drawn { stroke-dashoffset: 0; }
.hand-note { font-family: var(--script); font-size: 1.7rem; line-height: 1; color: var(--doodle); }
.with-heart { display: inline-flex; align-items: center; gap: .5rem; }
.heart { width: 1.4rem; height: 1.4rem; transform: rotate(-10deg); }
.underlined { position: relative; padding-bottom: .4em; }
.underline { position: absolute; left: 6%; bottom: 0; width: 88%; height: .45em; }

/* ---------------- Cuenta regresiva ---------------- */
.count { display: grid; grid-template-columns: repeat(4, minmax(0, 76px)); gap: .5rem; justify-content: center; }
.count div { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.count b { width: 100%; background: #e8ece4; padding: .55rem 0; font-family: var(--display); font-weight: 400; font-size: 1.7rem; font-variant-numeric: tabular-nums lining-nums; }
.count span { font-size: .58rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* ---------------- Calendario ---------------- */
.cal { width: 100%; max-width: 380px; }
.cal h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: .45rem; font-variant-numeric: lining-nums; }
.cal-grid .dow { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding-bottom: .4rem; border-bottom: 1px solid var(--sage-light); margin-bottom: .3rem; }
.cal-grid .day { display: grid; place-items: center; height: 2.2rem; }
.cal-grid .mark { position: relative; font-weight: 600; }
.cal-grid .mark .doodle { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; transform: translate(-50%, -50%) rotate(-8deg); stroke-width: 1.8; }
/* espacio encima de «Enero»; la nota «¡te esperamos!» baja con el mes */
.cal { position: relative; padding-top: 2.5rem; }
.cal-note { position: absolute; left: 0; top: 2.1rem; transform: rotate(-7deg); }

/* ---------------- Frase ---------------- */
/* Fotos instantáneas en diagonal con frases manuscritas entre ellas.
   Orden de capas: foto 1, frases, foto 2 (las frases pasan por encima de la
   primera y por detrás de la segunda). Las medidas van en % del ancho. */
.band.love { overflow: hidden; padding-block: 4.5rem 4.5rem; }
.collage {
  position: relative;
  margin: 0 calc(-1 * max(20px, env(safe-area-inset-left, 0px)));
  aspect-ratio: 390 / 600;
}
.polaroid {
  position: absolute; margin: 0;
  padding: 3.2% 3.2% 11%;
  background: #fbf8f1;
  box-shadow: 0 18px 32px -14px rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .18);
}
.polaroid img { width: 100%; height: auto; display: block; filter: saturate(.85) contrast(1.02); }
.polaroid.p1 { z-index: 1; width: 60%; left: 7%; top: 2%; transform: rotate(-7deg); }
.polaroid.p2 { z-index: 3; width: 55%; right: 7%; top: 44%; transform: rotate(6deg); }
.love-lines {
  position: absolute; z-index: 2; left: -30%; right: -30%; top: 40%;
  display: flex; flex-direction: column; gap: .15rem;
  transform: rotate(-9deg);
  pointer-events: none;
}
.love-row {
  display: block; white-space: nowrap;
  font-family: var(--script); font-size: clamp(1.9rem, 8.5cqw, 2.6rem); line-height: 1.15;
  color: #e9dcc0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  will-change: transform;
}
.love-row:nth-child(even) { margin-left: -12%; }
/* deriva lenta: cada fila repite su texto dos veces y se desplaza media longitud */
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes drift-back { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.love-row:nth-child(odd) { animation: drift 60s linear infinite; }
.love-row:nth-child(even) { animation: drift-back 70s linear infinite; }

.quote { font-family: var(--script); font-size: clamp(1.7rem, 6.5cqw, 2.3rem); line-height: 1.35; text-align: center; }

/* ---------------- Los detalles ---------------- */
.details { position: relative; overflow: hidden; }
.details-branch { position: absolute; top: 0; right: -30px; width: clamp(170px, 42cqw, 280px); opacity: .45; transform: scaleX(-1) scaleY(-1); mix-blend-mode: multiply; pointer-events: none; }
.details .wrap { position: relative; display: flex; flex-direction: column; gap: 2.4rem; }
.details-title { display: flex; flex-direction: column; line-height: .9; }
.details-title .script { font-size: clamp(3rem, 12cqw, 4.2rem); margin-left: .1em; }
.details-title .display { font-size: clamp(3rem, 14cqw, 5rem); letter-spacing: .02em; }
.detail { display: flex; flex-direction: column; gap: .4rem; padding-left: clamp(0px, 14cqw, 120px); }
.detail h3 { font-size: clamp(1.4rem, 5.5cqw, 1.8rem); }
/* acuarela de fondo blanco: multiply hace desaparecer el blanco sobre la página */
.location-img { margin: 0 auto -1rem; width: min(82%, 320px); transform: rotate(-2deg); mix-blend-mode: multiply; }
.location-img img { width: 100%; height: auto; }
.map-link { align-self: flex-start; margin-top: .4rem; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; color: var(--sage-deep); border-bottom: 1px solid currentColor; padding-bottom: .15rem; }

/* Paleta de colores de Vestimenta: muestras con la misma textura de papel que el sobre */
.detail + .detail { margin-top: 2.2rem; }

.detail.program { margin-top: 3.5rem; padding-left: 0; text-align: center; }
.detail.program + .detail { margin-top: 3.5rem; }

/* Programa: la botella sirve champán en el centro y los momentos del día van a los lados */
.timeline { position: relative; list-style: none; margin: 1.2rem 0 -1rem; padding: 0; height: clamp(33rem, 150cqw, 40rem); }
.tl-pour-wrap { position: static; }
.tl-pour { position: absolute; top: 0; left: 50%; height: 100%; width: auto; transform: translateX(-46.5%); opacity: .9; pointer-events: none; }
.tl-item { text-align: left; position: absolute; display: flex; align-items: center; gap: .55rem; max-width: calc(50% - 1rem); }
.tl-left { right: calc(53.5% + .9rem); width: calc(46.5% - 1.4rem); }
.tl-right { left: calc(46.5% + 2rem); }
.tl-1 { top: 11%; }
.tl-2 { top: 22.5%; }
.tl-3 { top: 34%; }
.tl-4 { top: 45.5%; }
/* Iconos en el mismo verde que el champán: el WebP con transparencia hace de máscara */
.tl-icon { flex: none; display: block; width: clamp(2.2rem, 9.5cqw, 2.7rem); aspect-ratio: 217 / 192; background: #7f9479; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.tl-1 .tl-icon { -webkit-mask-image: url("../img/rings.webp"); mask-image: url("../img/rings.webp"); }
.tl-2 .tl-icon { -webkit-mask-image: url("../img/cocktail.webp"); mask-image: url("../img/cocktail.webp"); transform: scale(1.45); }
.tl-3 .tl-icon { -webkit-mask-image: url("../img/drinks.webp"); mask-image: url("../img/drinks.webp"); }
.tl-4 .tl-icon { -webkit-mask-image: url("../img/party.webp"); mask-image: url("../img/party.webp"); }
.tl-item .tl-time { margin: .15rem 0 0; font-family: var(--text); font-size: .82rem; color: var(--doodle); }
.tl-item .tl-note { margin: .2rem 0 0; font-family: var(--text); font-size: .74rem; line-height: 1.35; color: var(--muted); }
.tl-item h4 { margin: 0; font-size: clamp(1.05rem, 4.6cqw, 1.35rem); font-weight: 400; line-height: 1.1; letter-spacing: .04em; }
/* Al aparecer en pantalla, el champán cae de arriba abajo y los momentos salen uno tras otro */
html.doodles .tl-pour { clip-path: inset(0 0 100% 0); transition: clip-path 2.6s cubic-bezier(.5, 0, .3, 1); }
html.doodles .timeline.drawn .tl-pour { clip-path: inset(0 0 0 0); }
html.doodles .tl-item { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
html.doodles .timeline.drawn .tl-item { opacity: 1; transform: none; }
html.doodles .timeline.drawn .tl-1 { transition-delay: .5s; }
html.doodles .timeline.drawn .tl-2 { transition-delay: 1.1s; }
html.doodles .timeline.drawn .tl-3 { transition-delay: 1.7s; }
html.doodles .timeline.drawn .tl-4 { transition-delay: 2.3s; }
.palette-note { margin-top: .5rem; font-size: .85rem; font-style: italic; color: var(--muted); }
.palette-label { margin-top: 1rem; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.swatches { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; max-width: 330px; }
.swatches li { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 0; font-size: .7rem; font-style: italic; line-height: 1.2; color: var(--muted); text-align: center; white-space: nowrap; }
.swatch {
  display: block; width: 100%; max-width: 54px; aspect-ratio: 1;
  border-radius: 48% 52% 50% 50% / 53% 47% 53% 47%;
  background: url("../img/paper.webp") center / 180px, var(--c);
  background-blend-mode: soft-light;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 12px -8px rgba(0, 0, 0, .45);
}
.swatches li:nth-child(even) .swatch { border-radius: 52% 48% 47% 53% / 48% 53% 47% 52%; transform: rotate(8deg); }
.select { user-select: all; white-space: nowrap; }

/* ---------------- Formulario ---------------- */
form { width: 100%; display: flex; flex-direction: column; gap: 1.2rem; text-align: left; }
/* Sección de confirmación: fondo crema propio, mucho aire y el formulario en una
   tarjeta blanca con doble filo, como la papelería de la invitación */
.band.rsvp { background: #f7f4ec; padding-block: 6.5rem 7rem; }
.band.rsvp .stack { gap: 1.8rem; }
.band.rsvp .underlined { margin-bottom: 1rem; }
.rsvp form, .rsvp .thanks {
  background: var(--white);
  padding: 3rem clamp(1.4rem, 7cqw, 2.6rem) 2.8rem;
  border: 1px solid var(--sage-light);
  box-shadow: inset 0 0 0 7px var(--white), inset 0 0 0 8px #e3e7dd, 0 24px 50px -36px rgba(47, 61, 42, .35);
}
.rsvp form { gap: 2rem; }
.rsvp .thanks { width: 100%; padding-block: 3.5rem; }
.rsvp .submit-note { left: calc(100% - 3.3rem); top: -3.6rem; }
.rsvp .submit-arrow { left: calc(100% - 5.6rem); top: -2.3rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > label, legend { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
input[type="text"], select, textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 0; border-bottom: 1px solid var(--sage); border-radius: 0;
  padding: .55rem .2rem; width: 100%;
}
textarea { border: 1px solid var(--sage); padding: .6rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
legend { margin-bottom: .5rem; }
.radio { display: flex; align-items: center; gap: .5rem; }
.radio input { accent-color: var(--sage-deep); width: 1.05rem; height: 1.05rem; }
/* dos botones en fila; la nota "¡aquí!" y la flecha señalan "Confirmar" desde la derecha */
.submit-row { position: relative; align-self: center; margin-top: 2.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.submit-row .btn { padding: .95rem 1.2rem; letter-spacing: .16em; }
.submit-note { position: absolute; left: calc(100% - .4rem); top: -2.5rem; transform: rotate(8deg); white-space: nowrap; }
.submit-arrow { position: absolute; left: calc(100% - 2.6rem); top: -1.5rem; width: 3.6rem; height: auto; aspect-ratio: 112 / 70; transform: scaleX(-1) rotate(4deg); }
.btn:disabled { opacity: .55; cursor: wait; }
.form-status { text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: #8a3b2e; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; padding-block: 1rem; }
.thanks-heart { width: 2.6rem; height: 2.6rem; }
.thanks-title { font-size: 2.6rem; }
.error { color: #8a3b2e; font-size: .9rem; }
.reply { display: flex; flex-direction: column; gap: .8rem; }
.reply pre { margin: 0; white-space: pre-wrap; font-family: var(--text); font-size: .95rem; background: var(--soft); border: 1px dashed var(--sage); padding: 1rem; user-select: all; }

.footer-note { max-width: 30rem; font-style: italic; font-size: 1.05rem; line-height: 1.7; color: #e3e8de; text-wrap: balance; }
.footer-rule { width: 3rem; height: 1px; background: var(--gold); opacity: .8; }
.footer-names { font-size: clamp(2.4rem, 10cqw, 3.2rem); line-height: 1.1; }

/* ---------------- Animaciones al hacer scroll ----------------
   js/main.js añade .rv a cada bloque de las secciones y .in cuando entra en pantalla.
   Sin JS (o con "reducir movimiento") no se añade html.reveal y todo se ve quieto. */
html.reveal .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rv-delay, 0ms); }
html.reveal .rv.in { opacity: 1; transform: none; }
/* la acuarela solo sube y aparece, sin girar: mantiene su leve inclinación todo el tiempo */
html.reveal .location-img.rv { transform: translateY(28px) rotate(-2deg); }
html.reveal .location-img.rv.in { transform: rotate(-2deg); }
/* grupos que aparecen de uno en uno (cuenta regresiva, colores) */
html.reveal .stagger > * { opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .6s ease, transform .7s cubic-bezier(.3, 1.4, .5, 1); transition-delay: calc(var(--rv-delay, 0ms) + var(--i, 0) * 110ms + 250ms); }
html.reveal .stagger.in > *, html.reveal .in .stagger > * { opacity: 1; transform: none; }
/* la rama de olivo de Los Detalles se mece despacio */
@keyframes sway { 0%, 100% { transform: scaleX(-1) scaleY(-1) rotate(0deg); } 50% { transform: scaleX(-1) scaleY(-1) rotate(2.5deg); } }
html.reveal .details-branch { transform-origin: 85% 0; animation: sway 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .env-flap, .env-pocket, .env-inside, .portico, .seal, .seal-btn { transition: none; }
  html.doodles .doodle { stroke-dashoffset: 0; transition: none; }
  html.doodles .tl-pour, html.doodles .tl-item { clip-path: none; opacity: 1; transform: none; transition: none; }
  .love-row { animation: none !important; }
}
