/* ==========================================================
   Diseño "Línea" · Boda · arte de una sola línea continua
   Paleta: blanco roto, tinta casi negra y un único acento terracota
   ========================================================== */

@font-face { font-family: "Italiana"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/italiana-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --papel: #faf9f6;
  --tinta: #1e1e1e;
  --gris: #66615b;
  --tenue: #b9b4ad;
  --terracota: #b86b4b;
  --fina: "Italiana", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", "DM Sans", system-ui, sans-serif;

  --s-fondo: var(--papel);
  --s-tinta: var(--tinta);
  --s-suave: var(--gris);
  --s-acento: var(--terracota);
  --s-acento-tinta: var(--papel);
  --s-tarjeta: transparent;
  --s-borde: rgba(30, 30, 30, .14);
  --s-radio: 0;
  --s-sombra: none;
  --s-fuente: var(--serif);
  --s-titulo: var(--fina);
  --s-titulo-tam: clamp(2.2rem, 10vw, 2.8rem);
  --s-titulo-color: var(--tinta);
  --s-etiqueta: var(--sans);
  --s-num: var(--fina);
  --s-num-color: var(--tinta);
  --s-btn-linea-color: var(--tinta);
}

body {
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.amp { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--terracota); }

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

/* ================= INTRO ================= */
.linea {
  position: relative;
  width: min(100%, 520px);
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: var(--papel);
  /* Ancho del dibujo: todo el ancho en móvil, contenido en escritorio y en pantallas bajas */
  --ancho: min(100vw, 440px, max(260px, calc((100vh - 360px) * 1.4)));
  --ancho: min(100vw, 440px, max(260px, calc((100svh - 360px) * 1.4)));
}

.linea__cab {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 11%);
  left: 24px;
  right: 24px;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
}
.linea__titulo {
  margin: 0;
  font-family: var(--fina);
  font-size: clamp(1.7rem, 7.6vw, 2.2rem);
  letter-spacing: .06em;
  color: var(--tinta);
  animation: linea-entrar 1.6s .2s cubic-bezier(.2, .7, .2, 1) both;
}

/* Escena: los antebrazos salen del viewBox (overflow visible) y la intro los recorta en sus bordes */
.linea__escena {
  position: absolute;
  left: 50%;
  width: var(--ancho);
  margin-left: calc(var(--ancho) / -2);
  top: 21%;
  z-index: 1;
  pointer-events: none;
  transition: transform 1.8s cubic-bezier(.2, .7, .2, 1);
}
.linea__dibujo { display: block; width: 100%; height: auto; overflow: visible; }
.linea__trazo {
  fill: none;
  stroke: var(--tinta);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.linea__anillo {
  fill: none;
  stroke: var(--terracota);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(.5, 0, .2, 1);
}
.linea__anillo + .linea__anillo { transition-delay: .35s; }
.trazado .linea__anillo { stroke-dashoffset: 0; }
/* Hasta que el JS prepara el trazo (dasharray), no se muestra nada: solo el punto */
.linea:not(.preparado) .linea__trazo,
.linea:not(.preparado) .linea__punta,
.linea:not(.preparado) .linea__pulso { visibility: hidden; }

.linea__punta { fill: var(--tinta); transition: opacity .6s ease; }
.linea__pulso {
  fill: none;
  stroke: var(--tinta);
  stroke-width: .6;
  transform-box: fill-box;
  transform-origin: center;
  animation: linea-pulso 2s ease-out infinite;
  transition: opacity .6s ease;
}
@keyframes linea-pulso { 0% { transform: scale(.25); opacity: 0; } 25% { opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.trazando .linea__pulso { animation: none; opacity: 0; }
.trazado .linea__punta { opacity: 0; }

/* Superficie táctil (botón accesible del tamaño de la intro) */
.linea__superficie {
  all: unset;
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.linea__superficie:focus-visible { outline: 1px dashed var(--tinta); outline-offset: -14px; }
.linea__superficie:disabled { cursor: default; }

/* Pie: pista, barra de progreso finísima y botón */
.linea__pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 26px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  transition: opacity .8s ease, transform .8s ease;
  animation: linea-entrar 1.4s .9s ease backwards;
}
.linea__hint { margin: 0; font-style: italic; font-size: 1.02rem; color: var(--gris); }
.linea__barra { display: block; width: 120px; height: 1px; background: rgba(30, 30, 30, .12); overflow: hidden; }
.linea__barra i { display: block; height: 100%; background: var(--tinta); transform: scaleX(0); transform-origin: left; }
.linea__btn {
  all: unset;
  box-sizing: border-box;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid rgba(30, 30, 30, .3);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tinta);
  cursor: pointer;
  transition: border-color .3s, background-color .3s, opacity .3s;
}
.linea__btn:hover { border-color: var(--tinta); }
.linea__btn:focus-visible { outline: 1px solid var(--terracota); outline-offset: 3px; }
.linea__btn:disabled { opacity: .4; cursor: default; }

.trazado .linea__cab { opacity: 0; transform: translateY(-10px); }
.trazado .linea__pie { opacity: 0; transform: translateY(10px); }
.trazado .linea__pie .linea__btn { pointer-events: none; }
.trazado .linea__escena { transform: translateY(-9%); }

/* Nombres escritos con la misma línea fina */
.linea__final {
  position: absolute;
  left: 20px;
  right: 20px;
  top: calc(21% + var(--ancho) / 1.4 - 6px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
.linea__eyebrow, .linea__nombres, .linea__fecha { opacity: 0; }
.linea__eyebrow { margin: 0 0 14px; font-family: var(--sans); font-size: .62rem; font-weight: 500; letter-spacing: .46em; text-transform: uppercase; color: var(--gris); }
.linea__nombres {
  margin: 0;
  font-family: var(--fina);
  font-weight: 400;
  font-size: clamp(2.5rem, 11.5vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: .03em;
  white-space: nowrap;
  color: var(--tinta);
}
.linea__nombres .amp { font-size: .62em; padding: 0 .12em; }
.linea__regla { display: block; width: 56px; height: 1px; margin: 20px 0 18px; background: var(--tinta); transform: scaleX(0); }
.linea__fecha {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .2em;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: .38em;
  color: var(--gris);
}
.linea__fecha i { font-style: normal; color: var(--terracota); }

.trazado .linea__eyebrow { animation: linea-entrar 1.2s 1.2s ease both; }
.trazado .linea__nombres { animation: linea-espaciar 2.4s 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.trazado .linea__regla { animation: linea-regla 1.4s 2.6s cubic-bezier(.6, 0, .2, 1) both; }
.trazado .linea__fecha { animation: linea-entrar 1.6s 3s ease both; }
@keyframes linea-entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes linea-espaciar {
  from { opacity: 0; letter-spacing: .55em; filter: blur(3px); }
  to { opacity: 1; letter-spacing: .03em; filter: none; }
}
@keyframes linea-regla { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.linea .desliza-c { z-index: 5; color: var(--tinta); font-family: var(--sans); font-weight: 500; }
.linea .desliza-c i { width: 1px; }

/* ================= INVITACIÓN ================= */
.contenido { position: relative; background: var(--papel); }
.s { padding: 84px 28px; }
.s-titulo { letter-spacing: .03em; margin-bottom: 30px; }
.s-titulo::after { content: ""; display: block; width: 4px; height: 4px; margin: 18px auto 0; border-radius: 50%; background: var(--terracota); }

/* Lazo: separador que se dibuja al aparecer */
.lazo { display: block; width: 180px; height: 22px; margin: 0 auto; overflow: visible; }
.lazo path { fill: none; stroke: var(--tinta); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s cubic-bezier(.5, 0, .2, 1) .2s; }
.lazo circle { fill: var(--terracota); opacity: 0; transition: opacity .8s 2.4s; }
.lazo.visible path { stroke-dashoffset: 0; }
.lazo.visible circle { opacity: 1; }
.lazo.aparece { transform: none; }
.lazo.separador { margin: -10px auto; }

/* Carta */
.carta { padding-top: 76px; }
.carta__eyebrow { margin: 22px 0 34px; max-width: 20em; font-family: var(--sans); font-size: .64rem; font-weight: 500; line-height: 1.9; letter-spacing: .32em; text-transform: uppercase; color: var(--gris); }
.carta__foto { width: min(76%, 320px); margin: 0; outline: 1px solid var(--s-borde); outline-offset: 12px; }
.carta__foto img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.carta__nombres { margin: 48px 0 0; font-family: var(--fina); font-weight: 400; font-size: clamp(2.6rem, 12vw, 3.2rem); line-height: 1.05; letter-spacing: .02em; }
.carta__nombres .amp { font-size: .62em; }
.carta__fecha { margin: 12px 0 0; font-size: 1.1rem; font-variant-caps: all-small-caps; letter-spacing: .3em; color: var(--gris); }
.carta__texto { margin: 28px 0 0; max-width: 21em; font-size: 1.2rem; line-height: 1.65; font-style: italic; }

/* Cuenta regresiva: sin cajas, solo cifras separadas por filetes */
.s-cuenta__cajas { gap: 0; }
.s-cuenta__caja { width: auto; min-width: 70px; padding: 4px clamp(10px, 4vw, 20px); background: none; border: 0; border-left: 1px solid var(--s-borde); border-radius: 0; box-shadow: none; }
.s-cuenta__caja:first-child { border-left: 0; }
.s-cuenta__num { font-size: clamp(2.1rem, 9vw, 2.7rem); }
.s-cuenta__lbl { margin-top: 8px; font-size: .56rem; font-weight: 500; letter-spacing: .3em; }
.s-cuenta__fecha { font-style: italic; }
.s-cuenta__fin { font-family: var(--fina); color: var(--terracota); }

/* Botones finos */
.s-btn { font-weight: 500; letter-spacing: .24em; font-size: .68rem; }
.s-btn--linea, .s-btn--mini { border-width: 1px; border-color: rgba(30, 30, 30, .35); }
.s-btn--linea:hover, .s-btn--mini:hover { border-color: var(--tinta); }
.s-btn--lleno { background: var(--tinta); color: var(--papel); box-shadow: none; }
.s-btn--lleno:hover { background: #000; }

/* Itinerario: filas separadas por líneas finas */
.s-eventos__lista { gap: 0; }
.s-evento { padding: 38px 8px; background: none; border: 0; border-top: 1px solid var(--s-borde); border-radius: 0; box-shadow: none; }
.s-evento:last-child { border-bottom: 1px solid var(--s-borde); }
.s-evento__icono { width: 50px; height: 50px; margin-bottom: 14px; color: var(--tinta); border: 1px solid var(--s-borde); }
.s-evento__titulo { font-weight: 500; font-size: .7rem; letter-spacing: .32em; color: var(--gris); }
.s-evento__hora { margin: 10px 0 6px; font-family: var(--fina); font-size: 2.4rem; color: var(--terracota); }
.s-evento__lugar { font-size: 1.22rem; }
.s-evento__dir { font-size: 1.02rem; }

/* Galería: bordes rectos, sin sombras */
.s-galeria__rejilla { gap: 8px; }
.s-foto { box-shadow: none; background: #ecebe7; }
.s-galeria__rejilla--3 .s-foto:first-child img { aspect-ratio: 3 / 2; }
.s-foto img { filter: grayscale(1); }

/* Frase */
.frase { padding-top: 40px; }
.frase__foto { width: min(64%, 270px); margin: 0; outline: 1px solid var(--s-borde); outline-offset: 12px; }
.frase__foto img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1); }
.frase__txt { margin: 46px 0 0; max-width: 15em; font-family: var(--fina); font-size: clamp(1.6rem, 7.4vw, 2rem); line-height: 1.3; }

/* Vestimenta */
.s-vestimenta__tipo { font-family: var(--fina); font-size: 2rem; color: var(--tinta); }
.s-paleta { gap: 12px; margin: 26px 0 14px; }
.s-paleta li { padding: 4px; border-color: var(--s-borde); }
.s-paleta svg { width: 34px; height: 34px; }

/* Confirmación */
.s-rsvp__saludo { margin: -6px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--terracota); }
.s-rsvp__texto { font-size: 1.15rem; }

/* Pie */
.s-pie__t { font-weight: 500; letter-spacing: .4em; }
.s-pie__n { font-family: var(--fina); font-size: 2.4rem; letter-spacing: .02em; }
.s-pie__n .amp { font-size: .62em; }
.btn-musica { background: var(--papel); color: var(--tinta); border: 1px solid var(--s-borde); }

@media (prefers-reduced-motion: reduce) {
  .linea__pulso { animation: none; opacity: .5; }
  .linea__titulo, .linea__pie { animation: none; }
  .trazado .linea__eyebrow, .trazado .linea__nombres, .trazado .linea__fecha { animation: none; opacity: 1; }
  .trazado .linea__regla { animation: none; transform: none; }
  .linea__anillo, .lazo path { transition-duration: .3s; transition-delay: 0s; }
  .lazo circle { transition-delay: 0s; }
  .linea__escena { transition: none; }
}
