/* =========================================================
   Invitación DWB-003 · Digital Wedding Bolivia
   Papel marfil · verde oliva · rosas blancas — mobile first
   ========================================================= */

/* ---------- 0. Fuentes (alojadas en /fonts, subconjunto latino, variables) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/eb-garamond.woff2") format("woff2");
}

@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/great-vibes.woff2") format("woff2");
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Paleta */
  --paper: #f5f0e6;          /* debe coincidir con el relleno del borde rasgado (--torn) */
  --paper-light: #fbf8f1;
  --paper-edge: #fffdf8;
  --olive: #4a5639;
  --olive-dark: #3b4630;
  --olive-deep: #2b3423;
  --olive-ink: #464e35;      /* nombres y títulos sobre marfil */
  --sage: #a7b09a;
  --sage-dark: #7d876a;
  --gold: #b7955a;
  --gold-soft: #cdb27f;
  --gold-light: #e6d3a6;
  --gold-ink: #85622d;       /* dorado oscuro para texto sobre marfil (AA) */
  --ink: #34372a;
  --ink-soft: #55584a;
  --cream: #f3eee2;

  --gold-gradient: linear-gradient(120deg, #9a7232 0%, #d9ba7c 38%, #f0dcaa 50%, #b58b45 68%, #d2b170 100%);

  /* Tipografía */
  --font-script: "Great Vibes", "Snell Roundhand", "Apple Chancery", "Segoe Script", cursive;
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-text: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;

  /* Medidas */
  --invite-max: 440px;
  --gutter: clamp(1rem, 5vw, 1.5rem);
  --space-s: .75rem;
  --space-m: 1.25rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --line: 1px;
  --torn-h: clamp(18px, 6vw, 26px);

  --shadow-print: 0 1px 2px rgba(60, 50, 25, .12), 0 12px 24px -10px rgba(60, 50, 25, .35);
  --shadow-soft: 0 6px 16px -8px rgba(40, 45, 25, .45);

  /* Texturas (SVG inline, trama ≤ 0,05) */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  --tex-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='.12'/%3E%3C/svg%3E");

  /* Borde de papel rasgado: fibra blanca + papel marfil (--paper) */
  --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28V8.5L0.0 8.5L5.0 10L11.8 10.8L20.0 12.3L27.5 14.2L33.1 13.5L36.5 13.3L45.9 14.3L55.4 13.3L62.4 14.9L68.1 10.8L73.4 9.6L79.4 10.6L86.3 13.6L89.7 10.4L96.3 11.5L105.6 8.9L111.0 13.2L117.6 9.7L122.6 11.1L127.9 12.2L132.6 14.8L141.6 12.9L148.2 12L157.8 11.3L162.6 12.6L167.9 11.2L177.0 9.3L180.6 11.3L184.1 15.5L191.5 9.5L198.7 9.5L207.9 14.7L217.2 13.8L220.3 4.7L227.6 10.1L234.1 13.3L243.2 10.1L252.5 9.3L255.5 14.9L265.0 8.6L269.3 15.3L277.0 10.4L281.5 15.5L289.4 13.5L292.6 9.3L296.5 13.3L299.8 14.7L309.8 15.2L315.7 10.2L324.9 11.3L330.7 14.7L336.2 12.9L341.5 13.6L345.9 10.7L355.9 12.9L365.3 9.9L369.2 12L377.6 15.1L381.9 11.6L389.6 12.2L396.1 13.8L400.0 12V28Z' fill='%23fdfbf5'/%3E%3Cpath d='M0 28V10.1L0.0 10.1L5.0 12.1L11.8 13.4L20.0 14.3L27.5 17.1L33.1 15.6L36.5 15.3L45.9 17.1L55.4 15.7L62.4 16.6L68.1 13.8L73.4 12.7L79.4 13.8L86.3 16.8L89.7 13.2L96.3 14.8L105.6 10.5L111.0 16.2L117.6 12.4L122.6 14L127.9 15.4L132.6 16.5L141.6 14.7L148.2 13.7L157.8 13.1L162.6 14.4L167.9 12.8L177.0 12L180.6 14.6L184.1 17.4L191.5 11.3L198.7 11.5L207.9 17.5L217.2 15.8L220.3 7.1L227.6 13.5L234.1 15.7L243.2 12.9L252.5 12.3L255.5 17.2L265.0 10.9L269.3 17L277.0 12.4L281.5 18.6L289.4 16.9L292.6 11.2L296.5 16.6L299.8 17.2L309.8 17L315.7 12.2L324.9 14L330.7 16.6L336.2 14.6L341.5 15.7L345.9 13.5L355.9 15.5L365.3 12.4L369.2 15.4L377.6 16.8L381.9 13.9L389.6 14.4L396.1 15.4L400.0 13.6V28Z' fill='%23f5f0e6'/%3E%3C/svg%3E");

  /* Separador del programa: líneas finas + corazón oliva */
  --mini-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 10'%3E%3Cpath d='M0 5h68M92 5h68' stroke='%23a7ae96' stroke-width='.8'/%3E%3Cpath d='M80 9.6c-3.6-2.4-5.6-4.6-5.3-6.6.3-1.8 2.5-2.6 3.9-1.5.6.4 1 .9 1.4 1.5.4-.6.8-1.1 1.4-1.5 1.4-1.1 3.6-.3 3.9 1.5.3 2-1.7 4.2-5.3 6.6Z' fill='%234a5639'/%3E%3C/svg%3E");
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--olive-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fondo oliva de escritorio en una capa fija propia (background-attachment: fixed repintaría en cada scroll) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    var(--tex-grain),
    radial-gradient(90% 60% at 20% 10%, rgba(110, 125, 80, .35), transparent 70%),
    radial-gradient(80% 60% at 85% 85%, rgba(15, 20, 8, .5), transparent 70%),
    linear-gradient(160deg, var(--olive-dark), var(--olive-deep));
  pointer-events: none;
}

.invitation:focus { outline: none; }

img, svg { display: block; max-width: 100%; }

/* hidden siempre gana: varias clases (.btn, .countdown__grid) fijan su propio display */
[hidden] { display: none !important; }

/* Cormorant usa numerales antiguos por defecto: fechas, horas y códigos con cifras alineadas */
.date__numbers, .calendar, .timeline, .countdown, .design-code__code, .brand__demo-code, .venue__address { font-variant-numeric: lining-nums; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Lienzo de la invitación (papel marfil) ---------- */
.invitation {
  position: relative;
  width: 100%;
  max-width: var(--invite-max);
  margin-inline: auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    var(--tex-grain),
    var(--tex-cloud),
    radial-gradient(120% 30% at 0% 0%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(100% 25% at 100% 40%, rgba(255, 253, 246, .55), transparent 70%);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* En pantallas más anchas la invitación se ve como un teléfono sobre el fondo oliva */
@media (min-width: 460px) {
  .invitation {
    margin-block: 28px;
    border-radius: 6px;
    box-shadow:
      0 0 0 6px rgba(245, 240, 230, .08),
      0 30px 60px -24px rgba(0, 0, 0, .6),
      0 8px 20px -10px rgba(0, 0, 0, .45);
  }
}

.section {
  position: relative;
  padding-inline: var(--gutter);
}

/* Paneles verde oliva con textura de acuarela */
.panel {
  position: relative;
  color: var(--cream);
  background-color: var(--olive-dark);
  background-image:
    var(--tex-grain),
    var(--tex-cloud),
    radial-gradient(90% 55% at 15% 15%, rgba(120, 135, 85, .45), transparent 65%),
    radial-gradient(80% 60% at 90% 80%, rgba(20, 26, 12, .5), transparent 70%),
    radial-gradient(60% 40% at 70% 25%, rgba(95, 108, 70, .35), transparent 70%),
    linear-gradient(170deg, var(--olive) 0%, var(--olive-dark) 55%, var(--olive-deep) 100%);
}

/* Bordes de papel rasgado: el marfil "se rompe" sobre el panel o la foto */
.torn-top::before,
.torn-bottom::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  height: var(--torn-h);
  background: var(--torn) center / 100% 100% no-repeat;
  pointer-events: none;
}

.torn-top::before { top: -1px; transform: scaleY(-1); }
.torn-bottom::after { bottom: -1px; }

/* ---------- 4. Tipografía y ornamentos comunes ---------- */
.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 8.4vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
  color: var(--olive-ink);
}

.title span {
  display: block;
  margin-top: .35rem;
  font-size: clamp(.78rem, 3.6vw, .9rem);
  letter-spacing: .26em;
  color: var(--ink-soft);
}

.title--small {
  font-size: clamp(1.08rem, 5vw, 1.28rem);
  letter-spacing: .16em;
}

.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.5rem, 12.5vw, 3.1rem);
  line-height: 1.15;
  text-align: center;
  color: var(--olive-ink);
}

/* Línea fina con corazón al centro */
.heart-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: min(48%, 190px);
  margin: .55rem auto .9rem;
  color: var(--olive);
}

.heart-rule::before,
.heart-rule::after {
  content: "";
  flex: 1;
  height: var(--line);
  background: linear-gradient(90deg, transparent, var(--sage-dark));
}

.heart-rule::after { transform: scaleX(-1); }

.heart-rule svg { width: 13px; height: 12px; flex: none; }

.heart-rule--long { width: min(74%, 300px); }

/* Ramos y guirnaldas de rosas blancas */
.garland,
.couple__spray,
.venue__spray {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(40, 45, 25, .18));
}

.garland {
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 150;
}

/* ---------- 5. Fotografías ---------- */
/* --lqip: miniatura borrosa incrustada en el HTML (≈1 KB) que se ve al instante mientras llega la foto */
.photo {
  position: relative;
  overflow: hidden;
  background:
    var(--lqip, none) center / cover no-repeat,
    linear-gradient(150deg, #d6d2c0, #a9ad96);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* La foto nítida aparece con un fundido sobre la miniatura (main.js añade .is-loaded) */
.js .photo img {
  opacity: 0;
  transition: opacity .6s ease;
}

.js .photo img.is-loaded { opacity: 1; }

/* Alternativa visual si una imagen falla: fondo y corazón, nunca un hueco roto */
.photo--error img { visibility: hidden; }

.photo--error::after {
  content: "♡";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: rgba(255, 255, 255, .85);
}

/* ---------- 6. Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 50px;
  padding: .75rem 1.7rem;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--olive) 0%, var(--olive-dark) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 10px 20px -12px rgba(35, 42, 20, .85);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.86rem, 3.9vw, .96rem);
  letter-spacing: .16em;
  white-space: nowrap;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: translate .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--gold-light);
}

.btn:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}

.btn:disabled { opacity: .7; cursor: progress; }

/* Sin destino configurado: se muestra, pero no se presenta como accionable */
.btn[aria-disabled="true"] { cursor: default; }

@media (hover: hover) {
  .btn:not([aria-disabled="true"]):hover {
    translate: 0 -2px;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .14),
      0 14px 24px -12px rgba(35, 42, 20, .9);
  }
}

.btn--block { width: 100%; }

.btn--light {
  background: linear-gradient(180deg, #fbf8f1, #ece5d6);
  box-shadow: inset 0 0 0 1px rgba(183, 149, 90, .55), 0 10px 22px -12px rgba(0, 0, 0, .6);
  color: var(--olive-dark);
}

.btn--light svg { color: var(--gold-ink); }
.btn--light:focus-visible { outline-color: var(--gold-light); }

/* ---------- 7. Sección 1 · Encabezado de demo ---------- */
.brand {
  padding: calc(var(--space-l) + env(safe-area-inset-top)) var(--gutter) 0;
  text-align: center;
}

/* El PNG original es cuadrado con aire transparente arriba y abajo:
   se recorta solo ese margen con CSS, sin editar el archivo. */
.brand__logo {
  width: min(36%, 150px);
  margin-inline: auto;
  aspect-ratio: 1069 / 580;
  overflow: hidden;
}

.brand__logo img {
  width: 100%;
  height: auto;
  margin-top: -23.4%; /* 250px de 1069px */
  filter: drop-shadow(0 6px 8px rgba(90, 65, 20, .18));
}

.brand__name {
  margin-top: .3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 6.8vw, 1.75rem);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3b3b33;
}

.brand__name span {
  background: var(--gold-gradient);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-shimmer 5s ease-in-out 1.5s 2 alternate both;
}

.brand__country {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  width: min(66%, 250px);
  margin: .4rem auto 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.64rem, 2.8vw, .72rem);
  letter-spacing: .5em;
  text-indent: .5em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand__country::before,
.brand__country::after {
  content: "";
  flex: 1;
  height: var(--line);
  background: linear-gradient(90deg, transparent, var(--gold));
}

.brand__country::after { transform: scaleX(-1); }

.brand__tagline {
  margin-top: .4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.58rem, 2.6vw, .66rem);
  letter-spacing: .3em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand__tagline span { display: block; }

/* Aviso de demo: deja claro qué modelo se está viendo */
.brand__demo {
  display: inline-grid;
  justify-items: center;
  gap: .15rem;
  margin-top: .8rem;
  padding: .45rem 1.3rem .5rem;
  border: var(--line) solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, .65);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45);
}

.brand__demo-label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(.82rem, 3.6vw, .92rem);
  line-height: 1.2;
  color: var(--gold-ink);
}

.brand__demo-code {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.66rem, 2.9vw, .74rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand__demo-code strong {
  font-weight: 700;
  color: var(--olive-dark);
}

/* ---------- 8. Sección 2 · Novios ---------- */
.couple {
  z-index: 2;
  padding-top: var(--space-s);
  padding-left: calc(var(--gutter) + 15%);
  text-align: center;
}

.couple .heart-rule { margin-bottom: .2rem; }

.couple__spray {
  left: -26px;
  top: 34px;
  width: clamp(98px, 30vw, 128px);
  height: auto;
  aspect-ratio: 120 / 300;
}

.couple__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-script);
  font-weight: 400;
  line-height: .95;
  color: var(--olive-ink);
}

.couple__name {
  font-size: clamp(3.4rem, 17vw, 4.4rem);
  white-space: nowrap;
}

.couple__and {
  margin: -.05em 0 -.08em;
  font-size: clamp(2.1rem, 10vw, 2.6rem);
  color: var(--olive);
}

.couple__lead {
  margin-top: .9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.72rem, 3.3vw, .82rem);
  letter-spacing: .22em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.couple__lead span { display: block; }

.couple__script {
  margin-top: .1rem;
  font-family: var(--font-script);
  font-size: clamp(2.3rem, 11.4vw, 2.85rem);
  line-height: 1.15;
  color: var(--olive-ink);
}

/* ---------- 9. Sección 3 · Foto en arco ---------- */
.arch {
  position: relative;
  z-index: 1;
  width: min(84%, 370px);
  margin: var(--space-m) auto 0;
}

/* Filete dorado que dibuja el arco alrededor de la foto */
.arch__line {
  position: absolute;
  inset: -9px -9px 34% -9px;
  border: var(--line) solid var(--gold-soft);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

.arch__photo {
  aspect-ratio: 420 / 583;
  border-radius: 999px 999px 0 0;
}

.arch__photo img { object-position: 50% 30%; }

/* Pétalos que caen dentro del arco: mismo recorte que la foto, por debajo del borde rasgado */
.arch__petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

.arch__petals .petal {
  top: -24px;
  scale: 1.6;
  box-shadow: inset 0 -1px 2px rgba(150, 130, 90, .3), 0 2px 4px rgba(30, 30, 15, .35);
  animation-name: arch-fall;
  animation-play-state: paused;
}

/* Algunos pétalos marfil rosado: se distinguen sobre el vestido blanco */
.arch__petals .petal:nth-child(3n + 2) {
  background: radial-gradient(circle at 50% 90%, #fff8f3 0%, #f4e2d8 55%, #e3c6b6 100%);
}

.arch__petals .petal--b { animation-name: arch-fall-b; }
.arch__petals .petal--c { animation-name: arch-fall-c; }

/* Solo se mueven mientras la foto está en pantalla (main.js añade .is-petals-on) */
.arch.is-petals-on .arch__petals .petal { animation-play-state: running; }

/* Valores fijos en px: la caída cubre el alto de la foto (400–500px). El eje de giro tiene
   más componente Z para que el pétalo muestre la cara casi siempre y no se vea de canto. */
@keyframes arch-fall {
  0% { transform: translate3d(0, 0, 0) rotate3d(.5, .3, 1, 0deg); }
  25% { transform: translate3d(22px, 120px, 0) rotate3d(.5, .3, 1, 90deg); }
  50% { transform: translate3d(-18px, 240px, 0) rotate3d(.5, .3, 1, 170deg); }
  75% { transform: translate3d(18px, 360px, 0) rotate3d(.5, .3, 1, 250deg); }
  100% { transform: translate3d(0, 490px, 0) rotate3d(.5, .3, 1, 330deg); }
}

@keyframes arch-fall-b {
  0% { transform: translate3d(0, 0, 0) rotate3d(.3, .5, 1, 0deg); }
  25% { transform: translate3d(-18px, 120px, 0) rotate3d(.3, .5, 1, -80deg); }
  50% { transform: translate3d(14px, 240px, 0) rotate3d(.3, .5, 1, -160deg); }
  75% { transform: translate3d(-16px, 360px, 0) rotate3d(.3, .5, 1, -240deg); }
  100% { transform: translate3d(0, 490px, 0) rotate3d(.3, .5, 1, -310deg); }
}

@keyframes arch-fall-c {
  0% { transform: translate3d(0, 0, 0) rotate3d(.6, .2, 1, 0deg); }
  25% { transform: translate3d(10px, 120px, 0) rotate3d(.6, .2, 1, 70deg); }
  50% { transform: translate3d(-22px, 240px, 0) rotate3d(.6, .2, 1, 160deg); }
  75% { transform: translate3d(8px, 360px, 0) rotate3d(.6, .2, 1, 230deg); }
  100% { transform: translate3d(-6px, 490px, 0) rotate3d(.6, .2, 1, 300deg); }
}

/* El borde rasgado inferior sobresale un poco a los lados de la foto */
.arch::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: -2px;
  z-index: 2;
  height: var(--torn-h);
  background: var(--torn) center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- 10. Sección 4 · Mensaje ---------- */
.message {
  padding-top: var(--space-l);
  text-align: center;
}

.message__text {
  max-width: 20em;
  margin-inline: auto;
  font-size: clamp(1.02rem, 4.5vw, 1.12rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- 11. Sección 5 · Fecha y calendario ---------- */
.date {
  padding-top: var(--space-l);
  padding-bottom: var(--space-xl);
  text-align: center;
}

.date__eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.9rem, 4.2vw, 1.02rem);
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.date__numbers {
  margin-top: .3rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 11vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: .06em;
  color: var(--ink);
}

.date__weekday {
  margin-top: .15rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.8rem, 3.6vw, .9rem);
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.calendar {
  max-width: 340px;
  margin: var(--space-m) auto 0;
}

.calendar__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: var(--font-display);
}

.calendar__table th {
  padding-bottom: .5rem;
  font-weight: 600;
  font-size: clamp(.6rem, 2.7vw, .68rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.calendar__table td {
  position: relative;
  height: clamp(30px, 9vw, 36px);
  text-align: center;
  font-weight: 500;
  font-size: clamp(.95rem, 4.3vw, 1.08rem);
  color: var(--ink);
}

.calendar__day--event span:first-of-type {
  position: relative;
  font-weight: 700;
  color: var(--cream);
}

.calendar__heart {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 36px;
  translate: -50% -48%;
  color: var(--olive);
  filter: drop-shadow(0 3px 4px rgba(40, 45, 25, .35));
}

/* ---------- 12. Sección 6 · Con mucho amor (panel + foto) ---------- */
.love {
  padding-top: calc(var(--torn-h) + var(--space-l));
  text-align: center;
}

.love__text {
  position: relative;
  z-index: 2;
  padding-inline: var(--gutter);
}

.love__script {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.3rem, 11.4vw, 2.8rem);
  line-height: 1.15;
  color: var(--cream);
}

.love__names {
  margin-top: .4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.86rem, 4vw, .98rem);
  letter-spacing: .4em;
  text-indent: .4em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--cream);
}

.love__names span { display: block; }

.love__heart {
  width: 16px;
  height: 14px;
  margin: .7rem auto 0;
  color: var(--gold-light);
}

.love__photo {
  position: relative;
  margin-top: -12px;
}

.love__photo .photo { aspect-ratio: 480 / 400; }

/* La foto se funde con el panel por arriba */
.love__photo::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 38%;
  background: linear-gradient(var(--olive-dark), rgba(59, 70, 48, 0));
  pointer-events: none;
}

/* ---------- 13. Sección 7 · Programa ---------- */
.program {
  z-index: 2;
  padding-top: calc(min(100vw, var(--invite-max)) * .28);
  padding-bottom: var(--space-xl);
}

.garland--top { top: calc(min(100vw, var(--invite-max)) * -.11); }

.program .heart-rule { margin-bottom: var(--space-l); }

.timeline {
  --icon: clamp(58px, 16vw, 66px);
  position: relative;
  display: grid;
  gap: .9rem;
  width: fit-content;
  margin-inline: auto;
}

/* línea vertical que une los círculos */
.timeline::before {
  content: "";
  position: absolute;
  top: calc(var(--icon) / 2);
  bottom: calc(var(--icon) / 2);
  left: calc(var(--icon) / 2 - .75px);
  width: 1.5px;
  background: var(--sage-dark);
  transform-origin: top;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--icon) minmax(0, 13.5rem);
  align-items: center;
  column-gap: clamp(1rem, 5vw, 1.5rem);
  row-gap: .9rem;
}

.timeline__item:not(:last-child)::after {
  content: "";
  grid-column: 2;
  width: min(100%, 8.5rem);
  height: 10px;
  background: var(--mini-rule) center / contain no-repeat;
}

.timeline__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--icon);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(140, 155, 105, .55), transparent 60%),
    linear-gradient(160deg, var(--olive), var(--olive-deep));
  box-shadow:
    0 0 0 4px var(--paper),
    inset 0 0 0 3px rgba(43, 52, 35, .55),
    inset 0 0 0 4px rgba(230, 211, 166, .28),
    var(--shadow-soft);
  color: var(--cream);
}

.timeline__icon svg { width: 50%; height: 50%; }

.timeline__text {
  display: grid;
  gap: .1rem;
}

.timeline__text time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 6vw, 1.5rem);
  line-height: 1.1;
  color: var(--ink);
}

.timeline__text span {
  font-size: clamp(.92rem, 4.1vw, 1rem);
  line-height: 1.3;
  color: var(--ink-soft);
}

/* ---------- 14. Sección 8 · Vestimenta y regalos ---------- */
.attire {
  z-index: 3;
  padding: calc(var(--torn-h) + var(--space-l)) var(--gutter) calc(min(100vw, var(--invite-max)) * .2 + var(--space-l));
  text-align: center;
}

.attire__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 4.6vw, 1.14rem);
  letter-spacing: .2em;
  text-indent: .2em;
  text-transform: uppercase;
}

.attire__swatches {
  display: flex;
  justify-content: center;
  gap: clamp(.55rem, 3vw, .85rem);
  margin-top: var(--space-m);
}

.attire__swatches li {
  width: clamp(36px, 10.5vw, 44px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    0 0 0 1.5px rgba(243, 238, 226, .75),
    0 6px 10px -6px rgba(0, 0, 0, .6);
}

.attire__style {
  margin-top: .8rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 6.4vw, 1.65rem);
  letter-spacing: .04em;
}

.attire__rings {
  width: 38px;
  height: 38px;
  margin: var(--space-m) auto .6rem;
  color: var(--gold-light);
}

.attire__gift p {
  max-width: 19em;
  margin-inline: auto;
  font-size: clamp(1rem, 4.4vw, 1.08rem);
  line-height: 1.5;
  text-wrap: balance;
}

.attire__heart {
  width: 14px;
  height: 13px;
  margin: .9rem auto 0;
  color: var(--gold-light);
}

/* Guirnalda inferior: invertida, sobresale hacia la sección del lugar */
.garland--bottom {
  bottom: calc(min(100vw, var(--invite-max)) * -.13);
  z-index: 4;
  transform: scaleY(-1);
}

/* ---------- 15. Sección 9 · Lugar del evento ---------- */
.venue {
  padding-top: calc(min(100vw, var(--invite-max)) * .2 + var(--space-l));
  padding-bottom: var(--space-xl);
  text-align: center;
}

/* Dentro de la sección (content-visibility recorta lo que sobresale) */
.venue__spray {
  right: -30px;
  bottom: 18px; /* margen para el vaivén de ±16px */
  width: clamp(56px, 15vw, 66px); /* queda junto a la dirección y el botón, sin tocar el nombre */
  height: auto;
  aspect-ratio: 120 / 300;
  transform: scaleX(-1) rotate(-8deg);
}

/* Con más ancho hay sitio junto al botón: el ramo se asoma más */
@media (min-width: 380px) {
  .venue__spray { right: -12px; }
}

.venue__frame {
  width: min(84%, 360px);
  margin: 0 auto;
  padding: 7px;
  background: var(--paper-edge);
  box-shadow: inset 0 0 0 1px rgba(183, 149, 90, .45), var(--shadow-print);
}

.venue__frame .photo {
  aspect-ratio: 420 / 375;
  box-shadow: 0 0 0 1px rgba(183, 149, 90, .35);
}

.venue__name {
  margin-top: var(--space-m);
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 10.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--olive-ink);
}

.venue__address {
  margin: .3rem 0 var(--space-m);
  font-size: clamp(1rem, 4.4vw, 1.08rem);
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- 16. Sección 10 · Galería ---------- */
.gallery {
  padding-bottom: var(--space-xl);
  text-align: center;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 2.4vw, 11px);
  margin-bottom: var(--space-l);
}

.gallery__col {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.4vw, 11px);
}

.gallery__item {
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-print);
}

.gallery__item .photo { height: 100%; }

.gallery__item--a,
.gallery__item--b { aspect-ratio: 240 / 308; }

/* La foto larga absorbe la diferencia de altura entre columnas */
.gallery__item--c { flex: 1; min-height: 0; }
.gallery__item--d { aspect-ratio: 1; }
.gallery__item--e { aspect-ratio: 240 / 137; }

/* ---------- 17. Sección 11 · Sitio web (QR) ---------- */
.website {
  padding-bottom: var(--space-xl);
  text-align: center;
}

.website__text {
  max-width: 17em;
  margin-inline: auto;
  font-size: clamp(.98rem, 4.3vw, 1.06rem);
  line-height: 1.45;
}

.website__qr {
  position: relative;
  width: fit-content;
  margin: var(--space-m) auto 0;
}

.website__code {
  width: clamp(138px, 40vw, 160px);
  height: auto;
  aspect-ratio: 1;
  padding: 2px;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(183, 149, 90, .4), var(--shadow-print);
  fill: var(--olive-deep);
}

.website__euc {
  position: absolute;
  bottom: -6px;
  width: 44px;
  height: auto;
  aspect-ratio: 60 / 150;
  pointer-events: none;
}

.website__euc--l { right: calc(100% + 2px); transform: rotate(-24deg); transform-origin: bottom; }
.website__euc--r { left: calc(100% + 2px); transform: scaleX(-1) rotate(-24deg); transform-origin: bottom; }

/* ---------- 18. Frase + cuenta regresiva ---------- */
.countdown-panel {
  padding: calc(var(--torn-h) + var(--space-l)) var(--gutter) calc(var(--torn-h) + var(--space-l));
  text-align: center;
}

.countdown-panel__quote p {
  max-width: 18em;
  margin-inline: auto;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 5.2vw, 1.3rem);
  line-height: 1.4;
  text-wrap: balance;
}

.countdown-panel__title {
  margin-top: var(--space-m);
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.3rem, 11vw, 2.7rem);
  line-height: 1.1;
  color: var(--gold-light);
}

.countdown { margin-top: var(--space-s); }

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.5rem, 2.6vw, .8rem);
  max-width: 330px;
  margin-inline: auto;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}

.countdown__value {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 68px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(20, 26, 12, .28);
  box-shadow:
    inset 0 0 0 1px rgba(230, 211, 166, .55),
    inset 0 0 0 4px rgba(43, 52, 35, .5),
    0 8px 14px -10px rgba(0, 0, 0, .6);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 6.2vw, 1.6rem);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--cream);
}

.countdown__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.6rem, 2.7vw, .68rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(243, 238, 226, .85);
}

.countdown__done {
  max-width: 18em;
  margin-inline: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.countdown-panel__heart {
  width: 16px;
  height: 14px;
  margin: var(--space-m) auto 0;
  color: var(--gold-light);
}

/* ---------- 19. Confirmación de asistencia ---------- */
.rsvp {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.rsvp__card {
  position: relative;
  padding: 1.8rem clamp(1.1rem, 5vw, 1.6rem) 1.8rem;
  border: var(--line) solid rgba(183, 149, 90, .55);
  border-radius: 6px;
  background-color: var(--paper-light);
  background-image: var(--tex-grain);
  box-shadow: 0 24px 40px -30px rgba(60, 50, 25, .6);
  text-align: center;
}

.rsvp__card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: var(--line) solid rgba(167, 176, 154, .45);
  border-radius: 3px;
  pointer-events: none;
}

.rsvp__card .script-title { font-size: clamp(2.1rem, 10.4vw, 2.6rem); }

.rsvp__intro {
  max-width: 20em;
  margin: 0 auto 1.4rem;
  font-size: clamp(.95rem, 4.2vw, 1.02rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

.rsvp__form {
  position: relative;
  display: grid;
  gap: 1.15rem;
  text-align: left;
}

.field {
  display: grid;
  gap: .4rem;
  min-width: 0;
}

.field__label {
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.7rem, 3.1vw, .76rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--olive-dark);
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: var(--line) solid rgba(125, 135, 106, .55);
  border-radius: 6px;
  background: rgba(255, 255, 255, .7);
  font-family: var(--font-text);
  font-size: 1rem; /* 16px evita el zoom automático en iOS */
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.field__input::placeholder { color: #85836f; }

.field__input:focus {
  outline: none;
  border-color: var(--olive);
  background-color: #fffdf8;
  box-shadow: 0 0 0 3px rgba(74, 86, 57, .16);
}

.field__input--area {
  min-height: 92px;
  resize: vertical;
  line-height: 1.4;
}

.field__input[aria-invalid="true"] {
  border-color: #a4473a;
  box-shadow: 0 0 0 3px rgba(164, 71, 58, .12);
}

.field__error {
  font-size: .86rem;
  line-height: 1.3;
  color: #8f3427;
}

.field__error:empty { display: none; }

.field__hint {
  font-size: .85rem;
  color: var(--ink-soft);
}

.stepper {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: var(--line) solid rgba(125, 135, 106, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  overflow: hidden;
}

.stepper__btn {
  width: 48px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--olive-dark);
  cursor: pointer;
  transition: background-color .2s ease;
}

.stepper__btn:hover:not(:disabled) { background-color: rgba(74, 86, 57, .09); }
.stepper__btn:disabled { opacity: .3; cursor: default; }

.stepper__btn:focus-visible,
.stepper__value:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: -3px;
}

.stepper__value {
  width: 3.2rem;
  height: 46px;
  border: 0;
  border-inline: var(--line) solid rgba(125, 135, 106, .35);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  font-variant-numeric: lining-nums;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper__value::-webkit-inner-spin-button,
.stepper__value::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.companions {
  display: grid;
  gap: .4rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.companions[hidden] { display: none; }

.companions__list {
  display: grid;
  gap: .7rem;
  padding-left: .9rem;
  border-left: var(--line) solid var(--sage);
}

.companion {
  gap: .25rem;
  animation: field-in .5s ease both;
}

.companion__label {
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-soft);
}

@keyframes field-in {
  from { opacity: 0; translate: 0 -6px; }
}

.rsvp__form .btn { margin-top: .4rem; }

.rsvp__form .btn svg { width: 17px; height: 15px; }

@media (hover: hover) {
  .rsvp__form .btn:hover svg { animation: heartbeat 1.4s ease-in-out infinite; }
}

.rsvp__status {
  text-align: center;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--olive-dark);
}

.rsvp__status:empty { display: none; }
.rsvp__status.is-error { color: #8f3427; }

.rsvp__success {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: .5rem 0;
  animation: field-in .8s ease both;
}

.rsvp__success[hidden] { display: none; }
.rsvp__success:focus { outline: none; }

.rsvp__success-heart {
  width: 72px;
  aspect-ratio: 64 / 48;
  height: auto;
  color: var(--gold);
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw-heart 1.8s ease .2s forwards;
}

@keyframes draw-heart { to { stroke-dashoffset: 0; } }

.rsvp__success-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 11vw, 2.9rem);
  line-height: 1.1;
  color: var(--olive-ink);
}

.rsvp__success-text {
  max-width: 20em;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- 20. Agradecimiento con foto ---------- */
.thanks {
  position: relative;
  color: #fff;
  text-align: center;
}

.thanks .photo { aspect-ratio: 480 / 615; }
.thanks .photo img { object-position: 50% 35%; }

.thanks::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 48%;
  background: linear-gradient(rgba(20, 22, 12, 0), rgba(20, 22, 12, .78));
  pointer-events: none;
}

.thanks__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-l);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: .35rem;
  padding-inline: var(--gutter);
}

.thanks__script {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 14vw, 3.5rem);
  line-height: 1.1;
}

.thanks__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.78rem, 3.5vw, .88rem);
  letter-spacing: .26em;
  text-indent: .26em;
  line-height: 1.6;
  text-transform: uppercase;
}

.thanks__heart {
  width: 13px;
  height: 12px;
  margin-top: .3rem;
  color: var(--gold-light);
}

/* ---------- 21. Código del diseño ---------- */
.design-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-l) var(--gutter) calc(var(--space-xl) + env(safe-area-inset-bottom));
  border-top: var(--line) solid rgba(230, 211, 166, .45);
  text-align: center;
}

.design-code__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.82rem, 3.8vw, .95rem);
  letter-spacing: .24em;
  text-transform: uppercase;
}

.design-code__code {
  position: relative;
  margin: var(--space-s) 0 var(--space-l);
  padding: .5rem clamp(2rem, 11vw, 3rem) .55rem;
  border: var(--line) solid var(--gold-soft);
  border-radius: 999px;
  background:
    radial-gradient(100% 140% at 50% 0%, rgba(255, 255, 255, .1), transparent 60%),
    rgba(20, 26, 12, .25);
  box-shadow:
    inset 0 0 0 3px rgba(43, 52, 35, .6),
    inset 0 0 0 4px rgba(230, 211, 166, .25);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 8.5vw, 2.1rem);
  letter-spacing: .08em;
  line-height: 1.2;
}

/* ---------- 22. Animaciones de aparición ---------- */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.has-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* Foto en arco: se "revela" como una instantánea */
.has-reveal .arch[data-reveal] { transform: translateY(24px) scale(.97); transition-duration: .9s; }
.has-reveal .arch[data-reveal].is-visible { transform: none; }

.has-reveal .arch .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 40%, #fbf8f1, #e2dccb);
  pointer-events: none;
  transition: opacity 1.3s ease .25s;
}

.has-reveal .arch .photo img {
  scale: 1.08;
  transition: scale 1.8s cubic-bezier(.2, .7, .2, 1) .25s, opacity .6s ease;
}

.has-reveal .arch.is-visible .photo::before { opacity: 0; }
.has-reveal .arch.is-visible .photo img { scale: 1; }

.has-reveal .arch__line {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s cubic-bezier(.55, .1, .3, 1) .5s;
}

.has-reveal .arch.is-visible .arch__line { clip-path: inset(0); }

/* Fotos con telón. Se recorta la imagen y no el contenedor, que es el que observa el IntersectionObserver. */
.has-reveal [data-reveal="curtain"] {
  opacity: 1;
  transform: none;
}

.has-reveal [data-reveal="curtain"] img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s cubic-bezier(.65, 0, .25, 1), opacity .6s ease;
}

.has-reveal [data-reveal="curtain"].is-visible img { clip-path: inset(0); }

.gallery__item--b { --d: .12s; }
.gallery__item--c { --d: .2s; }
.gallery__item--d { --d: .28s; }
.gallery__item--e { --d: .36s; }
.has-reveal .gallery__item img { transition-delay: var(--d, 0s); }

/* Nombres: aparecen como escritos a mano */
.has-reveal .couple__names[data-reveal] { opacity: 1; transform: none; }

.has-reveal .couple__name,
.has-reveal .couple__and {
  clip-path: inset(-30% 108% -40% -15%);
  transition: clip-path .95s cubic-bezier(.55, .1, .3, 1);
}

.has-reveal .couple__and { transition-delay: .7s; transition-duration: .45s; }
.has-reveal .couple__name:last-child { transition-delay: .95s; }

.has-reveal .couple__names.is-visible .couple__name,
.has-reveal .couple__names.is-visible .couple__and { clip-path: inset(-30% -15% -40% -15%); }

/* Programa: los elementos entran en cascada */
.timeline__item:nth-child(2) { --i: 1; }
.timeline__item:nth-child(3) { --i: 2; }
.timeline__item:nth-child(4) { --i: 3; }
.has-reveal .timeline__item[data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }

.has-reveal .timeline__icon {
  scale: .6;
  transition: scale .7s cubic-bezier(.3, 1.5, .5, 1) calc(var(--i, 0) * 90ms + .1s);
}

.has-reveal .timeline__item.is-visible .timeline__icon { scale: 1; }

/* Calendario: el corazón del día de la boda late una vez al aparecer */
.has-reveal .calendar.is-visible .calendar__heart { animation: heart-pop .9s cubic-bezier(.3, 1.6, .5, 1) .4s both; }

@keyframes heart-pop {
  from { scale: 0; }
  to { scale: 1; }
}

/* Brillo dorado de la marca: un solo paso de ida y vuelta (no repinta indefinidamente) */
@keyframes gold-shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* Destello que cruza el código: se mueve con transform (lo resuelve la GPU, sin repintar) */
.shimmer { overflow: hidden; }

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 240, 205, .22) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: sheen 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%, 25% { transform: translateX(-110%); }
  70%, 100% { transform: translateX(110%); }
}

/* Cuenta regresiva: destello dorado cuando cambia la cifra */
.countdown__value.tick { animation: tick .6s ease; }
.countdown__value.tick-alt { animation: tick-alt .6s ease; }

@keyframes tick {
  from { color: #e6d3a6; }
  to { color: #f3eee2; }
}

@keyframes tick-alt {
  from { color: #e6d3a6; }
  to { color: #f3eee2; }
}

@keyframes heartbeat {
  0%, 60%, 100% { scale: 1; }
  15% { scale: 1.25; }
  30% { scale: 1.05; }
  45% { scale: 1.2; }
}

/* Efectos ligados al scroll (navegadores con scroll-driven animations) */
@supports (animation-timeline: view()) {
  .photo--parallax img {
    scale: 1.14;
    animation: photo-parallax linear both;
    animation-timeline: view();
  }

  @keyframes photo-parallax {
    from { translate: 0 -6%; }
    to { translate: 0 6%; }
  }

  .timeline::before {
    animation: draw-line linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 55%;
  }

  @keyframes draw-line {
    from { scale: 1 0; }
    to { scale: 1 1; }
  }

  .couple__spray,
  .venue__spray {
    animation: spray-sway linear both;
    animation-timeline: view();
  }

  @keyframes spray-sway {
    from { translate: 0 16px; }
    to { translate: 0 -16px; }
  }
}

/* ---------- 23. Efecto gota (botones) ---------- */
.drop {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 225, 185, .6) 0%, rgba(240, 225, 185, .25) 45%, rgba(240, 225, 185, 0) 70%);
  pointer-events: none;
  animation: drop-spread .75s cubic-bezier(.2, .6, .3, 1) forwards;
}

@keyframes drop-spread {
  from { transform: scale(0); opacity: 1; }
  to { transform: scale(16); opacity: 0; }
}

/* ---------- 24. Intro · sobre ---------- */
.intro { display: none; }

html.intro-active { overflow: hidden; }

.js .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4.4vh, 2.4rem);
  padding: calc(1.5rem + env(safe-area-inset-top)) var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  transition: opacity .8s ease;
}

/* viñeta suave para dar profundidad */
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 45%, transparent 35%, rgba(12, 16, 6, .5) 100%);
  pointer-events: none;
}

.intro.is-leaving { opacity: 0; pointer-events: none; }

.intro__title,
.intro__couple,
.intro__hint {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--cream);
  transition: opacity .6s ease, translate .6s ease;
}

.intro__title { width: min(88vw, 360px); }

.intro__couple {
  display: grid;
  justify-items: center;
  gap: .35rem;
  width: min(86vw, 340px);
}

/* Letras doradas "bordadas con hilo": se dibuja el contorno y después se rellena de oro */
.thread {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(20, 22, 6, .55));
}

.thread text {
  font-family: var(--font-script);
  text-anchor: middle;
  fill: url(#g-thread);
  fill-opacity: 0;
  stroke: #ecd6a4;
  stroke-width: .75;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
}

.intro.is-ready .thread text {
  animation:
    thread-stitch 1.4s cubic-bezier(.45, .05, .35, 1) forwards,
    thread-gild .8s ease .9s forwards;
}

.intro.is-ready .thread--names text { animation-delay: .4s, 1.2s; }

@keyframes thread-stitch { to { stroke-dashoffset: 0; } }

@keyframes thread-gild {
  to { fill-opacity: 1; stroke-opacity: .35; }
}

.intro__rule {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 62%;
  color: var(--gold-light);
  opacity: 0;
  transition: opacity 1s ease 1.6s;
}

.intro.is-ready .intro__rule { opacity: .9; }

.intro__rule::before,
.intro__rule::after {
  content: "";
  flex: 1;
  height: var(--line);
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.intro__rule::after { transform: scaleX(-1); }

.intro__rule svg { width: 11px; height: 10px; flex: none; }

.intro__hint {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 4.4vw, 1.12rem);
  letter-spacing: .04em;
  opacity: .9;
}

.intro__hint svg {
  width: 13px;
  height: 12px;
  color: var(--gold-light);
  animation: heartbeat 1.6s ease-in-out infinite;
}

.intro.is-opening .intro__title { opacity: 0; translate: 0 -10px; }
.intro.is-opening .intro__couple { opacity: 0; translate: 0 10px; }
.intro.is-opening .intro__hint { opacity: 0; translate: 0 10px; }

.intro__euc {
  position: absolute;
  z-index: 0;
  width: clamp(70px, 20vw, 100px);
  aspect-ratio: 60 / 150;
  opacity: .45;
  pointer-events: none;
}

.intro__euc--tl { top: -14px; left: 6px; transform: rotate(150deg); }
.intro__euc--br { bottom: -14px; right: 6px; transform: rotate(-30deg); }

/* Pétalos de rosa blanca que flotan */
.intro__petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -6%;
  width: var(--s);
  height: calc(var(--s) * .82);
  border-radius: 60% 60% 55% 55% / 70% 70% 40% 40%;
  background: radial-gradient(circle at 50% 90%, #fffefa 0%, #f6efe2 55%, #e2d6bd 100%);
  box-shadow: inset 0 -1px 2px rgba(150, 130, 90, .25);
  opacity: var(--o, .8);
  animation: petal-fall var(--dur, 12s) linear var(--delay, 0s) infinite;
}

.petal--leaf {
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, #c4cbb3, #859173);
}

/* Valores fijos (sin variables) para que la GPU anime los pétalos sin pasar por el hilo principal */
.petal--b { animation-name: petal-fall-b; }
.petal--c { animation-name: petal-fall-c; }

@keyframes petal-fall {
  0% { transform: translate3d(0, -5vh, 0) rotate3d(1, .4, .2, 0deg); }
  25% { transform: translate3d(28px, 25vh, 0) rotate3d(1, .4, .2, 120deg); }
  50% { transform: translate3d(-28px, 55vh, 0) rotate3d(1, .4, .2, 220deg); }
  75% { transform: translate3d(28px, 85vh, 0) rotate3d(1, .4, .2, 300deg); }
  100% { transform: translate3d(0, 112vh, 0) rotate3d(1, .4, .2, 400deg); }
}

@keyframes petal-fall-b {
  0% { transform: translate3d(0, -5vh, 0) rotate3d(.3, 1, .2, 0deg); }
  25% { transform: translate3d(-22px, 25vh, 0) rotate3d(.3, 1, .2, -110deg); }
  50% { transform: translate3d(18px, 55vh, 0) rotate3d(.3, 1, .2, -200deg); }
  75% { transform: translate3d(-22px, 85vh, 0) rotate3d(.3, 1, .2, -290deg); }
  100% { transform: translate3d(0, 112vh, 0) rotate3d(.3, 1, .2, -380deg); }
}

@keyframes petal-fall-c {
  0% { transform: translate3d(0, -5vh, 0) rotate3d(1, .2, .6, 0deg); }
  25% { transform: translate3d(12px, 25vh, 0) rotate3d(1, .2, .6, 90deg); }
  50% { transform: translate3d(-34px, 55vh, 0) rotate3d(1, .2, .6, 200deg); }
  75% { transform: translate3d(10px, 85vh, 0) rotate3d(1, .2, .6, 280deg); }
  100% { transform: translate3d(-6px, 112vh, 0) rotate3d(1, .2, .6, 360deg); }
}

/* Sobre */
.envelope {
  position: relative;
  z-index: 3;
  width: min(84vw, 360px);
  aspect-ratio: 4 / 3;
  perspective: 1100px;
  cursor: pointer;
  animation: envelope-float 6s ease-in-out infinite;
  transition: scale 1s cubic-bezier(.4, 0, .2, 1), opacity .9s ease;
}

@keyframes envelope-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.intro.is-leaving .envelope { scale: 1.12; opacity: 0; }

.envelope__back {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background-color: #e9e1cf;
  background-image:
    var(--tex-grain),
    linear-gradient(180deg, #e2d9c5, #eee7d8);
  box-shadow:
    0 28px 40px -18px rgba(8, 10, 3, .75),
    0 2px 5px rgba(8, 10, 3, .25);
}

.envelope__letter {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 5%;
  height: 88%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .2rem;
  padding: 9% 6% 0;
  border-radius: 4px;
  background-color: var(--paper-light);
  background-image:
    var(--tex-grain),
    radial-gradient(120% 70% at 50% 0%, #fffdf8, transparent 70%);
  box-shadow: 0 -2px 10px rgba(50, 45, 20, .15);
  text-align: center;
  color: var(--ink);
  transition: translate .8s cubic-bezier(.3, .7, .2, 1);
}

.envelope__letter::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: var(--line) solid rgba(167, 176, 154, .7);
  border-radius: 3px;
  pointer-events: none;
}

.envelope__letter-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.58rem, 2.6vw, .68rem);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.envelope__letter-names {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 7.6vw, 2.1rem);
  line-height: 1.15;
  white-space: nowrap;
  color: var(--olive-ink);
}

.envelope__letter-names span { color: var(--gold); }

.envelope__letter-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.72rem, 3.2vw, .82rem);
  letter-spacing: .26em;
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}

.envelope__pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
}

/* La sombra de la solapa va en un pseudo-elemento: un filter en la solapa anularía su 3D */
.envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56%;
  z-index: 3;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.45, 0, .2, 1) .1s;
}

.envelope__flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.envelope__flap-face svg {
  width: 100%;
  height: 100%;
}

.envelope__flap-face--front {
  background-color: #f3eee2;
  background-image:
    var(--tex-grain),
    linear-gradient(180deg, #faf6ee 0%, #ece4d3 100%);
}

/* forro interior verde oliva */
.envelope__flap-face--back {
  transform: rotateX(180deg);
  background-color: var(--olive);
  background-image:
    var(--tex-grain),
    linear-gradient(0deg, var(--olive-dark), var(--olive));
}

.envelope.is-open .envelope__flap { transform: rotateX(180deg); }
.envelope.is-flap-behind .envelope__flap { z-index: 0; }
.envelope.is-letter-out .envelope__letter { translate: 0 -54%; }

.envelope__flora {
  position: absolute;
  z-index: 5;
  width: 52%;
  aspect-ratio: 220 / 200;
  pointer-events: none;
  filter: drop-shadow(0 5px 6px rgba(10, 14, 4, .35));
  transition: opacity .7s ease, scale .7s ease;
}

.envelope__flora--bl { left: -17%; bottom: -20%; }
.envelope__flora--tr { right: -15%; top: -18%; transform: rotate(180deg) scale(.74); }

.envelope.is-open .envelope__flora { opacity: 0; scale: .85; }

/* Sello de lacre verde oliva */
.envelope__seal {
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 6;
  width: clamp(66px, 19vw, 80px);
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 47% 53% 51% 49% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 34% 28%, #84915b 0%, #5a6740 32%, #3c4726 72%, #2a321a 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, .25),
    inset 0 -5px 9px rgba(0, 0, 0, .4),
    0 8px 14px rgba(10, 14, 4, .4),
    0 0 0 3px rgba(74, 86, 57, .6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .45s ease, scale .5s cubic-bezier(.5, 0, .7, .4), rotate .5s ease;
}

.envelope__seal::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1.5px solid rgba(230, 211, 166, .75);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .12);
}

/* halo que invita a tocar */
.envelope__seal::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(230, 211, 166, .7);
  animation: seal-halo 2.6s ease-out infinite;
}

@keyframes seal-halo {
  from { transform: scale(.88); opacity: .9; }
  to { transform: scale(1.4); opacity: 0; }
}

.envelope__seal-mark {
  position: relative;
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 6.4vw, 1.8rem);
  line-height: 1;
  color: #ecd7a6;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 -1px 0 rgba(255, 240, 205, .2);
}

.envelope__seal-mark span { font-size: .78em; margin: 0 .04em; }

.envelope__seal:hover { scale: 1.05; }

.envelope__seal:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 6px;
}

.envelope.is-open .envelope__seal {
  opacity: 0;
  scale: .4;
  rotate: -25deg;
  pointer-events: none;
}

/* Mientras el sobre está cerrado, la invitación no se dibuja (ahorra trabajo en la carga).
   Se prepara al tocar el sello, durante la animación de apertura.
   No se anima la invitación completa: sería una capa enorme para la memoria del móvil. */
.js.intro-active:not(.intro-opening) .invitation { content-visibility: hidden; }

/* ---------- 25. Música y progreso ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  width: min(100%, var(--invite-max));
  height: 2px;
  translate: -50% 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transform-origin: left;
}

.music {
  --size: 48px;
  position: fixed;
  z-index: 60;
  left: calc(50% + min(50%, var(--invite-max) / 2) - var(--size) - 14px - env(safe-area-inset-right));
  top: calc(14px + env(safe-area-inset-top));
  width: var(--size);
  height: var(--size);
  transition: opacity .6s ease .5s, scale .6s cubic-bezier(.3, 1.4, .5, 1) .5s, visibility 0s .5s;
}

.intro-active .music,
.intro-active .scroll-progress {
  opacity: 0;
  scale: .6;
  visibility: hidden; /* tampoco se alcanza con Tab mientras el sobre está cerrado */
  pointer-events: none;
}

.music__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: var(--line) solid var(--gold-soft);
  border-radius: 50%;
  overflow: hidden;
  color: var(--gold-light);
  background-color: var(--olive);
  background-image:
    radial-gradient(circle at 35% 28%, rgba(140, 155, 105, .55), transparent 60%),
    linear-gradient(160deg, var(--olive), var(--olive-deep));
  box-shadow:
    inset 0 0 0 3px rgba(43, 52, 35, .55),
    inset 0 0 0 4px rgba(230, 211, 166, .25),
    0 10px 20px -8px rgba(25, 30, 14, .7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale .3s ease;
}

.music__btn:hover { scale: 1.06; }
.music__btn:active { scale: .94; }

.music__btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.music__icon {
  width: 21px;
  height: 21px;
}

/* Ecualizador: cinco barras doradas con ritmos distintos, como niveles de audio reales.
   Solo se anima scale (GPU) y solo mientras suena. */
.music__bars {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  height: 20px;
  margin-top: 2px;
}

.music__bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(#fbf0d2, #e6d3a6 45%, #c39f5c);
  box-shadow: 0 0 4px rgba(240, 220, 170, .45);
  transform-origin: bottom;
  scale: 1 .35;
}

.music.is-playing .music__bars i { animation: eq-a .9s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-name: eq-b; animation-duration: .75s; animation-delay: -.2s; }
.music.is-playing .music__bars i:nth-child(3) { animation-name: eq-c; animation-duration: 1.05s; animation-delay: -.5s; }
.music.is-playing .music__bars i:nth-child(4) { animation-name: eq-b; animation-duration: .85s; animation-delay: -.65s; }
.music.is-playing .music__bars i:nth-child(5) { animation-name: eq-a; animation-duration: .7s; animation-delay: -.35s; }

/* Valores fijos (sin variables) para que la GPU anime las barras */
@keyframes eq-a {
  0%, 100% { scale: 1 .3; }
  20% { scale: 1 .85; }
  40% { scale: 1 .5; }
  60% { scale: 1 1; }
  80% { scale: 1 .45; }
}

@keyframes eq-b {
  0%, 100% { scale: 1 .55; }
  25% { scale: 1 .25; }
  50% { scale: 1 .95; }
  75% { scale: 1 .6; }
}

@keyframes eq-c {
  0%, 100% { scale: 1 .8; }
  30% { scale: 1 .35; }
  55% { scale: 1 1; }
  80% { scale: 1 .5; }
}

/* Ondas de sonido: dos anillos que se expanden y se desvanecen mientras suena */
.music__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.music__rings i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* dorado medio: se ve tanto sobre el papel marfil como sobre los paneles oliva */
  border: 2px solid rgba(183, 149, 90, .85);
  box-shadow: 0 0 6px rgba(230, 211, 166, .5);
  opacity: 0;
}

.music.is-playing .music__rings i { animation: sound-ring 2.4s cubic-bezier(.2, .6, .35, 1) infinite; }
.music.is-playing .music__rings i:nth-child(2) { animation-delay: 1.2s; }

@keyframes sound-ring {
  from { transform: scale(1); opacity: .75; }
  to { transform: scale(1.75); opacity: 0; }
}

/* Halo dorado que late suave detrás del botón mientras suena */
.music::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 211, 166, .55) 0%, rgba(230, 211, 166, .18) 55%, rgba(230, 211, 166, 0) 72%);
  opacity: 0;
  transition: opacity .5s ease;
}

.music.is-playing::after {
  opacity: 1;
  animation: glow-beat 1.6s ease-in-out infinite;
}

@keyframes glow-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Al sonar, el botón se aclara un poco hacia el dorado */
.music.is-playing .music__btn {
  border-color: var(--gold-light);
  box-shadow:
    inset 0 0 0 3px rgba(43, 52, 35, .55),
    inset 0 0 0 4px rgba(230, 211, 166, .45),
    0 0 14px rgba(230, 211, 166, .35),
    0 10px 20px -8px rgba(25, 30, 14, .7);
}

/* mientras la canción carga tras pedirla */
.music.is-loading .music__icon { animation: heartbeat 1.4s ease-in-out infinite; }

.music.is-playing .music__icon { display: none; }
.music.is-playing .music__bars { display: flex; }

/* ondas de gota alrededor del botón */
.music__wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(205, 178, 127, .85);
  pointer-events: none;
  animation: wave-out 1.3s cubic-bezier(.2, .6, .3, 1) var(--delay, 0s) both;
}

@keyframes wave-out {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(2.2); opacity: 0; }
}

/* ---------- 26. Rendimiento ---------- */
/* Las secciones lejanas no se procesan hasta acercarse al viewport.
   "auto" recuerda la altura real una vez dibujadas, así la barra de scroll no salta.
   Solo en secciones sin adornos que sobresalgan (se recortarían). */
.venue,
.gallery,
.website,
.countdown-panel,
.rsvp,
.thanks,
.design-code {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

/* ---------- 27. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .photo--parallax img,
  .timeline::before,
  .couple__spray,
  .venue__spray,
  .envelope,
  .brand__name span,
  .shimmer::after,
  .music::after,
  .music__rings i,
  .music__bars i { animation: none !important; }

  /* Sin movimiento: el ecualizador queda quieto con alturas distintas */
  .music__bars i:nth-child(odd) { scale: 1 .55; }
  .music__bars i:nth-child(even) { scale: 1 .9; }

  .has-reveal [data-reveal] { opacity: 1; }
  .photo--parallax img { scale: 1; }

  .thread text { fill-opacity: 1; stroke-opacity: .35; stroke-dashoffset: 0; }
  .intro__rule { opacity: .9; }
}
