/* ============================================================
   LOIPON · Base compartida para las 3 direcciones
   Reset + accesibilidad + utilidades de motion.
   El color/tipografía vive en cada archivo de dirección.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

/* Offset de anclas para que el header fijo no tape los títulos */
[id] { scroll-margin-top: 88px; }

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

/* --- Accesibilidad: foco visible siempre --- */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  padding: .6rem 1rem; background: #000; color: #fff;
  z-index: 1000; transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* --- Reveal on scroll (motor en reveal.js) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .9s cubic-bezier(.16,.84,.44,1),
    transform .9s cubic-bezier(.16,.84,.44,1);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="left"].in { transform: none; }

/* --- Conmutador de prototipo (compartido, para comparar) --- */
.proto-switch {
  position: fixed; z-index: 900; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: .18rem;
  padding: .32rem .4rem; border-radius: 100px;
  background: rgba(20,20,22,.82); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  font-family: "Inter", system-ui, sans-serif;
}
.proto-switch__tag {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.42); padding: 0 .55rem 0 .5rem; white-space: nowrap;
}
.proto-switch a {
  font-size: .74rem; font-weight: 500; letter-spacing: .01em;
  color: rgba(255,255,255,.72); padding: .46rem .95rem; border-radius: 100px;
  transition: background .25s ease, color .25s ease; white-space: nowrap;
}
.proto-switch a:hover { color: #fff; background: rgba(255,255,255,.1); }
.proto-switch a[aria-current="page"] { background: #fff; color: #111; }
@media (max-width: 560px) {
  .proto-switch__tag { display: none; }
  .proto-switch a { padding: .44rem .7rem; font-size: .68rem; }
}

/* --- Respeto por reduce motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-parallax] { transform: none !important; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
