/* =====================================================================
   Base común de las tres alternativas: sólo lo funcional
   (menú, calesita, anclas, WhatsApp). El aspecto está en styles.css.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, blockquote { margin: 0; }

.wrap { width: 100%; max-width: var(--container, 1160px); margin: 0 auto; padding: 0 var(--gutter, 24px); }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 16px; background: #000; color: #fff; }
.skip:focus { left: 8px; }

/* Header y menú */
.site-header { position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h, 72px); }
.nav { display: flex; align-items: center; }
.nav a { text-decoration: none; }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile nav { position: absolute; right: 0; top: 54px; min-width: 220px; display: flex; flex-direction: column; }
.nav-mobile nav a { text-decoration: none; }
@media (max-width: 860px) { .nav { display: none; } .nav-mobile { display: block; } }

/* Al tocar el menú, el título de la sección queda justo debajo del header */
section[id] { scroll-margin-top: calc(var(--header-h, 72px) - var(--section-y, 80px) + 24px); }
#inicio { scroll-margin-top: var(--header-h, 72px); }

/* Listas sin viñetas */
.chips, .stats, .hero-facts, .logos { list-style: none; margin: 0; padding: 0; }

/* Calesita de logos */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-speed, 60s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.logos { display: flex; align-items: center; }
.logos li { flex: 0 0 auto; }
.logos img { height: calc(var(--h, 48) * 1px * var(--logo-scale, 1)); width: auto; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-controls { display: flex; justify-content: flex-end; }
.marquee-toggle { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; }
  .marquee-track .logos { flex-wrap: wrap; justify-content: center; row-gap: 28px; }
  .marquee-track .logos[aria-hidden="true"], .marquee-controls { display: none; }
}
@media (max-width: 600px) { .marquee { --logo-scale: .8; } }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float img { width: 34px; height: 34px; }
@media (max-width: 600px) { .wa-float { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); } }
