/* Botones de Forge: copia del bloque de estilos.css (la portada sigue usando el suyo). Si se cambia uno, cambiar el otro. */
/*
   Borde de 1 px blanco al 10%. Encima, una capa <i> con un conic-gradient enmascarado solo al borde (dos luces
   blancas opuestas, en 25% y 75%) con mix-blend-mode screen, que da una vuelta cada 5 s (se pausa fuera de
   pantalla: --play). Al pasar el mouse el borde sube al 40% y cada letra baja 4em en 0,5 s con 0,02 s de
   diferencia entre letras, reemplazada por su copia (el text-shadow a -4em). botones.js arma las letras y la capa. */
@property --angulo {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes boton-luz {
  to { --angulo: 360deg; }
}
.boton-linea, .boton-giro {
  --play: running;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: max-content;
  padding: 1.3rem 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.1);
  font-family: 'Bricolage Grotesque', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.5s ease-in-out;
}
.boton__texto {
  display: block;
  position: relative;
  z-index: 1;
  overflow: clip;
  transition: opacity 0.5s ease-in-out;
}
.boton__texto span {
  display: inline-block;
  text-shadow: rgba(255, 255, 255, 0.6) 0 -4em 0;
  transition: transform 0.5s cubic-bezier(0.43, 0.195, 0.02, 1); /* bezzy2 de Forge */
  transition-delay: calc(var(--i, 0) * 0.02s);
}
.boton-linea > i, .boton-giro > i {
  --p: 5%;
  position: absolute;
  inset: -1px;
  z-index: 0;
  padding: 1px;
  pointer-events: none;
  mix-blend-mode: screen;
  background: conic-gradient(
    from var(--angulo) at center,
    transparent calc(25% - var(--p) * 2),
    rgba(255, 255, 255, 0) calc(25% - var(--p)),
    #fff 25%,
    rgba(255, 255, 255, 0) calc(25% + var(--p)),
    transparent calc(25% + var(--p) * 2),
    transparent calc(75% - var(--p) * 2),
    rgba(255, 255, 255, 0) calc(75% - var(--p)),
    #fff 75%,
    rgba(255, 255, 255, 0) calc(75% + var(--p)),
    transparent calc(75% + var(--p) * 2)
  );
  /* Máscara de anillo: solo se pinta el borde, el centro queda transparente */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: boton-luz 5s linear infinite var(--play);
}
@media (hover: hover) and (pointer: fine) {
  .boton-linea:hover, .boton-giro:hover { border-color: rgba(255, 255, 255, 0.4); }
  .boton-linea:hover .boton__texto, .boton-giro:hover .boton__texto { opacity: 0.6; }
  .boton-linea:hover .boton__texto span, .boton-giro:hover .boton__texto span { transform: translateY(4em); }
}
.boton-linea:focus, .boton-giro:focus { outline: none; }
.boton-linea:focus-visible, .boton-giro:focus-visible { outline: 1px dashed rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.boton-giro:disabled { opacity: 0.4; pointer-events: none; }
.boton-giro:disabled > i { animation-play-state: paused; opacity: 0; }
@media (prefers-reduced-motion: reduce) and (min-width: 1024px) {
  .boton-linea > i, .boton-giro > i { animation: none; }
}


/* Celular (sesión celu, 2026-11-10): el brillo gira como una capa en vez de redibujar el degradado mezclado en cada
   cuadro (en el iPhone el repintado constante de los botones frenaba el scroll). Compu sin cambios. */
@media (max-width: 1023px) {
  .boton-linea > i, .boton-giro > i { background: none; mix-blend-mode: normal; animation: none; overflow: hidden; }
  .boton-linea > i::before, .boton-giro > i::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(from 0deg at center, transparent 15%, rgba(255,255,255,0) 20%, rgba(255,255,255,.95) 25%, rgba(255,255,255,0) 30%, transparent 35%, transparent 65%, rgba(255,255,255,0) 70%, rgba(255,255,255,.95) 75%, rgba(255,255,255,0) 80%, transparent 85%);
    animation: luz-gira 5s linear infinite; animation-play-state: var(--play, running); will-change: transform;
  }
  @keyframes luz-gira { to { transform: translate(-50%, -50%) rotate(360deg); } }
}
