/* ==========================================================================
   INVITACIÓN XV AÑOS · style.css
   Estilo "Luxury Black": negro, plata cromada y gris metálico. Mobile-first (390 px).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --negro: #000;
  --carbon: #0b0c0e;
  --blanco: #fff;
  --plata: #eef0f2;
  --gris: #dfe2e6;           /* texto secundario: 14:1 sobre negro, sigue ≥7:1 con un haz de luz detrás */
  --acero: #9aa1a9;          /* solo para dibujos (no es texto) */
  --oro: #f5c542;            /* dorado medio: líneas y dibujos (no es texto) */
  --oro-claro: #ffe08a;      /* dorado claro: etiquetas y textos pequeños (≥7:1 sobre el fondo) */
  --linea-oro: rgba(245, 197, 66, 0.55);

  --linea: rgba(255, 255, 255, 0.2);                 /* bordes decorativos (no son texto) */
  --linea-plata: rgba(214, 219, 225, 0.5);
  --linea-fuerte: rgba(232, 235, 238, 0.62);

  /* Cromo para LETRAS: plata cepillada. El tramo más oscuro (#dcdfe3) sigue dando ≥7:1 sobre el
     fondo, por eso no lleva la banda negra del cromo de espejo (eso queda para los dibujos). */
  --cromo-texto: linear-gradient(180deg, #ffffff 0%, #f4f6f8 34%, #dcdfe3 50%, #fbfcfd 62%, #e4e7ea 100%);

  /* Dorado para el nombre (David). El tramo más oscuro (#ffd966) sigue dando ≥7:1 sobre el fondo. */
  --cromo-oro: linear-gradient(180deg, #fffaeb 0%, #ffeeb0 34%, #ffd966 50%, #fff3c0 62%, #ffe08a 100%);

  --f-titulo: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --f-texto: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  /* márgenes laterales respetando el notch del iPhone */
  --gi: max(1.25rem, env(safe-area-inset-left));
  --gd: max(1.25rem, env(safe-area-inset-right));
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--negro);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--negro);
  color: var(--blanco);
  font-family: var(--f-texto);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

p, h1, dl, dd, dt { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--blanco); outline-offset: 3px; }

main { position: relative; z-index: 1; }

/* Texto solo para lectores de pantalla (no se ve) */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Halo oscuro apenas perceptible detrás de los textos: sobre el negro no se ve, pero separa las
   letras de un destello o billete que pase justo por detrás. */
.hero__invita, .hero__fecha, .anos, .dato dt, .dato dd, .regalo__texto, .regalo__sub, .pie__gracias, .etiqueta, .lbl {
  text-shadow: 0 0 0.45rem rgba(0, 0, 0, 0.9), 0 0 0.15rem rgba(0, 0, 0, 0.9);
}

/* Sombra suave detrás de los textos que no van dentro de una tarjeta: no se ve sobre el negro, pero
   atenúa los billetes, monedas y destellos que pasan justo por detrás (mantiene el contraste ≥7:1). */
.hero__invita, .hero__fecha, .pie__gracias, .pie__nombre, .cuenta > .etiqueta, .hero__hud .etiqueta, .nombre-caja { position: relative; }
.hero__invita::before, .hero__fecha::before, .pie__gracias::before, .pie__nombre::before,
.cuenta > .etiqueta::before, .hero__hud .etiqueta::before, .nombre-caja::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.7rem 0;                  /* a lo ancho no sobresale: así nunca crea scroll horizontal */
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.84) 72%, transparent);
  pointer-events: none;
}

/* Etiquetas pequeñas */
.etiqueta {
  font-family: var(--f-texto);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oro-claro);
}
.etiqueta--brillo { color: var(--oro-claro); }
.etiqueta--centro { text-align: center; padding-left: 0.3em; }

/* Marco elegante: línea fina + línea interior + esquinas marcadas (esquinas en --c, largo --l) */
.marco { position: relative; --c: var(--linea-fuerte); --l: 1rem; border: 1px solid var(--linea-plata); }
.marco::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(214, 219, 225, 0.2);
  pointer-events: none;
}
.marco::after {
  content: "";
  position: absolute;
  inset: -3px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) 0 0 / 2px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 2px var(--l),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) 0 100% / 2px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 2px var(--l);
  background-repeat: no-repeat;
}
.marco--simple::before { display: none; }       /* cajitas pequeñas: sin línea interior */
.marco--suave { --c: rgba(214, 219, 225, 0.55); border-color: rgba(214, 219, 225, 0.22); }
/* Esquinas doradas en la portada, la cuenta regresiva y las tarjetas */
.hero__marco, .caja, .tarjeta { --c: rgba(245, 197, 66, 0.9); }

/* ---------- 4. Fondo de lujo ---------- */
/* Capa fija detrás de todo. El canvas (#efectos) lo dibuja script.js: haces de luz plateados,
   humo, bokeh, destellos y lluvia de billetes y confeti. Las variables --golpe y --energia las
   actualiza script.js en cada cuadro según la canción, y las bocinas las usan para "latir". */
.escenario {
  --golpe: 0;
  --energia: 0;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 70% at 50% 28%, #16181c 0%, #08090b 46%, #000 100%);
  opacity: 0;
  transition: opacity 1.6s ease;
  animation: aparecer-fondo 1.6s ease 1.5s forwards;   /* respaldo si el JavaScript no carga */
}
body.dentro .escenario { opacity: 1; }
/* Fibra de carbono apenas insinuada (damero diagonal de bajísimo contraste) y viñeta */
.escenario::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
}
.escenario::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
}
#efectos { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; }

/* Bocinas casi invisibles (toque "belicón"): contorno plateado muy tenue que late con los graves */
.bocina {
  position: absolute;
  z-index: 0;
  top: 54%;
  width: min(44vw, 11rem);
  aspect-ratio: 11 / 20;
  opacity: calc(0.075 + var(--energia) * 0.12 + var(--golpe) * 0.1);
  fill: none;
  stroke: var(--acero);
  stroke-width: 1;
}
.bocina--izq { left: -10vw; transform: translateY(-50%) rotate(-4deg); }
.bocina--der { right: -10vw; transform: translateY(-50%) rotate(4deg) scaleX(-1); }
.bocina .caja-bocina { fill: rgba(255, 255, 255, 0.02); }
.bocina .tornillos circle { fill: var(--acero); stroke: none; }
.bocina .cono, .bocina .agudo {
  transform-box: fill-box;
  transform-origin: center;
}
.bocina .cono { scale: calc(1 + var(--golpe) * 0.1); }
.bocina .agudo { scale: calc(1 + var(--golpe) * 0.05); }

/* ---------- 5. Portada ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(1rem, env(safe-area-inset-top)) var(--gd) max(1.25rem, env(safe-area-inset-bottom)) var(--gi);
  text-align: center;
}
.hero__marco {
  position: absolute;
  inset: 0.7rem;
  pointer-events: none;
  --l: 1.5rem;
}

.hero__hud {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 0.6rem;
  background: linear-gradient(to right, transparent, rgba(245, 197, 66, 0.75), transparent) bottom / 100% 1px no-repeat;
}
.hero__centro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;            /* centrado debajo de la barra de arriba */
  padding: 3.6rem 0 1rem;    /* arriba queda lugar para la corona */
  width: 100%;
}

/* Aparición escalonada al abrir la página (cada elemento trae su retraso en --ret) */
/* Respaldo: si el JavaScript no llega a cargarse (por ejemplo un archivo mal subido al hosting), la
   portada aparece sola a los 2.5 s en lugar de quedarse invisible. Con JavaScript, .encendida lo reemplaza. */
.revela { opacity: 0; animation: aparecer-respaldo 1.1s ease 2.5s forwards; }
.encendida .revela { animation: aparecer 1.1s ease var(--ret, 0s) forwards; }
@keyframes aparecer { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes aparecer-respaldo { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes aparecer-fondo { to { opacity: 1; } }

/* Medallón: late con los graves (--golpe lo pone script.js) */
.medallon {
  --golpe: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: min(80vw, 20rem);
  aspect-ratio: 1;
  scale: calc(1 + var(--golpe) * 0.028);
}
.medallon__aro {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 calc(0.25rem + var(--golpe) * 0.9rem) rgba(255, 214, 140, calc(0.14 + var(--golpe) * 0.4)));
}
.aro { fill: none; }
.aro--fino { stroke: rgba(245, 197, 66, 0.6); stroke-width: 1; }
.aro--interior { stroke: rgba(245, 197, 66, 0.4); stroke-width: 1; }

/* Aro de eslabones (los dibuja script.js): giran despacio */
.cadena { transform-box: fill-box; transform-origin: center; animation: girar 140s linear infinite; }
.eslabon { fill: none; stroke: url(#cromoLinea); stroke-width: 2.2; }
.eslabon--canto { fill: rgba(245, 197, 66, 0.14); stroke-width: 1.6; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Corona dorada (dibujo: aquí sí lleva la banda oscura del oro de espejo) */
.corona {
  position: absolute;
  z-index: 2;
  top: -2.95rem;
  left: 50%;
  width: 6.4rem;
  translate: -50% 0;
  overflow: visible;
  filter: drop-shadow(0 0 calc(0.2rem + var(--golpe) * 0.7rem) rgba(255, 176, 0, calc(0.22 + var(--golpe) * 0.38)));
}
.corona__cuerpo { fill: rgba(245, 197, 66, 0.09); stroke: url(#cromoCorona); stroke-width: 2.4; stroke-linejoin: round; }
.corona__banda { fill: rgba(245, 197, 66, 0.14); stroke: url(#cromoCorona); stroke-width: 2.2; stroke-linejoin: round; }
.corona__gema { fill: #fff6d6; }

.titulo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 900;
  line-height: 1;
}
.xv {
  --golpe: inherit;
  font-family: var(--f-titulo);
  font-size: clamp(4.4rem, 26vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  padding-left: 0.03em;
  /* capa 1: destello que recorre las letras; capa 2: plata cepillada */
  background:
    linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%) 200% 0 / 260% 100% no-repeat,
    var(--cromo-texto);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 0 calc(0.35rem + var(--golpe) * 0.9rem) rgba(255, 255, 255, calc(0.2 + var(--golpe) * 0.4)))
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55));
}
.encendida .xv { animation: encenderTitulo 1.4s linear 0.6s both, destello 7s ease-in-out 2.6s infinite; }
@keyframes encenderTitulo {
  0%   { opacity: 0; }
  10%  { opacity: 0.95; }
  18%  { opacity: 0.15; }
  30%  { opacity: 1; }
  42%  { opacity: 0.4; }
  58%  { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes destello {
  0%, 52% { background-position: 200% 0, 0 0; }
  82%, 100% { background-position: -110% 0, 0 0; }
}
.anos {
  margin-top: 0.65rem;
  font-family: var(--f-titulo);
  font-size: clamp(1.1rem, 5.8vw, 1.55rem);
  letter-spacing: 0.55em;
  padding-left: 0.55em;
  color: var(--blanco);
}

.hero__invita {
  max-width: 19.5rem;
  margin-top: 1.6rem;
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--plata);
  text-wrap: balance;
}
.nombre-caja { width: 100%; }   /* aquí va la sombra suave: el nombre es texto recortado y no puede llevarla dentro */
.nombre {
  margin-top: 0.35rem;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: clamp(2.5rem, 13.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0.2em;
  padding-left: 0.2em;
  text-transform: uppercase;
  background:
    linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%) 200% 0 / 260% 100% no-repeat,
    var(--cromo-oro);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0.8rem rgba(255, 176, 0, 0.28));
  overflow-wrap: anywhere;
}
.encendida .nombre { animation: aparecer 1.1s ease 1.9s forwards, destello 7s ease-in-out 4.2s infinite; }
/* Filete dorado entre el nombre y la fecha */
.filete {
  width: 9rem;
  height: 1px;
  margin: 0.9rem auto 0;
  background: linear-gradient(to right, transparent, var(--oro), transparent);
  box-shadow: 0 0 0.5rem rgba(255, 176, 0, 0.5);
}
.hero__fecha {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 0.9rem;
  font-family: var(--f-texto);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
/* ---------- 6. Separador de cadena dorada ---------- */
.adorno {
  margin: 1.75rem var(--gd) 0 var(--gi);
}
.adorno__cadena {
  display: block;
  height: 14px;
  /* eslabones dorados: uno de frente y uno de canto, repetidos */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='14' viewBox='0 0 26 14'%3E%3Crect x='1' y='2' width='15' height='10' rx='5' fill='none' stroke='%23f7d98a' stroke-width='1.5'/%3E%3Crect x='11' y='4.8' width='14' height='4.4' rx='2.2' fill='%23d4a62a' fill-opacity='.4' stroke='%23d9b04a' stroke-width='1.3'/%3E%3C/svg%3E") repeat-x center / 26px 14px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  filter: drop-shadow(0 0 0.35rem rgba(255, 176, 0, 0.35));
}

/* ---------- 7. Cuenta regresiva ---------- */
.cuenta { padding: 2.5rem var(--gd) 0 var(--gi); }
.cuenta__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}
.caja {
  --l: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 0.25rem 0.7rem;
  background: linear-gradient(180deg, rgba(26, 28, 32, 0.82), rgba(8, 9, 11, 0.82));
}
.num {
  font-family: var(--f-texto);
  font-weight: 600;
  font-size: clamp(1.5rem, 7vw, 1.9rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--cromo-texto);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 0.5rem rgba(255, 255, 255, 0.22));
}
.lbl {
  font-family: var(--f-texto);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--gris);
}
.hoy {
  margin-top: 1rem;
  padding: 1.1rem 0.5rem;
  border: 1px solid var(--linea-oro);
  background: linear-gradient(180deg, rgba(26, 28, 32, 0.85), rgba(8, 9, 11, 0.85));
  text-align: center;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: clamp(1.15rem, 5.6vw, 1.5rem);
  letter-spacing: 0.14em;
  color: var(--oro-claro);
  text-shadow: 0 0 0.9rem rgba(255, 176, 0, 0.45);
}

/* ---------- 8. Tarjetas ---------- */
.tarjeta {
  margin: 1.5rem var(--gd) 0 var(--gi);
  padding: 1.85rem 1.4rem 1.6rem;
  background: linear-gradient(180deg, rgba(24, 26, 30, 0.8), rgba(7, 8, 10, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 2rem rgba(255, 255, 255, 0.04);
}
.adorno + .tarjeta { margin-top: 1.5rem; }

.datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1rem;
}
.dato { display: grid; gap: 0.2rem; align-content: start; }
.dato--ancho { grid-column: 1 / -1; }
.dato dt {
  font-family: var(--f-texto);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--oro-claro);
}
.dato dd {
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dato__fuerte {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.4rem !important;
  letter-spacing: 0.08em;
}

.dato__direccion {
  margin-top: 0.15rem;
  color: var(--plata);
}

/* Obsequio */
.regalo { text-align: center; }
.sobre {
  display: block;
  width: 3.4rem;
  height: auto;
  margin: 0 auto 0.9rem;
  fill: rgba(245, 197, 66, 0.08);
  stroke: var(--oro);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 0.5rem rgba(255, 176, 0, 0.4));
}
.regalo__texto {
  margin-top: 0.6rem;
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: balance;
}
.regalo__texto strong {
  display: inline-block;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--oro-claro);
  text-shadow: 0 0 0.9rem rgba(255, 176, 0, 0.5), 0 0 0.3rem rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--linea-oro);
}
.regalo__sub {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  background: linear-gradient(to right, transparent, rgba(245, 197, 66, 0.6), transparent) top / 100% 1px no-repeat;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--plata);
  text-wrap: balance;
}

/* ---------- 9. Botón CÓMO LLEGAR ---------- */
.boton {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  margin: 1.75rem var(--gd) 0 var(--gi);
  padding: 0.75rem 1rem;
  /* plata cepillada: el tramo más oscuro (#c9ced4) con texto negro da 13:1 */
  background: linear-gradient(180deg, #fbfcfd 0%, #e2e5e9 46%, #f1f3f5 54%, #c9ced4 100%);
  color: var(--negro);
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-decoration: none;
  outline: 1px solid rgba(245, 197, 66, 0.85);
  outline-offset: 4px;
  box-shadow: 0 0 1.75rem rgba(255, 255, 255, 0.2), 0 0 2.2rem rgba(255, 176, 0, 0.18);
  transition: transform 0.12s ease;
}
/* destello que cruza el botón de vez en cuando */
.boton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: brillo-boton 6s ease-in-out 3s infinite;
}
@keyframes brillo-boton { 0%, 62% { transform: translateX(-120%); } 90%, 100% { transform: translateX(120%); } }
.boton:active { transform: scale(0.98); }
.boton:focus-visible { outline: 2px solid var(--blanco); outline-offset: 4px; }

/* ---------- 10. Pie ---------- */
.pie {
  padding: 2.25rem var(--gd) calc(5rem + env(safe-area-inset-bottom)) var(--gi);
  text-align: center;
}
.pie__gracias {
  max-width: 19rem;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--plata);
  text-wrap: balance;
}
.pie__nombre {
  margin-top: 1.1rem;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  color: var(--oro-claro);
}

/* ---------- 11. Botón flotante de música ---------- */
.musica {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3rem;               /* área táctil 48 px */
  height: 3rem;
  padding: 0;
  border: 1px solid var(--linea-fuerte);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}
.musica:active { transform: scale(0.94); }
/* Mientras la música no ha empezado, el botón "respira" para invitar a tocarlo */
.musica--invita { animation: invita 2.4s ease-in-out infinite; }
@keyframes invita {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 0.5rem rgba(255, 255, 255, 0.18); }
}
.eq { display: flex; align-items: flex-end; gap: 3px; height: 1.1rem; }
.eq i {
  display: block;
  width: 3px;
  height: 100%;
  background: var(--acero);
  transform: scaleY(0.25);
  transform-origin: bottom;
}
.musica--suena .eq i { background: var(--blanco); animation: barra 0.9s ease-in-out infinite alternate; }
.musica--suena .eq i:nth-child(1) { animation-duration: 0.7s; }
.musica--suena .eq i:nth-child(2) { animation-duration: 1.1s; animation-delay: -0.3s; }
.musica--suena .eq i:nth-child(3) { animation-duration: 0.85s; animation-delay: -0.5s; }
.musica--suena .eq i:nth-child(4) { animation-duration: 1s; animation-delay: -0.2s; }
@keyframes barra { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }

/* ---------- 12. Pantallas anchas (por si abren el link en computadora) ---------- */
@media (min-width: 30rem) {
  main { max-width: 30rem; margin: 0 auto; }
}

/* ---------- 13. Movimiento reducido: sin animaciones; todo queda en su estado final ---------- */
@media (prefers-reduced-motion: reduce) {
  .revela, .escenario { opacity: 1; animation: none !important; transition: none; }
  .xv, .nombre { animation: none !important; opacity: 1; }
  .cadena { animation: none; }
  .boton::after { animation: none; display: none; }
  .musica--invita { animation: none; }
  .musica--suena .eq i { animation: none; transform: scaleY(0.7); }
}
