/* Logo animado (public/js/marca.js). Ciclo de 4 s: la pelota blanca gira de arriba hacia la derecha y la
   azul de abajo hacia la derecha (sentido contrario): chocan a la derecha (25 %) y a la izquierda (75 %).
   En cada choque, chispas y el rayo destella. Todo es transform/opacity. */
.md-mark { --md-out: cubic-bezier(.23, 1, .32, 1); display: inline-block; width: 30px; height: 30px; flex: none; }
.md-mark svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 6px rgb(228 87 46 / 35%)); }
.md-mark svg g, .md-mark .md-flash { transform-box: view-box; transform-origin: 32px 32px; }
.md-mark .md-ring { animation: md-spin 18s linear infinite; }
/* Vuelta pareja (linear): así el choque cae justo en el 25 % y el 75 %, con las chispas. */
.md-mark .md-a { animation: md-spin 4s linear infinite; }
.md-mark .md-b { animation: md-spin-back 4s linear infinite; }
.md-mark .md-bolt { animation: md-strike 4s ease-out infinite; }
.md-mark .md-flash { opacity: 0; animation: md-flash 4s ease-out infinite; }
.md-mark .md-sp { opacity: 0; }
.md-mark .md-sp-r { transform-origin: 55px 32px; animation: md-spark 4s ease-out infinite; }
.md-mark .md-sp-l { transform-origin: 9px 32px; animation: md-spark 4s ease-out 2s infinite; }
.md-mark.big { width: 92px; height: 92px; }
/* Al pasar el mouse: el rayo se inclina y crece un poco (se puede interrumpir). */
.md-mark .md-hover { transition: transform .3s var(--md-out); }
@media (hover: hover) and (pointer: fine) {
  .brand:hover .md-mark .md-hover, .md-mark.big:hover .md-hover { transform: rotate(-8deg) scale(1.1); }
}
/* Entrada: el rayo cae desde arriba con un rebote corto. */
.md-mark.md-intro .md-drop { animation: md-drop .7s var(--md-out) both; }

@keyframes md-spin { to { transform: rotate(360deg); } }
@keyframes md-spin-back { to { transform: rotate(-360deg); } }
@keyframes md-strike {
  0%, 18%, 32%, 68%, 82%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(1.1); }
}
@keyframes md-flash { 0%, 20%, 34%, 70%, 84%, 100% { opacity: 0; } 25%, 75% { opacity: 1; } }
@keyframes md-spark {
  0%, 22% { opacity: 0; transform: scale(.4); }
  25% { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(1.3); }
}
@keyframes md-drop {
  0% { opacity: 0; transform: translateY(-18px) scale(1.25) rotate(-10deg); }
  60% { opacity: 1; transform: translateY(2px) scale(.96) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}
/* Portada: el logo grande sobre el naranjo del encabezado. */
.hero-sport .md-mark svg { filter: drop-shadow(0 6px 18px rgb(0 0 0 / 25%)); }
@media (prefers-reduced-motion: reduce) {
  .md-mark svg g, .md-mark .md-flash { animation: none !important; }
  .md-mark .md-hover { transition: none; }
}
