/* Layout: una película en escenas — portada en formato cine (letterbox) sobre la foto,
   luego escenas en papel de lino con marcos finos y ramas de olivo, una banda oscura
   para la cuenta regresiva y créditos finales sobre fondo espresso.
   Diseño de un solo tono, deliberado (no cambia con el modo oscuro del sistema). */
:root {
  color-scheme: light;
  /* Color */
  --espresso: #251a2e;      /* ciruela profunda (fondos oscuros) */
  --espresso-2: #32243d;
  --umber: #3b2948;         /* violeta oscuro (texto) */
  --umber-soft: #6d5a7c;
  --linen: #f6f0f8;         /* blanco lila */
  --paper: #ece2f1;         /* papel lavanda */
  --sand: #d3c0e2;          /* lila claro sobre oscuro */
  --olive: #82689a;         /* lila medio (etiquetas, ramas) */
  --olive-soft: #b9a3cd;    /* lavanda suave */
  --clay: #9a6a9b;          /* malva */
  --bronze: #a78ab9;
  --line: rgba(59, 41, 72, .26);
  --line-dark: rgba(246, 240, 248, .22);
  /* Type */
  --f-display: "Cormorant Garamond", "Cormorant", "Garamond", "Times New Roman", serif;
  --f-caps: "Marcellus SC", "Marcellus", "Trajan Pro", "Optima", "Palatino", serif;
  --f-body: "EB Garamond", "Garamond", "Georgia", "Times New Roman", serif;
  /* Movimiento */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-film: cubic-bezier(.65, 0, .35, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--umber);
  font-family: var(--f-body);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Grano de película (sutil, sobre fondos) ---------- */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .34  0 0 0 0 .48  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .14;
  mix-blend-mode: multiply;
}
.grain--light { mix-blend-mode: screen; opacity: .08; }

/* =========================================================
   PORTADA
   ========================================================= */
.cover {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  background: var(--espresso);
  overflow: hidden;
  isolation: isolate;
}

.cover__frame {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  container-type: inline-size;
}
/* Pantallas más anchas que la foto: la foto completa al centro, como un cuadro. */
@media (min-aspect-ratio: 2/3) {
  .cover__frame {
    left: 50%;
    right: auto;
    width: calc(100svh * 2 / 3);
    max-width: 100%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(246, 240, 248, .08), 0 40px 120px rgba(0, 0, 0, .55);
  }
}

.cover__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.12);
  transition: transform 6s var(--ease) .5s;
}
.is-open .cover__photo { transform: scale(1); }

/* Sombras solo en los bordes (cielo y rocas); la protagonista queda limpia. */
.cover__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(37, 26, 46, .62) 0%, rgba(37, 26, 46, .28) 22%, rgba(37, 26, 46, 0) 40%),
    linear-gradient(to top, rgba(37, 26, 46, .78) 0%, rgba(37, 26, 46, .35) 14%, rgba(37, 26, 46, 0) 27%);
}
.cover__frame .grain { opacity: .1; mix-blend-mode: soft-light; }

/* Ramas de olivo a los costados (solo en pantallas anchas) */
.cover__side {
  position: absolute; top: 50%; width: min(26vw, 340px); height: auto;
  color: var(--olive-soft); opacity: 0; pointer-events: none;
  display: none;
}
@media (min-aspect-ratio: 1/1) {
  .cover__side { display: block; animation: fadeTo35 2.4s var(--ease) 1.4s forwards, sway 9s ease-in-out infinite alternate; }
  .cover__side--r { animation-delay: 1.4s, -4.5s; }
  .cover__side--l { left: 2vw; transform: translateY(-50%) rotate(-62deg); }
  .cover__side--r { right: 2vw; transform: translateY(-50%) scaleX(-1) rotate(-62deg); }
}
@keyframes fadeTo35 { to { opacity: .35; } }

/* Títulos dentro del cielo */
.cover__titles {
  position: absolute;
  left: 0; right: 0;
  top: 12.5%;
  text-align: center;
  color: var(--linen);
  padding-inline: 1rem;
  z-index: 2;
}
.cover__date {
  margin: 0 0 .9em;
  font-family: var(--f-caps);
  font-size: .78rem;
  font-size: clamp(.72rem, 3.2cqw, 1rem);
  letter-spacing: .42em;
  padding-left: .42em;
  opacity: 0;
}
.is-open .cover__date { animation: fadeUp 1.6s var(--ease) 1.5s forwards; }
.title { margin: 0; font-weight: 300; line-height: 1; }
.title__name {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: 5.5rem;
  font-size: clamp(4rem, 25cqw, 11rem);
  letter-spacing: -.005em;
  line-height: .9;
  text-shadow: 0 2px 30px rgba(37, 26, 46, .35);
}
.title__name .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.18em);
  filter: blur(6px);
}
@keyframes letterIn { to { opacity: 1; transform: none; filter: blur(0); } }
.title__sub {
  display: flex; align-items: center; justify-content: center; gap: .9em;
  margin-top: .55em;
  font-family: var(--f-caps);
  font-size: 1rem;
  font-size: clamp(.9rem, 4.6cqw, 1.7rem);
  letter-spacing: .5em;
  padding-left: .5em;
  opacity: 0;
}
.is-open .title__sub { animation: fadeUp 1.6s var(--ease) 2.5s forwards; }
.title__sub::before, .title__sub::after {
  content: ""; width: 2.2em; height: 1px; background: currentColor; opacity: .6;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Barras de cine: cubren toda la foto y se abren hacia arriba y abajo */
.bars { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bar {
  position: absolute; left: 0; right: 0;
  background: var(--espresso);
  transition: transform 2.2s var(--ease-film) .55s;
}
.bar--top { top: 0; height: 50.5%; transform-origin: top; }
.bar--bottom { bottom: 0; height: 50%; transform-origin: bottom; }
.bar .grain { mix-blend-mode: screen; opacity: .06; }
/* Hilo de luz donde se juntan las barras, que se abre al iniciar */
.bars::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(246, 240, 248, .55), transparent);
  transform: scaleX(.1); opacity: 0;
}
@keyframes seam { 0% { opacity: 0; transform: scaleX(.1); } 30% { opacity: .85; } 100% { opacity: 0; transform: scaleX(1); } }
.is-open .bar { transform: scaleY(0); }
.is-open .bars::after { animation: seam 1.6s var(--ease) .2s; }

/* Telón de entrada: leyenda + botón */
.curtain {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.1rem;
  padding: 2rem max(20px, env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  text-align: center; color: var(--linen);
  transition: opacity .7s var(--ease), transform .9s var(--ease), visibility 0s linear .9s;
}
.curtain > * { opacity: 0; animation: fadeUp 1.8s var(--ease) forwards; }
.curtain__sprig { width: 112px; height: auto; color: var(--olive-soft); animation-delay: .3s; }
.curtain__sprig .tallo { stroke: currentColor; stroke-width: 1; fill: none; }
.curtain__sprig .hoja { fill: currentColor; opacity: .85; }
.curtain__sprig .hoja.h2 { opacity: .55; }
.curtain__sprig .nervio { display: none; }
.curtain__sprig .oliva { fill: var(--sand); opacity: .8; }
.curtain__name {
  margin: 0 0 -.4rem;
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1;
  color: var(--sand);
  animation-delay: .55s;
}
.curtain__title {
  margin: 0;
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(2.9rem, 13vw, 4.8rem); line-height: 1;
  animation-delay: .85s;
}
.curtain__date {
  margin: 0; font-family: var(--f-caps); font-size: .8rem; letter-spacing: .42em; padding-left: .42em;
  color: var(--sand); animation-delay: 1.1s;
}
.curtain__rule { width: 1px; height: 2.6rem; background: linear-gradient(transparent, rgba(246, 240, 248, .45), transparent); animation-delay: 1.4s; }
.curtain .btn-open { animation-delay: 1.7s; }
.curtain .cover__hint { animation-delay: 2s; margin-top: -.3rem; }
.is-open .curtain { opacity: 0; transform: scale(.98); visibility: hidden; }

.btn-open {
  position: relative;
  appearance: none; cursor: pointer;
  border: 1px solid rgba(246, 240, 248, .7);
  background: rgba(37, 26, 46, .32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--linen);
  font-family: var(--f-caps);
  font-size: .92rem;
  letter-spacing: .32em;
  padding: .95em 2.2em .95em 2.52em;
  border-radius: 999px;
  transition: background .5s var(--ease), border-color .5s var(--ease), letter-spacing .6s var(--ease);
}
.btn-open::after {
  content: ""; position: absolute; inset: -6px; border-radius: inherit;
  border: 1px solid rgba(246, 240, 248, .28);
  animation: halo 3.2s var(--ease) infinite;
}
@keyframes halo { 0% { opacity: .9; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.12); } }
.btn-open:hover { background: rgba(246, 240, 248, .14); letter-spacing: .36em; }
.btn-open:focus-visible { outline: 2px solid var(--linen); outline-offset: 6px; }
.cover__hint {
  margin: 0; color: rgba(246, 240, 248, .78);
  font-family: var(--f-body); font-style: italic; font-size: .95rem;
  display: flex; align-items: center; gap: .45em;
}
.cover__hint svg { width: 15px; height: 15px; }

/* Indicador para deslizar */
.cover__scroll {
  position: absolute; left: 50%; bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--linen); text-decoration: none;
  font-family: var(--f-caps); font-size: .72rem; letter-spacing: .4em; padding-left: .4em;
  opacity: 0; visibility: hidden; z-index: 4;
  transition: opacity 1.2s var(--ease) 1.2s;
}
.cover__scroll span.line {
  width: 1px; height: 42px; background: linear-gradient(var(--linen), transparent);
  transform-origin: top; animation: drip 2.4s var(--ease) infinite;
}
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.is-open .cover__scroll { opacity: .9; visibility: visible; }
.cover__scroll:focus-visible { outline: 1px solid var(--linen); outline-offset: 6px; }

/* =========================================================
   ESCENAS
   ========================================================= */
.scene {
  position: relative;
  padding-block: clamp(4.5rem, 14vw, 8rem);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  text-align: center;
}
.scene__inner { position: relative; max-width: 34rem; margin-inline: auto; }

.eyebrow {
  margin: 0 0 1.4rem;
  font-family: var(--f-caps);
  font-size: .8rem;
  letter-spacing: .38em;
  padding-left: .38em;
  color: var(--olive);
}
.h2 {
  margin: 0 0 1.2rem;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 8.5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.005em;
  text-wrap: balance;
  color: var(--umber);
}
.h2 em { font-style: italic; font-weight: 300; }
.lead {
  margin: 0 auto;
  max-width: 29rem;
  color: var(--umber-soft);
  text-wrap: pretty;
}

.olive {
  display: block; margin: 0 auto 1.6rem;
  width: 150px; height: auto; color: var(--olive);
}
.olive .tallo { stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.olive .hoja { fill: currentColor; opacity: .82; }
.olive .hoja.h2 { opacity: .55; }
.olive .nervio { stroke: var(--paper); stroke-width: .5; opacity: .5; fill: none; }
.olive .oliva { fill: var(--umber); opacity: .78; }
.olive--pair { display: flex; justify-content: center; gap: 0; margin-bottom: 1.6rem; }
.olive--pair svg { width: 110px; height: auto; color: var(--olive); }
.olive--pair .olive { margin: 0; }

/* Dibujo de rama al aparecer */
.reveal .olive .tallo, .reveal.olive .tallo { stroke-dasharray: 300; stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease) .2s; }
.reveal.is-pending .olive .tallo, .reveal.is-pending.olive .tallo { stroke-dashoffset: 300; }

/* Escena de apertura */
.scene--intro { background: var(--linen); }
.scene--intro .grain { opacity: .1; }
.intro__quote {
  margin: 0 0 1.4rem;
  font-family: var(--f-display);
  font-style: italic; font-weight: 300;
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  line-height: 1.12;
  text-wrap: balance;
  color: var(--umber);
}
.intro__sign {
  margin: 2rem 0 0; font-family: var(--f-display); font-style: italic;
  font-size: 1.7rem; color: var(--clay);
}

/* ---------- Cuenta regresiva (banda oscura) ---------- */
.scene--count {
  background: var(--espresso);
  color: var(--linen);
  overflow: hidden;
}
.scene--count .grain { mix-blend-mode: screen; opacity: .07; }
.scene--count .eyebrow { color: var(--olive-soft); }
.scene--count .h2 { color: var(--linen); }

/* perforaciones de película */
.film-edge {
  position: absolute; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(circle at 50% 50%, rgba(246, 240, 248, .13) 0 3.2px, transparent 3.7px);
  background-size: 22px 14px;
  opacity: .9;
}
.film-edge--t { top: 14px; }
.film-edge--b { bottom: 14px; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2.2rem auto 1.8rem;
  max-width: 30rem;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.countdown__cell {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 1.3rem .2rem 1.1rem;
  min-width: 0;
}
.countdown__cell + .countdown__cell { border-left: 1px solid var(--line-dark); }
.countdown__num {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 11vw, 3.8rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--linen);
}
.countdown__num.tick { animation: tick .6s var(--ease); }
@keyframes tick { from { opacity: .35; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.countdown__lbl {
  font-family: var(--f-caps);
  font-size: .68rem;
  letter-spacing: .26em;
  padding-left: .26em;
  color: var(--sand);
}
.countdown__when {
  margin: 0; color: var(--sand); font-style: italic;
}
.countdown__done {
  margin: 2rem 0 1.4rem; font-family: var(--f-display); font-style: italic;
  font-size: clamp(2rem, 8vw, 3rem); color: var(--linen);
}

/* ---------- Marco delicado ---------- */
.frame {
  position: relative;
  padding: clamp(2.6rem, 9vw, 3.6rem) clamp(1.3rem, 6vw, 3rem);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--linen) 55%, transparent);
}
.frame::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.frame__corner {
  position: absolute; width: 74px; height: auto; color: var(--olive);
  pointer-events: none;
}
.frame__corner .tallo { stroke: currentColor; stroke-width: 1.3; fill: none; }
.frame__corner .hoja { fill: currentColor; opacity: .8; }
.frame__corner .hoja.h2 { opacity: .5; }
.frame__corner .nervio { display: none; }
.frame__corner .oliva { fill: var(--umber); opacity: .75; }
.frame__corner--tl { top: -14px; left: -10px; transform: rotate(-28deg); }
.frame__corner--br { bottom: -14px; right: -10px; transform: rotate(152deg); }

.info { display: grid; gap: 2.2rem; }
.info__block { display: grid; gap: .35rem; justify-items: center; }
.info__label {
  font-family: var(--f-caps); font-size: .78rem; letter-spacing: .36em; padding-left: .36em;
  color: var(--olive); margin-bottom: .5rem;
}
.info__big {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.1; color: var(--umber);
  text-wrap: balance;
}
.info__big em { font-style: italic; font-weight: 300; }
.info__text { color: var(--umber-soft); }
.info__note { font-style: italic; font-size: 1rem; color: var(--clay); }
.info__sep {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  color: var(--bronze);
}
.info__sep::before, .info__sep::after { content: ""; height: 1px; width: 56px; background: var(--line); }
.info__sep svg { width: 12px; height: 12px; }

/* ---------- Dress code ---------- */
.dress {
  margin: 3rem auto 0;
  display: inline-flex; align-items: center; gap: 1.1rem;
  padding: 1.1rem 1.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.dress[hidden] { display: none; }
.dress .info__label { display: block; margin-bottom: .2rem; }
.dress__text {
  margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.45rem, 5.6vw, 1.8rem); line-height: 1.1; color: var(--umber);
}
/* Muestra de color lila tachada */
.dress__swatch {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: #b38ed3;
  box-shadow: inset 0 0 0 3px var(--linen), 0 0 0 1px var(--line);
}
.dress__swatch::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 1.5px;
  background: var(--umber); transform: rotate(-45deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px;
  padding: .85em 1.8em;
  border-radius: 999px;
  border: 1px solid var(--umber);
  background: var(--umber);
  color: var(--linen);
  font-family: var(--f-caps);
  font-size: .86rem;
  letter-spacing: .2em;
  text-decoration: none;
  cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--espresso); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(37, 26, 46, .6); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; }
.btn--ghost { background: transparent; color: var(--umber); }
.btn--ghost:hover { background: var(--umber); color: var(--linen); }
.btn--olive { background: var(--olive); border-color: var(--olive); }
.btn--olive:hover { background: #6c5385; border-color: #6c5385; }
.btn[disabled] {
  cursor: not-allowed; background: transparent; color: var(--umber-soft);
  border-color: var(--line); border-style: dashed; transform: none; box-shadow: none;
}
.btn.is-done { background: var(--olive); border-color: var(--olive); color: var(--linen); }

/* ---------- Confirmación ---------- */
.scene--rsvp { background: var(--linen); }
.rsvp { margin-top: 2.2rem; display: grid; gap: 1.1rem; justify-items: center; }
.rsvp__field { width: 100%; text-align: left; }
.rsvp__label {
  display: block; margin-bottom: .55rem;
  font-family: var(--f-caps); font-size: .74rem; letter-spacing: .3em; color: var(--olive);
  text-align: center;
}
.rsvp__msg {
  width: 100%;
  min-height: 7.6rem;
  resize: vertical;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--umber);
  font-family: var(--f-body);
  font-size: 1.08rem;
  line-height: 1.5;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.rsvp__msg:focus { outline: none; border-color: var(--olive); background: #f9f5fb; box-shadow: 0 0 0 4px rgba(130, 104, 154, .16); }
.rsvp__small { margin: 0; font-size: .95rem; font-style: italic; color: var(--umber-soft); }
.rsvp__small span { white-space: nowrap; font-style: normal; font-variant-numeric: lining-nums; }

/* ---------- Regalos ---------- */
.scene--gift { background: var(--paper); }
.gift-icon { width: 64px; height: 64px; margin: 0 auto 1.4rem; color: var(--clay); }
.gift-icon .bow { transform-origin: 32px 22px; animation: bow 6s var(--ease) infinite; }
@keyframes bow { 0%, 80%, 100% { transform: rotate(0); } 86% { transform: rotate(-4deg); } 92% { transform: rotate(3deg); } }
.gift__msg {
  margin: 0 auto 2.2rem; max-width: 27rem;
  font-family: var(--f-display); font-size: clamp(1.45rem, 5.4vw, 1.75rem); line-height: 1.35;
  color: var(--umber); text-wrap: pretty;
}
.gift__msg strong { font-weight: 500; font-style: italic; }
.alias {
  position: relative;
  margin: 0 auto;
  max-width: 24rem;
  padding: 1.7rem 1.4rem 1.6rem;
  border: 1px solid var(--line);
  background: var(--linen);
  display: grid; gap: .5rem; justify-items: center;
}
.alias::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.alias__label { font-family: var(--f-caps); font-size: .72rem; letter-spacing: .36em; padding-left: .36em; color: var(--olive); }
.alias__value {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.55rem, 6.4vw, 2rem);
  color: var(--umber); letter-spacing: .02em;
  overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}
.alias__value.is-pending { font-style: italic; font-weight: 300; font-size: 1.35rem; color: var(--umber-soft); user-select: none; -webkit-user-select: none; }
.alias__holder { margin: 0; font-size: 1rem; color: var(--umber-soft); }
.alias .btn { margin-top: .9rem; position: relative; z-index: 1; }
.alias__status:empty { display: none; }
.alias__status { margin: .2rem 0 0; font-size: .95rem; font-style: italic; color: var(--olive); }

/* ---------- Créditos finales: una sola pantalla ---------- */
.credits {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.4rem, 4svh, 2.6rem);
  background: var(--espresso);
  color: var(--linen);
  text-align: center;
  padding-block: 0 calc(clamp(1.8rem, 5svh, 3.2rem) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  isolation: isolate;
}
.credits .grain { mix-blend-mode: screen; opacity: .07; z-index: 0; }
.credits .leaves { z-index: 3; }

/* Foto: en celular ocupa todo el ancho con un recorte vertical que la deja entera */
.credits__photo {
  position: relative; z-index: 1;
  margin: 0;
  width: 100%;
  height: min(125vw, calc(100svh - 21rem));
  min-height: 300px;
  overflow: hidden;
}
.credits__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 56% 50%;
  transform: scale(1.04);
  transition: transform 6s var(--ease);
}
.credits__photo:not(.is-pending) img { transform: scale(1); }
/* Sombras solo en el cielo (para leer el texto) y un fundido mínimo abajo */
.credits__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(37, 26, 46, .55) 0%, rgba(37, 26, 46, .18) 16%, rgba(37, 26, 46, 0) 24%),
    linear-gradient(to top, var(--espresso) 0%, rgba(37, 26, 46, 0) 7%);
}
.credits__thanks {
  position: absolute; left: 0; right: 0; top: 4.5%;
  margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
  max-width: 24rem;
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.55rem, 6.4vw, 2.5rem); line-height: 1.15; text-wrap: balance;
  color: var(--linen);
  text-shadow: 0 1px 18px rgba(37, 26, 46, .45);
}

.credits__text {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.credits__name {
  margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(3rem, 13vw, 4.6rem); line-height: 1;
}
.credits__meta {
  margin: .7rem 0 0; font-family: var(--f-caps); font-size: .78rem; letter-spacing: .42em; padding-left: .42em;
  color: var(--sand);
}
.credits .olive.credits__sprig { color: var(--olive-soft); width: 84px; margin: 1.1rem auto 0; }
.credits .olive .oliva { fill: var(--sand); }
.credits .olive .nervio { stroke: var(--espresso); }
.director {
  margin: 1rem auto 0;
  padding-top: .9rem;
  width: min(100%, 15rem);
  border-top: 1px solid var(--line-dark);
  display: grid; gap: .2rem;
}
.director__name {
  font-family: var(--f-caps); font-size: .86rem; letter-spacing: .3em; padding-left: .3em;
  color: var(--linen);
}
.director__role { font-family: var(--f-body); font-style: italic; font-size: .9rem; color: var(--sand); }

/* Pantallas anchas: la foto completa, enmarcada como un fotograma */
@media (min-width: 700px) {
  .credits { padding-top: clamp(1.6rem, 5svh, 3rem); }
  .credits__photo {
    width: min(calc(100% - 40px), calc((100svh - 25rem) * 1.5), 68rem);
    height: auto;
    aspect-ratio: 3 / 2;
    min-height: 0;
    max-width: 100%;
    box-shadow: 0 0 0 1px rgba(246, 240, 248, .14), 0 30px 90px -30px rgba(0, 0, 0, .8);
  }
  .credits__photo::after {
    content: ""; position: absolute; inset: 9px; pointer-events: none;
    border: 1px solid rgba(246, 240, 248, .35);
  }
  .credits__shade { background: linear-gradient(to bottom, rgba(37, 26, 46, .5) 0%, rgba(37, 26, 46, .15) 15%, rgba(37, 26, 46, 0) 23%); }
  .credits__thanks { max-width: 34rem; top: 6%; font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
}

/* ---------- Control de música ---------- */
.music {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(246, 240, 248, .45);
  background: rgba(37, 26, 46, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--linen);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 26px -10px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(14px) scale(.9);
  transition: opacity .8s var(--ease), transform .8s var(--ease), background .3s;
  -webkit-tap-highlight-color: transparent;
}
.music.is-visible { opacity: 1; transform: none; }
.music:hover { background: rgba(37, 26, 46, .9); }
.music:focus-visible { outline: 2px solid var(--linen); outline-offset: 3px; }
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music__bars i { display: block; width: 2.5px; height: 4px; background: currentColor; border-radius: 1px; }
.music.is-playing .music__bars i { animation: eq 1.1s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: -.4s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: -.75s; }
.music.is-playing .music__bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.music__slash { position: absolute; width: 26px; height: 1.5px; background: currentColor; transform: rotate(-45deg); opacity: 0; transition: opacity .3s; }
.music:not(.is-playing) .music__slash { opacity: .85; }
.music__tip {
  position: absolute; right: calc(100% + 10px); white-space: nowrap;
  font-family: var(--f-caps); font-size: .68rem; letter-spacing: .22em;
  background: rgba(37, 26, 46, .78); color: var(--linen); padding: .45em .9em; border-radius: 999px;
  opacity: 0; transform: translateX(6px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.music.show-tip .music__tip { opacity: 1; transform: none; }

/* ---------- Apariciones al desplazarse ---------- */
.reveal { transition: opacity 1.3s var(--ease), transform 1.3s var(--ease), filter 1.3s var(--ease); }
.reveal.is-pending { opacity: 0; transform: translateY(26px); filter: blur(4px); }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
.reveal.d3 { transition-delay: .36s; }

@media (min-width: 720px) {
  body { font-size: 1.25rem; }
  .info { grid-template-columns: 1fr auto 1fr; align-items: start; gap: 1.6rem; }
  .info__sep { flex-direction: column; height: 100%; }
  .info__sep::before, .info__sep::after { width: 1px; height: 56px; }
}

@media (max-width: 380px) {
  .countdown__lbl { letter-spacing: .14em; padding-left: .14em; font-size: .62rem; }
  .btn { letter-spacing: .14em; padding-inline: 1.3em; }
  .btn-open { letter-spacing: .24em; padding-inline: 1.8em 1.6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .cover__photo, .title__name .ch, .cover__date, .title__sub, .curtain > * { opacity: 1; transform: none; filter: none; }
  .reveal.is-pending { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}

.cover__side .tallo { stroke: currentColor; stroke-width: .9; fill: none; }
.cover__side .hoja { fill: currentColor; }
.cover__side .nervio { display: none; }
.cover__side .oliva { fill: var(--sand); }


/* =========================================================
   MOVIMIENTO AMBIENTAL (solo transform y opacidad: liviano)
   ========================================================= */

/* Ramas que se mecen con la brisa, cada una a su ritmo */
@keyframes sway { from { rotate: -2.4deg; } to { rotate: 2.4deg; } }
.olive { transform-origin: 2.5% 71%; animation: sway 6.5s ease-in-out infinite alternate; }
.olive--flip { transform-origin: 97.5% 71%; animation-duration: 7.3s; animation-delay: -2s; }
.frame__corner { transform-origin: 2.5% 71%; animation: sway 8s ease-in-out infinite alternate; }
.frame__corner--br { animation-delay: -3.5s; animation-duration: 9s; }
.credits .olive { animation-duration: 9s; }
.scene--rsvp .olive { animation-delay: -1.2s; }

/* Hojas de olivo que caen despacio */
.leaves { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.leaf {
  position: absolute; top: 0; left: var(--x);
  width: var(--s); color: #ddcdea;
  opacity: 0;
  will-change: transform, opacity;
  animation: fall var(--d) linear var(--delay) infinite;
}
.leaves--dark .leaf { color: var(--olive-soft); }
.leaf svg { display: block; width: 100%; height: auto; animation: flutter var(--f) ease-in-out infinite alternate; }
.leaf .rib { stroke: rgba(37, 26, 46, .35); stroke-width: .6; fill: none; }
@keyframes fall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: var(--o); }
  88%  { opacity: var(--o); }
  100% { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--r)); opacity: 0; }
}
@keyframes flutter {
  from { transform: rotate(-28deg) scaleX(1); }
  to   { transform: rotate(32deg) scaleX(.5); }
}

/* "Delfina": las letras respiran en una ola muy suave */
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.04em; } }
.is-open .title__name .ch { animation: letterIn 1.5s var(--ease) forwards, floatY 6s ease-in-out infinite; }

/* Líneas de "15 AÑOS" que se estiran y recogen */
.title__sub::before { transform-origin: right center; animation: breathe 4.8s ease-in-out infinite alternate; }
.title__sub::after  { transform-origin: left center;  animation: breathe 4.8s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scaleX(.45); opacity: .3; } to { transform: scaleX(1); opacity: .7; } }

/* Palabras en cursiva que flotan */
@keyframes drift { from { translate: 0 0; } to { translate: 0 -5px; } }
.h2 em { display: inline-block; animation: drift 5.5s ease-in-out infinite alternate; }
.intro__sign { animation: drift 6s ease-in-out infinite alternate; }

/* Frases que aparecen palabra por palabra */
[data-words] .w {
  display: inline-block;
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--i) * 85ms + .1s);
}
.reveal.is-pending[data-words] { opacity: 1; transform: none; filter: none; }
.reveal.is-pending[data-words] .w, .reveal.is-pending [data-words] .w { opacity: 0; transform: translateY(.45em); filter: blur(3px); }

/* Nombre final con un brillo cálido que va y viene */
@keyframes glow { from { text-shadow: 0 0 0 rgba(246, 240, 248, 0); } to { text-shadow: 0 0 30px rgba(246, 240, 248, .3); } }
.credits__name { animation: glow 5s ease-in-out infinite alternate; }

/* Detalles en íconos y botones */
@keyframes pin { 0%, 72%, 100% { translate: 0 0; } 82% { translate: 0 -3px; } 90% { translate: 0 0; } }
#btn-maps svg { animation: pin 3.6s ease-in-out infinite; }
.gift-icon { animation: drift 4.5s ease-in-out infinite alternate; }
.btn--olive { position: relative; }
.btn--olive::after {
  content: ""; position: absolute; inset: -5px; border-radius: inherit;
  border: 1px solid var(--olive); pointer-events: none;
  animation: halo 3.6s var(--ease) infinite;
}

/* Fuera de pantalla, todo se pausa: no gasta batería */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .leaves { display: none; }
  .reveal.is-pending[data-words] .w, .reveal.is-pending [data-words] .w { opacity: 1; transform: none; filter: none; }
}
