/* Héctor y Sara. Invitación de papel con relieve: carpeta con sello, marco en arco y pantallas que se suceden. */

@font-face { font-family: "Gilda Display"; src: url("fonts/gilda.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pinyon Script"; src: url("fonts/pinyon.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
  --page: #080d1a;        /* azul noche principal */
  --paper: #101a32;       /* azul noche secundario */
  --paper-hi: #172540;
  --deep: #060a14;        /* azul casi negro, para degradados */
  --ink: #f5f0e8;         /* marfil claro */
  --ink-soft: #efe6d6;    /* beige cálido */
  --muted: #cdc3b0;
  --gold: #c6a86b;        /* dorado */
  --gold-deep: #d5bb82;   /* el mismo dorado, aclarado para texto pequeño */
  --navy-ink: #080d1a;
  --line: rgba(198, 168, 107, 0.3);
  --line-strong: rgba(198, 168, 107, 0.68);
  --shadow: rgba(3, 6, 14, 0.5);
  --error: #ffab9c;

  --display: "Gilda Display", "Didot", Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --serif: "EB Garamond", Garamond, Georgia, serif;

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

  --m: 14px;      /* margen del marco */
  --pt: 96px;     /* hueco superior de la portada */
  --col: 680px;   /* ancho de la hoja en pantallas grandes */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; scrollbar-color: var(--gold) var(--page); accent-color: var(--gold-deep); caret-color: var(--gold-deep); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.hidden { position: absolute; left: -9999px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--navy-ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--page); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid var(--page); }

body.is-locked { overflow: hidden; }

/* grano de papel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: soft-light;
}

/* ───────── Fondo de mesa (pantallas grandes) ───────── */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; }
.flora { position: absolute; pointer-events: none; overflow: visible; }
.flora--bg-tl { top: -40px; left: -40px; width: min(40vw, 620px); height: auto; }
.flora--bg-br { bottom: -40px; right: -40px; width: min(40vw, 620px); height: auto; }
@media (min-width: 900px) { .backdrop { display: block; } }

/* ───────── La hoja ───────── */
.page {
  position: relative;
  z-index: 1;
  width: min(100%, var(--col));
  margin: 0 auto;
  background:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(238, 222, 176, 0.75), transparent),
    radial-gradient(1px 1px at 141px 92px, rgba(245, 240, 232, 0.55), transparent),
    radial-gradient(1.4px 1.4px at 88px 171px, rgba(238, 222, 176, 0.6), transparent),
    radial-gradient(1px 1px at 190px 15px, rgba(245, 240, 232, 0.45), transparent),
    radial-gradient(0.9px 0.9px at 60px 120px, rgba(245, 240, 232, 0.4), transparent),
    radial-gradient(1.1px 1.1px at 260px 210px, rgba(238, 222, 176, 0.5), transparent),
    radial-gradient(130% 46% at 50% 0%, #1a2748 0%, var(--paper) 62%) var(--paper);
  background-size: 210px 210px, 210px 210px, 210px 210px, 210px 210px, 170px 170px, 330px 330px, auto;
  overflow: hidden;
}
@media (min-width: 760px) {
  .page { margin: 28px auto; border-radius: 3px; box-shadow: 0 1px 2px rgba(3, 6, 14, 0.22), 0 30px 70px -28px rgba(3, 6, 14, 0.63); }
}

/* ───────── Barra fija ───────── */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; translate: 0 -100%; opacity: 0; transition: translate 360ms var(--ease-out), opacity 300ms ease; pointer-events: none; }
.topbar.is-on { translate: 0 0; opacity: 1; pointer-events: auto; }
.topbar__in {
  width: min(100%, var(--col));
  height: 58px;
  margin: 0 auto;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 26, 50, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__nav { display: none; gap: 22px; margin-left: auto; }
.topbar__nav a { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; }
.topbar__nav a:hover { color: var(--gold-deep); }
.topbar .pill { margin-left: auto; }
@media (min-width: 480px) { .topbar__nav { display: flex; } .topbar .pill { margin-left: 0; } }

/* ───────── Portada de la web ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--pt) + 8px) 40px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (min-width: 760px) { .hero { min-height: min(100svh, 920px); } }
.flora--tl { top: -10px; left: -14px; width: min(74%, 440px); height: auto; z-index: 2; }
.flora--br { bottom: -10px; right: -14px; width: min(70%, 420px); height: auto; z-index: 2; }
.hero__body { position: relative; z-index: 3; width: 100%; max-width: 420px; }
.hero__date { font-family: var(--display); font-size: clamp(1.25rem, 5vw, 1.55rem); color: var(--ink); margin-top: 18px; }
.hero .quote { margin-top: 8px; }

/* ───────── Secciones ───────── */
.sec {
  position: relative;
  padding: clamp(60px, 13vw, 104px) clamp(24px, 7vw, 64px);
  display: grid;
  justify-items: center;
  text-align: center;
}
.sec > * { position: relative; z-index: 1; }
.sec::before { content: ""; position: absolute; top: 0; left: 50%; width: min(46%, 220px); height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.sec::after { content: ""; position: absolute; top: -2px; left: 50%; width: 5px; height: 5px; translate: -50% 0; border-radius: 50%; background: var(--gold); }
.sec > .flora { position: absolute; z-index: 0; width: min(40%, 190px); height: auto; opacity: 0.85; }
.flora--sec-r { top: -64px; right: -10px; }
.flora--sec-l { top: -74px; left: -10px; }
.sec__title { margin-top: 64px; }
.sec--end { padding-bottom: 64px; }
.sec--end .quote { margin: 0 auto; }
.sec--end .rule { margin: 22px auto 20px; }

/* aparición suave al entrar en pantalla (no bloquea nada) */
.js .hero .a { opacity: 0; }
.js .hero .a.in { animation: rise 900ms var(--ease-out) calc(var(--d, 0) * 110ms) both; }

/* adornos que se dibujan al llegar */
.js .sec .rule::before, .js .sec .rule::after { transform: scaleX(0); transition: transform 900ms var(--ease-out) 150ms; }
.js .sec .rule::before { transform-origin: right center; }
.js .sec .rule::after { transform-origin: left center; }
.js .sec \.rule i { position: relative; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--gold); }
.js .sec .rule.in::before, .js .sec .rule.in::after { transform: none; }
.js .sec .rule.in i { opacity: 1; scale: 1; }
.js .sec > .flora { opacity: 0; transition: opacity 1400ms ease; }
.js .sec > .flora.in { opacity: 0.85; }
@keyframes rise {
  from { opacity: 0; filter: blur(8px); transform: translateY(14px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

/* ───────── Tipos ───────── */
.names-big {
  font-family: var(--display);
  font-size: clamp(3.2rem, min(17vw, 9.5vh), 5.4rem);
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: 0.005em;
  margin: clamp(14px, 3vh, 26px) 0;
}
.names-big > span { display: block; }
.script { font-family: var(--script); color: var(--gold); font-size: 0.5em; line-height: 0.9; }
.names-big .script { margin: 0.02em 0 0.1em; line-height: 0.8; }
.names-big .nm { display: flex; align-items: center; justify-content: center; gap: 0.2em; }
.names-big .nm .cn { width: 1.25em; }
.names-inline { font-family: var(--display); font-size: clamp(1.8rem, 7.4vw, 2.3rem); line-height: 1.1; color: var(--ink); }
.names-inline .script { font-size: 0.8em; padding: 0 0.08em; }
.names-inline--big { font-size: clamp(1.8rem, 7.6vw, 3.1rem); margin: 6px 0 10px; }
.names-inline--big .cn { width: 1.55em; }
.label {
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 14px 0;
}
.label--strong { font-size: 0.95rem; letter-spacing: 0.24em; color: var(--ink); margin: 18px 0 6px; }
.lead { font-size: clamp(1.1rem, 4.6vw, 1.28rem); line-height: 1.5; color: var(--ink); margin: 8px auto; max-width: 30ch; }
.lead--soft { color: var(--ink-soft); font-style: italic; }
.lead--place { font-family: var(--display); font-size: 1.5rem; color: var(--ink); margin-top: 18px; }
.lead--small { font-size: 1.02rem; color: var(--ink-soft); }
.quote { font-style: italic; font-size: clamp(1.1rem, 4.6vw, 1.3rem); line-height: 1.45; color: var(--ink-soft); max-width: 28ch; margin: 18px auto 0; }
.display { font-family: var(--display); font-size: clamp(2.4rem, 11vw, 3.2rem); line-height: 1.05; color: var(--ink); margin: 18px 0 6px; }

/* adorno: línea con rombo */
.rule { display: flex; align-items: center; gap: 10px; width: 70%; margin: 0 auto; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.rule i { position: relative; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--gold); }
.rule--short { width: 40%; margin: 12px auto; }

/* ───────── Títulos y fecha (sin marcos) ───────── */
.heading { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.1; color: var(--ink); }
.heading::after { content: ""; display: block; width: 44px; height: 1px; margin: 16px auto 0; background: var(--line-strong); }
.datebig { display: grid; justify-items: center; margin: 0 0 6px; }
.datebig__day { font-family: var(--display); font-size: clamp(6.2rem, 31vw, 9rem); line-height: 0.88; color: var(--ink); }
.datebig__month { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-left: 0.42em; font-size: 0.95rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold-deep); }
.datebig__month::before, .datebig__month::after { content: ""; width: 34px; height: 1px; background: var(--line-strong); }
.datebig__year { margin-top: 8px; padding-left: 0.4em; font-size: 0.92rem; letter-spacing: 0.4em; color: var(--ink-soft); }
.when { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.when span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 16px; vertical-align: 2px; border-radius: 50%; background: var(--gold); }

/* ───────── Programa ───────── */
.timeline { display: grid; justify-items: center; gap: 2px; margin-top: 22px; }
.tl-item { display: grid; justify-items: center; gap: 2px; }
.tl-time { font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.tl-title { font-family: var(--display); font-size: clamp(1.8rem, 8vw, 2.2rem); line-height: 1.15; color: var(--ink); }
.tl-place { font-size: 1.08rem; color: var(--ink-soft); font-style: italic; }
.tl-place--set { font-style: normal; color: var(--ink); }
.tl-addr { font-size: 0.92rem; color: var(--muted); max-width: 30ch; }
.tl-venue { display: grid; justify-items: center; gap: 4px; }
.tl-venue__note { font-style: italic; font-size: 1.02rem; color: var(--muted); margin-bottom: 6px; }
.tl-venue__name { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.1; color: var(--ink); }
.tl-venue .pill { margin-top: 14px; }
.tl-sep { position: relative; width: 2px; height: 74px; margin: 16px 0; background: repeating-linear-gradient(to bottom, var(--line-strong) 0 2px, transparent 2px 7px); }
.tl-sep::before { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; translate: -50% -50%; border-radius: 50%; background: var(--gold); }

/* ───────── Cuenta atrás ───────── */
.countbox { margin-top: 48px; padding: 8px 0; }
.countbox .label { margin: 0 0 12px; }
.count__row { display: flex; justify-content: center; align-items: flex-start; gap: clamp(6px, 2.4vw, 16px); }
.count__row p { display: grid; justify-items: center; min-width: 48px; }
.count__row strong { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 10vw, 3rem); line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.count__row span { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding-left: 0.22em; margin-top: 4px; }
.count__row i { font-style: normal; font-family: var(--display); font-size: 1.6rem; color: var(--gold); line-height: 1.6; }

/* ───────── Botones de papel ───────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--paper-hi), #0e172c);
  color: var(--gold-deep);
  font: 500 0.76rem/1 var(--serif);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(245, 236, 215, 0.14), 0 4px 12px -4px rgba(3, 6, 14, 0.6);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, opacity 200ms ease, border-color 200ms ease;
}
.pill:active { transform: scale(0.97); box-shadow: inset 0 1px 3px rgba(3, 6, 14, 0.5); }
@media (hover: hover) and (pointer: fine) { .pill:hover { border-color: var(--gold); box-shadow: inset 0 1px 0 rgba(245, 236, 215, 0.14), 0 8px 18px -8px rgba(3, 6, 14, 0.8); } }
.pill.is-off { opacity: 0.55; pointer-events: none; box-shadow: none; }
.pill--small { padding: 11px 16px; font-size: 0.72rem; letter-spacing: 0.16em; }
.pill__arrow { display: inline-block; font-family: var(--serif); letter-spacing: 0; font-size: 0.95rem; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(3px); } }

/* ───────── Formulario ───────── */
.rsvp { margin-top: 22px; width: 100%; max-width: 420px; text-align: center; }
.field { margin-bottom: 22px; }
label, .field__label { display: block; font-size: 1rem; line-height: 1.35; font-style: italic; color: var(--ink-soft); margin-bottom: 2px; }
input[type="text"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.12rem/1.4 var(--serif);
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 200ms ease;
}
textarea { resize: none; min-height: 58px; }
::placeholder { color: var(--muted); font-style: italic; opacity: 1; }
select { text-align-last: center; cursor: pointer; }
select option { background: var(--paper); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--ink); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.5; }
.field__hint { margin-top: 4px; font-size: 0.86rem; font-style: italic; color: var(--muted); }
.field__error { margin-top: 6px; font-size: 0.92rem; color: var(--error); }
.field__error:empty { display: none; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--error); }

.radios { display: grid; gap: 4px; justify-items: center; margin-top: 8px; }
.radio { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 6px; min-height: 44px; margin: 0; font-size: 1.1rem; letter-spacing: 0; text-transform: none; font-style: normal; color: var(--ink); cursor: pointer; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio span::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-hi);
  box-shadow: inset 0 1px 2px rgba(198, 168, 107, 0.15);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.radio input:checked + span::before { background: var(--gold); box-shadow: inset 0 0 0 3px var(--paper-hi); }
.radio input:focus-visible + span { outline: 1.5px solid var(--gold); outline-offset: 4px; }

.stepper { display: inline-flex; align-items: center; gap: 14px; margin-top: 6px; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-hi), #0e172c);
  box-shadow: inset 0 1px 0 rgba(245, 236, 215, 0.12), 0 2px 6px rgba(3, 6, 14, 0.4);
  color: var(--gold-deep);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
}
.stepper button:active { transform: scale(0.94); }
.stepper button:disabled { opacity: 0.4; cursor: default; }
.stepper input {
  width: 46px;
  border: 0;
  background: transparent;
  text-align: center;
  font: 400 1.7rem/1 var(--display);
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.reveal-box { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 450ms var(--ease-out), opacity 300ms ease; }
.reveal-box.is-open { grid-template-rows: 1fr; opacity: 1; }
.reveal-box__inner { overflow: hidden; min-height: 0; }
.reveal-box.is-open .reveal-box__inner { overflow: visible; }

.form-status { font-size: 0.95rem; color: var(--error); margin-bottom: 10px; }
.form-status:empty { display: none; }
.pill--send {
  width: min(100%, 300px);
  padding: 16px 30px;
  margin-top: 8px;
  border-color: #a98c52;
  background: linear-gradient(180deg, #e0c98f, #c6a86b);
  color: var(--navy-ink);
  font-size: 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.45), 0 10px 22px -10px rgba(3, 6, 14, 0.9);
}
@media (hover: hover) and (pointer: fine) { .pill--send:hover { box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.45), 0 14px 28px -10px rgba(3, 6, 14, 0.95); } }
.pill--send[disabled] { opacity: 0.6; cursor: progress; }
.privacy { margin-top: 14px; font-size: 0.86rem; font-style: italic; color: var(--muted); }
.sent { padding: 10px 0 20px; }
.sent:focus { outline: none; }

/* ───────── Marca de Owlit (estampada en seco, como la de un papelero) ───────── */
.maker { display: grid; justify-items: center; gap: 6px; text-decoration: none; }
.maker__owl { width: 30px; height: auto; overflow: visible; }
.maker__name {
  font-size: 0.56rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding-left: 0.34em;
  color: rgba(198, 168, 107, 0.5);
  text-shadow: 0 1px 0 rgba(245, 236, 215, 0.2);
}
.maker__by { font-size: 0.88rem; font-style: italic; color: var(--muted); }
.maker--link { margin: clamp(26px, 6vh, 48px) auto 0; padding: 10px 18px; border-radius: 14px; transition: transform 160ms var(--ease-out); }
.maker--link .maker__owl { width: 44px; transition: transform 300ms var(--ease-out); }
.maker--link .maker__name { font-size: 0.74rem; color: var(--ink-soft); text-shadow: 0 1px 0 rgba(245, 236, 215, 0.17); }
.maker--link:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .maker--link:hover .maker__owl { transform: rotate(-6deg) scale(1.06); } }
.maker--cover {
  position: absolute;
  z-index: 5;
  left: 50%;
  translate: -50% 0;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  padding: 18px 34px 14px;
  background: radial-gradient(closest-side, var(--paper) 70%, rgba(16, 26, 50, 0.0));
  white-space: nowrap;
  transition: opacity 400ms ease;
}

/* ───────── Portada: carpeta con sello ───────── */
.cover { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--page); transition: background-color 900ms ease; }
.js.no-cover .cover { display: none; }
.cover__folder { position: relative; width: 100vw; height: 100dvh; perspective: 2200px; }
.cover.is-open { background-color: rgba(8, 13, 26, 0.0); }
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--paper);
  overflow: hidden;
  backface-visibility: hidden;
  transition: transform 1600ms var(--ease-door);
}
.door--l { left: 0; transform-origin: left center; box-shadow: inset -1px 0 0 rgba(198, 168, 107, 0.28); }
.door--r { right: 0; transform-origin: right center; box-shadow: inset 1px 0 0 rgba(245, 236, 215, 0.17); }
.door::before { content: ""; position: absolute; inset: 0; z-index: 3; background: #2b2412; opacity: 0; transition: opacity 1600ms var(--ease-door); pointer-events: none; }
.door::after { content: ""; position: absolute; top: 0; bottom: 0; width: 26px; z-index: 1; pointer-events: none; }
.door--l::after { right: 0; background: linear-gradient(to left, rgba(198, 168, 107, 0.12), transparent); }
.door--r::after { left: 0; background: linear-gradient(to right, rgba(245, 236, 215, 0.09), transparent); }
.flora--door { inset: 0; width: 100%; height: 100%; }
.cover.is-open .door--l { transform: rotateY(-112deg); }
.cover.is-open .door--r { transform: rotateY(112deg); }
.cover.is-open .door::before { opacity: 0.32; }
.cover.is-gone { opacity: 0; transition: opacity 500ms ease; pointer-events: none; }
.cover.is-open { pointer-events: none; }

.seal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 46%;
  width: min(94%, 470px);
  translate: -50% -50%;
  padding: 0;
  border: 0;
  background: radial-gradient(closest-side, rgba(16, 26, 50, 0.92) 55%, rgba(16, 26, 50, 0) 100%);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), opacity 380ms ease, scale 380ms var(--ease-out);
}
.seal .lg { filter: drop-shadow(0 6px 18px rgba(3, 6, 14, 0.6)); }
.seal, .seal:focus, .seal:focus-visible { outline: none; -webkit-tap-highlight-color: transparent; }
/* foco con teclado: se ilumina el anillo del logo, no un recuadro */
.seal:focus-visible .lg-ring { stroke-opacity: 0.95; stroke-width: 2.6; filter: drop-shadow(0 0 7px rgba(198, 168, 107, 0.8)); }
.seal:active { transform: scale(0.98); }
.cover.is-open .seal { opacity: 0; scale: 1.12; pointer-events: none; }
.cover__hint {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: calc(46% + min(41.4vw, 207px) + 30px);
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-shadow: 0 1px 0 rgba(245, 236, 215, 0.2), 0 0 8px var(--paper), 0 0 16px var(--paper), 0 0 22px var(--paper);
  pointer-events: none;
  transition: opacity 300ms ease;
}
.cover.is-open .cover__hint, .cover.is-open .maker--cover { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .cover__hint { animation: breathe 2.8s ease-in-out infinite; }
}
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }


.burst { position: absolute; z-index: 6; left: 50%; top: 46%; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-deep); animation: burst-out 1100ms var(--ease-out) forwards; }
@keyframes burst-out {
  0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--r)) scale(var(--s)); }
}
.js .lg.is-static:not(.is-on) .lg-part { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .door { transition: none; } .cover.is-open { opacity: 0; transition: opacity 500ms ease; } }

/* ───────── Entrada: «Felicidades» y el búho de los anillos ───────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vh, 56px);
  padding: 24px 20px 90px;
  background: var(--paper);
  transition: opacity 800ms var(--ease-in-out);
}
.js:not(.no-intro) .intro { display: flex; }
.intro.is-leaving { opacity: 0; pointer-events: none; }
.intro__bloom {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(130vmin, 980px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 220, 178, 0.22), rgba(235, 220, 178, 0.06) 42%, transparent 68%);
  opacity: 0;
  pointer-events: none;
}
.intro__stage { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(4px, 2vw, 28px); }
.intro__text { text-align: right; }
.intro__congrats {
  font-family: var(--script);
  font-size: clamp(3.6rem, 8.5vw, 6.4rem);
  line-height: 1.25;
  padding: 0 0.15em 0.1em;
  background: linear-gradient(100deg, #8c6a24 0%, #c6a86b 30%, #ead9ac 46%, #c6a86b 60%, #8c6a24 100%);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
}
.intro__names { font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.1; color: var(--ink); padding-right: 0.2em; opacity: 0; }
.intro__names .script { font-size: 0.8em; padding: 0 0.06em; }

.owl-stage { --s: 1; position: relative; flex: none; width: calc(300px * var(--s)); height: calc(330px * var(--s)); }
.owl-stage__inner { position: absolute; left: 0; top: 0; width: 300px; height: 330px; transform-origin: 0 0; scale: var(--s); opacity: 0; }
.owl { position: absolute; left: 66px; top: 30px; width: 230px; height: auto; overflow: visible; transform-origin: 50% 100%; }
.ringbox { position: absolute; left: 36px; top: 222px; width: 84px; height: auto; overflow: visible; }
.intro__sky { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.intro.is-playing .intro__sky { animation: fade-in 1400ms ease forwards; }
.owl-stage__shadow { position: absolute; left: 118px; top: 304px; width: 130px; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(3, 6, 14, 0.5), transparent); opacity: 0; }

.owl__flap { transform-box: fill-box; }
.owl__wing--l .owl__flap { transform-origin: 100% 15%; }
.owl__wing--r .owl__flap { transform-origin: 0% 15%; }
.owl__lids ellipse { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
.ringbox__lid { transform-box: fill-box; transform-origin: 0% 100%; }
.ringbox__rings { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; }
.ringbox__burst circle { transform-box: view-box; transform-origin: 40px 28px; opacity: 0; }
.spark { transform-box: fill-box; transform-origin: center; opacity: 0; }

.intro__credit { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; opacity: 0; }
.intro__by { font-style: italic; font-size: 1.05rem; color: var(--muted); }
.intro__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.intro__iso { width: 24px; height: auto; }
.intro__skip {
  position: absolute;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.intro__skip:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .intro__skip:hover { border-color: var(--gold); } }

/* Coreografía: llega volando, aterriza, abre el estuche, entrega los anillos y se va */
.intro.is-playing .intro__bloom { animation: fade-in 1600ms ease 100ms forwards; }
.intro.is-playing .intro__congrats { animation: write-in 1100ms var(--ease-out) 350ms forwards, shimmer 1800ms var(--ease-in-out) 1500ms forwards; }
.intro.is-playing .intro__names { animation: write-in 1000ms var(--ease-out) 800ms forwards; }
.intro.is-playing .owl-stage__inner { animation: arrive 1300ms cubic-bezier(0.22, 1, 0.36, 1) 350ms forwards; }
.intro.is-playing .owl__wing--l .owl__flap { animation: flap-l 170ms ease-in-out 350ms 8 alternate, flap-l 140ms ease-in-out 4350ms infinite alternate; }
.intro.is-playing .owl__wing--r .owl__flap { animation: flap-r 170ms ease-in-out 350ms 8 alternate, flap-r 140ms ease-in-out 4350ms infinite alternate; }
.intro.is-playing .owl { animation: land 450ms var(--ease-out) 1620ms, lean 1400ms var(--ease-in-out) 2050ms, fly-away 1500ms cubic-bezier(0.5, 0, 0.8, 0.45) 4350ms forwards; }
.intro.is-playing .owl-stage__shadow { animation: fade-in 300ms ease 1500ms forwards, fade-out 500ms ease 4400ms forwards; }
.intro.is-playing .owl__lids ellipse { animation: blink 200ms ease-in-out 1800ms, blink 200ms ease-in-out 3650ms; }
.intro.is-playing .owl__pupils { animation: look 1500ms var(--ease-in-out) 2100ms; }
.intro.is-playing .ringbox__lid { animation: lid-open 650ms cubic-bezier(0.22, 1, 0.36, 1) 2350ms forwards; }
.intro.is-playing .ringbox__rings { animation: rings-up 600ms var(--ease-out) 2500ms forwards; }
.intro.is-playing .ringbox__burst circle { animation: burst 800ms var(--ease-out) 2520ms forwards; }
.intro.is-playing .spark--1 { animation: twinkle 900ms ease-in-out 2750ms 3; }
.intro.is-playing .spark--2 { animation: twinkle 900ms ease-in-out 3000ms 3; }
.intro.is-playing .spark--3 { animation: twinkle 900ms ease-in-out 3250ms 3; }
.intro.is-playing .intro__credit { animation: write-in 900ms var(--ease-out) 3200ms forwards; }

@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes write-in { from { opacity: 0; filter: blur(8px); transform: translateY(10px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes arrive {
  0% { opacity: 0; transform: translate(240px, -300px) rotate(-12deg); }
  15% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes flap-l { to { transform: rotate(34deg); } }
@keyframes flap-r { to { transform: rotate(-34deg); } }
@keyframes land { 40% { transform: scale(1.05, 0.93); } }
@keyframes lean { 30%, 75% { transform: rotate(-5deg); } }
@keyframes fly-away {
  0% { transform: none; opacity: 1; }
  18% { transform: translate(0, -18px) rotate(4deg); }
  88% { opacity: 1; }
  100% { transform: translate(340px, -560px) rotate(16deg) scale(0.55); opacity: 0; }
}
@keyframes blink { 50% { transform: scaleY(1); } }
@keyframes look { 20%, 80% { transform: translate(-3px, 4px); } }
@keyframes lid-open { to { transform: translate(-3px, -7px) rotate(-38deg); } }
@keyframes rings-up { from { opacity: 0; transform: translateY(6px) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes burst {
  0% { opacity: 0; transform: rotate(var(--a)) translateX(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(30px); }
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1.1); } }

@media (max-width: 640px) {
  .intro__stage { flex-direction: column; gap: 0; }
  .intro__text { text-align: center; }
  .intro__names { padding-right: 0; }
  .owl-stage { --s: 0.74; }
}
@media (max-width: 640px) and (max-height: 720px) { .owl-stage { --s: 0.6; } }
@media (min-width: 1024px) and (min-height: 760px) {
  .owl-stage { --s: 1.3; }
  .intro__congrats { font-size: clamp(5rem, 7.5vw, 7.6rem); }
  .intro__names { font-size: clamp(2.6rem, 3.6vw, 3.4rem); }
  .intro__brand { font-size: 1.5rem; }
}



/* ───────── Astrolabio: Aries y Libra, opuestos en el zodiaco ───────── */
.astrolabe { position: absolute; z-index: 1; left: 50%; top: 47%; width: min(122%, 660px); height: auto; translate: -50% -50%; opacity: 0.62; pointer-events: none; overflow: visible; }
.astrolabe .ring { fill: none; stroke: var(--gold); stroke-width: 0.8; opacity: 0.5; }
.astrolabe .ring--dash { stroke-dasharray: 2 6; }
.astrolabe .tick { stroke: var(--gold); stroke-width: 0.8; opacity: 0.55; }
.astrolabe .tick--long { stroke-width: 1.2; opacity: 0.85; }
.astrolabe .spoke { stroke: var(--gold); stroke-width: 0.5; opacity: 0.18; }
.astrolabe .sign { fill: var(--gold-deep); font: 500 13px/1 var(--serif); letter-spacing: 0.34em; }
.astrolabe .mark { fill: url(#gold); }
@media (prefers-reduced-motion: no-preference) {
  .astrolabe__wheel { animation: wheel 240s linear infinite; transform-origin: 0 0; }
}
@keyframes wheel { to { rotate: 360deg; } }

/* ───────── Estrellas fugaces (de tarde en tarde) ───────── */
.shoot {
  position: absolute;
  z-index: 2;
  left: var(--x);
  top: var(--y);
  width: var(--len);
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 243, 207, 0), rgba(255, 243, 207, 0.95));
  rotate: -32deg;
  transform-origin: right center;
  opacity: 0;
  pointer-events: none;
}
.shoot::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; translate: 0 -50%; border-radius: 50%; background: #fbf1da; box-shadow: 0 0 6px 2px rgba(255, 236, 180, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .shoot { animation: shoot 11s cubic-bezier(0.3, 0, 0.7, 1) var(--d) infinite; }
}
@keyframes shoot {
  0% { opacity: 0; transform: translateX(0) scaleX(0.3); }
  2% { opacity: 1; }
  8% { opacity: 0; transform: translateX(-260px) scaleX(1); }
  100% { opacity: 0; transform: translateX(-260px) scaleX(1); }
}

/* ───────── Destellos ───────── */
.twinkles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.twinkles i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--s) * 0.26);
  min-width: 2px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 0 6px 1px rgba(198, 168, 107, 0.45);
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .twinkles i { animation: star-twinkle 3.6s ease-in-out var(--t) infinite; }
}
@keyframes star-twinkle { 0%, 100% { opacity: 0.25; scale: 0.6; } 50% { opacity: 1; scale: 1; } }

/* ───────── Detalles de Owlit ───────── */
/* el logo de Owlit gira en el botón mientras se envía */
.pill__spin { display: none; width: 18px; height: auto; }
.pill--send.is-sending .pill__spin { display: block; animation: owl-spin 900ms linear infinite; }
.pill--send.is-sending .pill__go { display: none; }
@keyframes owl-spin { to { rotate: 360deg; } }

/* agradecimiento firmado */
.sent__owlit { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 4px 0; font-size: 0.98rem; font-style: italic; color: var(--ink-soft); text-align: left; }
.sent__owlit a { color: var(--gold-deep); font-style: normal; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.sent__iso { width: 22px; height: auto; flex: none; }

/* pie: quién la ha hecho */
.owlit-cta { max-width: 32ch; margin: 18px auto 14px; font-size: 1rem; font-style: italic; line-height: 1.5; color: var(--muted); }
.pill--owlit { min-height: 44px; }

/* el búho del pie guiña el ojo */
.maker__owl > circle { transform-box: fill-box; transform-origin: center; transition: scale 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .maker--link:hover .maker__owl > circle { animation: wink 420ms var(--ease-in-out); } }
.maker--link:focus-visible .maker__owl > circle, .maker--link:active .maker__owl > circle { animation: wink 420ms var(--ease-in-out); }
@keyframes wink { 40%, 60% { scale: 1 0.1; } }

/* búho mensajero: cruza la pantalla con el sobre */
.courier { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; transition: opacity 500ms ease; }
.courier.is-done { opacity: 0; }
.courier__bird { position: absolute; left: 0; top: 0; width: clamp(110px, 30vw, 170px); animation: courier-fly 2600ms cubic-bezier(0.45, 0, 0.35, 1) forwards; }
.courier__bird .owl { position: static; width: 100%; height: auto; transform: rotate(-8deg); }
.courier__bird .owl__wing--l .owl__flap { animation: flap-l 150ms ease-in-out infinite alternate; }
.courier__bird .owl__wing--r .owl__flap { animation: flap-r 150ms ease-in-out infinite alternate; }
.courier__bird .owl__lids ellipse { transform: scaleY(0); }
.courier__letter { position: absolute; left: -2%; bottom: 6%; width: 42%; rotate: -14deg; filter: drop-shadow(0 4px 6px rgba(3, 6, 14, 0.45)); }
@keyframes courier-fly {
  0% { transform: translate(-40vw, 85vh) scale(0.8); }
  45% { transform: translate(calc(50vw - 50%), 38vh) scale(1); }
  60% { transform: translate(calc(50vw - 50%), 34vh) scale(1); }
  100% { transform: translate(115vw, -40vh) scale(0.7); }
}
.courier__tag {
  position: absolute;
  left: 50%;
  bottom: 18vh;
  translate: -50% 0;
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 26, 50, 0.96);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 8px 24px -10px rgba(3, 6, 14, 0.72);
  opacity: 0;
  animation: tag-in 2600ms ease forwards;
}
.courier__tag strong { font-style: normal; font-weight: 500; color: var(--gold-deep); }
@keyframes tag-in { 0%, 25% { opacity: 0; transform: translateY(8px); } 40%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ───────── Movimiento reducido ───────── */
@media (prefers-reduced-motion: reduce) {
  .js .hero .a.in { animation: fade 300ms ease both; }
  .js .sec .rule::before, .js .sec .rule::after { transform: none; transition: none; }
  .js .sec .rule i, .js .sec > .flora { opacity: 1; scale: 1; transition: none; }
      .reveal-box { transition-duration: 1ms; }
  .intro.is-playing *, .intro.is-playing .owl-stage__inner { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  .intro.is-playing .owl { animation: none !important; }
  .intro.is-playing .owl__flap, .intro.is-playing .owl__lids ellipse, .intro.is-playing .spark, .intro.is-playing .ringbox__burst circle { animation: none !important; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* gracias.html (sin JavaScript) */
.thanks { display: grid; justify-items: center; align-content: center; min-height: 100svh; text-align: center; gap: 12px; padding: 40px 24px; }
@media (min-width: 760px) { .thanks { min-height: calc(100svh - 56px); } }
.thanks .names-inline { margin-bottom: 8px; }

/* ───────── Constelaciones junto a los nombres: Libra (Sara) y Aries (Héctor) ───────── */
.cn { display: inline-block; height: auto; flex: none; overflow: visible; vertical-align: middle; }
.cn line { stroke: var(--gold-deep); stroke-width: 3; stroke-linecap: round; opacity: 0.9; }
.names-inline { display: flex; align-items: center; justify-content: center; gap: 0.35em; }
.names-inline .cn { width: 2.2em; }
.intro__names { display: flex; align-items: center; justify-content: center; gap: 0.3em; }
.intro__names .cn { width: 2em; }
@media (prefers-reduced-motion: no-preference) {
  .cn path { transform-box: fill-box; transform-origin: center; animation: star-twinkle 4.2s ease-in-out infinite; }
  .cn path:nth-of-type(2n) { animation-delay: 1.3s; }
  .cn path:nth-of-type(3n) { animation-delay: 2.4s; }
}

/* ───────── Polvo de estrellas por los laterales al bajar ───────── */
.dust { position: fixed; z-index: 35; top: 0; bottom: 0; left: 50%; width: min(100%, var(--col)); translate: -50% 0; pointer-events: none; opacity: 0; transition: opacity 1200ms ease; }
.dust.is-on { opacity: 1; }
.dust canvas { display: block; width: 100%; height: 100%; }

/* ───────── Música ───────── */
.music {
  position: fixed;
  z-index: 55;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(16, 26, 50, 0.92);
  color: var(--gold-deep);
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(3, 6, 14, 0.9);
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.music[hidden] { display: none; }
.music:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .music:hover { border-color: var(--gold); } }
.music svg { width: 22px; height: 22px; fill: currentColor; }
.music rect { transform-box: fill-box; transform-origin: 50% 100%; }
.music[aria-pressed="false"] rect { scale: 1 0.5; opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) {
  .music[aria-pressed="true"] .b1 { animation: eq 900ms ease-in-out infinite alternate; }
  .music[aria-pressed="true"] .b2 { animation: eq 700ms ease-in-out 150ms infinite alternate; }
  .music[aria-pressed="true"] .b3 { animation: eq 1100ms ease-in-out 300ms infinite alternate; }
}
@keyframes eq { from { scale: 1 0.3; } to { scale: 1 1; } }

/* ───────── Número de cuenta ───────── */
.iban { display: grid; justify-items: center; gap: 10px; margin-top: 26px; width: 100%; }
.iban__who { font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }
.iban__num { font-family: var(--display); font-size: clamp(0.98rem, 4.5vw, 1.5rem); letter-spacing: 0.04em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; word-spacing: 0.15em; line-height: 1.4; max-width: 100%; white-space: nowrap; }
.iban__copy { margin-top: 10px; min-height: 48px; }
.iban__copy.is-done { border-color: var(--gold); color: var(--ink); }
.iban__num.is-pending { font-family: var(--serif); font-style: italic; font-size: 1.2rem; letter-spacing: 0; word-spacing: 0; white-space: normal; color: var(--ink-soft); }
.iban__copy[hidden] { display: none; }

/* botones con icono */
.pill--cal { margin-top: 36px; min-height: 44px; }
.pill__icon { width: 17px; height: 17px; flex: none; margin-top: -2px; color: var(--gold-deep); }

/* líneas equilibradas: sin palabras huérfanas */
h1, h2, .heading, .lead, .quote, .display, .iban__num.is-pending, .owlit-cta { text-wrap: balance; }
.sent__owlit span, .privacy, .field__hint { text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
      }


/* ───────── Logo de Sara y Héctor (S&H, anillo, Libra y Aries) ───────── */
.lg { display: block; width: 100%; height: auto; overflow: visible; }
.lg text, .topbar__logo text { font-family: var(--serif); }
.lg-s, .lg-h { font-size: 300px; font-weight: 500; fill: url(#lg-gold); }
.lg-and { font-size: 84px; font-style: italic; font-weight: 500; fill: #f3e6c0; filter: url(#lg-glow); }
.lg-date { font-size: 21px; letter-spacing: 7px; fill: #cfc7b6; text-anchor: middle; font-variant-numeric: lining-nums; }
.lg-halo { fill: none; stroke: rgba(150, 140, 110, 0.11); stroke-width: 60; filter: url(#lg-blur); }
.lg-ring { fill: none; stroke: #cbb98a; stroke-opacity: 0.4; stroke-width: 1.3; stroke-dasharray: 1; }
.lg-arc { fill: none; stroke: url(#lg-arcg); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1; }
.lg-libra line, .lg-aries line { stroke: #cdb98a; stroke-width: 1.3; stroke-linecap: round; opacity: 0.8; }
.lg-star { fill: #fff1cc; }
.lg-star-halo { fill: #c6a86b; opacity: 0.16; }
.lg-comet { fill: #fff3cf; }
.lg-comet-halo { fill: #c6a86b; opacity: 0.35; }
.lg-spark line { stroke: #fff3cf; stroke-width: 1.6; stroke-linecap: round; }
.lg-spark .lg-spark-d { stroke-width: 1; opacity: 0.55; }
.lg-trail circle { fill: #d8c58f; }
.lg-dot { fill: #d5bb82; }
.lg-orbit { transform-origin: 541px 505px; }
.topbar__mark { display: block; line-height: 0; }
.topbar__logo { width: 62px; height: auto; display: block; }
.topbar__logo .lg-s, .topbar__logo .lg-h { font-size: 300px; }

/* estado inicial: oculto hasta que se activa (.is-on); con «reducir movimiento» se ve ya terminado */
.js .lg:not(.is-on) .lg-part { opacity: 0; }
.lg-dot { opacity: 0; }
.logo-end { margin: 0 auto 8px; width: min(100%, 440px); }

@media (prefers-reduced-motion: no-preference) {
  .lg.is-on .lg-dot { animation: lg-dot 2100ms ease 120ms both; }
  .lg.is-on .lg-libra :is(.lg-star, .lg-star-halo) { animation: lg-pop 520ms var(--ease-out) calc(400ms + var(--i, 0) * 130ms) both; }
  .lg.is-on .lg-aries :is(.lg-star, .lg-star-halo) { animation: lg-pop 520ms var(--ease-out) calc(520ms + var(--i, 0) * 130ms) both; }
  .lg.is-on .lg-links { animation: lg-links 760ms ease 1000ms both; }
  .lg.is-on .lg-ring { animation: lg-draw 1000ms cubic-bezier(0.45, 0, 0.25, 1) 1000ms both; }
  .lg.is-on .lg-orbit { animation: lg-orbit 1000ms cubic-bezier(0.45, 0, 0.25, 1) 1000ms both; }
  .lg.is-on .lg-comet-wrap { animation: lg-comet 1000ms ease 1000ms both; }
  .lg.is-on .lg-halo { animation: lg-halo 1100ms ease 1650ms both; }
  .lg.is-on .lg-arc { animation: lg-draw 900ms cubic-bezier(0.45, 0, 0.25, 1) 1800ms both; }
  .lg.is-on .lg-s { animation: lg-write 800ms var(--ease-out) 2000ms both; }
  .lg.is-on .lg-h { animation: lg-write 800ms var(--ease-out) 2120ms both; }
  .lg.is-on .lg-and { animation: lg-write 800ms var(--ease-out) 2500ms both; }
  .lg.is-on .lg-date { animation: lg-write 800ms var(--ease-out) 2900ms both; }
  .lg.is-on .lg-spark { animation: lg-spark 700ms var(--ease-out) 2000ms both; }
  .lg.is-on .lg-trail circle { animation: lg-trail 600ms ease calc(2150ms + var(--i, 0) * 90ms) both; }
}
@keyframes lg-dot { 0% { opacity: 0; scale: 0.3; } 15% { opacity: 1; scale: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lg-pop { 0% { opacity: 0; scale: 0.2; } 55% { opacity: 1; scale: 1.6; } 100% { opacity: 1; scale: 1; } }
@keyframes lg-links { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lg-orbit { to { rotate: 360deg; } }
@keyframes lg-comet { 0% { opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lg-halo { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-write { from { opacity: 0; filter: blur(10px); translate: 0 14px; } to { opacity: 1; filter: blur(0); translate: 0 0; } }
@keyframes lg-spark { from { opacity: 0; scale: 0.2; } to { opacity: 1; scale: 1; } }
@keyframes lg-trail { from { opacity: 0; } to { opacity: 1; } }
.lg-spark { transform-box: fill-box; transform-origin: center; }
.lg-star, .lg-star-halo { transform-box: fill-box; transform-origin: center; }
.lg-and { font-style: italic; }
.lg.is-on .lg-and { animation-name: lg-write; }


/* pie: se ruega confirmación y cuenta, antes del logo */
.sec--end .heading { font-size: clamp(1.7rem, 7.4vw, 2.3rem); max-width: 16ch; margin: 0 auto; }
.pill--rsvp { margin-top: 26px; min-height: 48px; }
.iban--end { margin-top: 28px; position: relative; }
.logo-end { margin-top: 64px; }

.seal .lg-libra { display: none; }

.gift-form { margin-top: 34px; margin-bottom: 30px; padding-top: 30px; border-top: 1px solid var(--line, rgba(198, 168, 107, 0.28)); text-align: center; }
.gift-form__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.45rem, 6.2vw, 1.9rem); line-height: 1.2; text-wrap: balance; margin: 0 0 18px; color: var(--ink); }
.sec--end .heading--line { max-width: none; font-size: min(5.1vw, 2.1rem); white-space: nowrap; }

.tl-note { font-family: var(--display); font-size: clamp(1.35rem, 6vw, 1.7rem); line-height: 1.25; color: var(--ink); text-wrap: balance; }

.maker--link .maker__by { max-width: 24ch; margin-inline: auto; text-wrap: balance; line-height: 1.35; }
.maker--link + .pill--owlit { margin-top: 22px; }

.tl-item .tl-note { margin-top: 14px; font-size: clamp(1.15rem, 5vw, 1.4rem); color: var(--ink-soft); font-style: italic; font-family: var(--serif); }

/* mientras suena la entrada del búho no se pinta lo de debajo: el teléfono dedica todo a la animación */
.intro-on .backdrop, .intro-on .page, .intro-on #topbar, .intro-on #cover, .intro-on .dust, .intro-on #music { visibility: hidden; }

/* teléfonos estrechos: el botón de música no pisa a «Ver invitación» */
@media (max-width: 380px) {
  .music { width: 42px; height: 42px; right: max(8px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .music svg { width: 19px; height: 19px; }
}
/* la línea central de la carpeta no cruza el texto del sello */
.cover__hint { text-shadow: 0 1px 0 rgba(245, 236, 215, 0.2), 0 0 6px var(--page), 0 0 10px var(--page), 0 0 14px var(--page), 0 0 20px var(--page), 0 0 26px var(--page); }

.tl-venue { margin-top: 18px; }
.tl-item .tl-note { margin-top: 0; }

/* un toque rápido sobre + / − no hace zoom en el móvil */
html, button, a, input, select, textarea, label { touch-action: manipulation; }
.stepper { -webkit-user-select: none; user-select: none; }
.iban__who span { display: block; }
.wa-note { margin: 22px auto 0; max-width: 32ch; text-align: center; font-style: italic; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; text-wrap: balance; }

/* pantallas muy estrechas (320 px): el botón de copiar cabe dentro del formulario */
.rsvp { min-width: 0; }
@media (max-width: 360px) {
  .iban__copy { padding-inline: 14px; letter-spacing: 0.12em; font-size: 0.7rem; gap: 8px; max-width: 100%; }
}
@media (max-width: 400px) {
  .names-inline, .names-inline--big { font-size: clamp(1.45rem, 6.9vw, 1.9rem); gap: 0.25em; }
  .names-inline .cn, .names-inline--big .cn { width: 1.6em; }
}
.wa-note { margin-bottom: 22px; }
.tl-item .tl-note { font-size: clamp(1.5rem, 6.8vw, 1.95rem); line-height: 1.2; max-width: 20ch; margin-inline: auto; }

.iban__who { text-wrap: balance; }

/* ritmo de espacios */
.field { margin-bottom: 28px; }
.stepper { margin-top: 10px; }
.tl-item { gap: 6px; }
.tl-venue { gap: 8px; }
.gift-form { margin-top: 40px; margin-bottom: 8px; padding-top: 36px; }
.gift-form__title { margin-bottom: 26px; }
.gift-form .iban { margin-top: 0; gap: 14px; }
.iban__who { line-height: 1.5; }
.iban__copy { margin-top: 12px; }
.wa-note { margin: 34px auto 28px; }
.privacy { margin-top: 20px; line-height: 1.5; }
.logo-end { margin-top: 44px; }
.sec--end .iban--end { margin-top: 32px; }
.sec--end .logo-end { margin-top: 8px; }

.tl-title--carpa { font-size: clamp(2rem, 9vw, 2.6rem); margin-top: 2px; }
.tl-item .tl-note { font-size: clamp(1.15rem, 5vw, 1.4rem); max-width: none; }

/* reproductor de YouTube: invisible mientras suena solo; si el móvil bloquea la reproducción, aparece para pulsar play */
.ytplayer { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 58px); width: 220px; height: 124px; z-index: 54; opacity: 0; pointer-events: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--deep); box-shadow: 0 10px 24px -10px rgba(3, 6, 14, 0.9); }
.ytplayer.is-shown { opacity: 1; pointer-events: auto; }
.ytplayer iframe { display: block; width: 100%; height: 100%; }
.intro-on .ytplayer { visibility: hidden; }

.astrolabe__const line { stroke: var(--gold-deep); stroke-width: 1.6; stroke-linecap: round; opacity: 0.9; }
.astrolabe__const .pt { fill: var(--gold-deep); }
.astrolabe__const .halo { fill: var(--gold); opacity: 0.2; }
.astrolabe { opacity: 0.85; }
.astrolabe__const { opacity: 0.8; }
