/* CodeCore Studio · reglas comunes de las tres propuestas.
   Cada propuesta define sus colores, tipografías y composición en su propio CSS. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 8px;
  background: #fff; color: #000; text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }

/* Aparición al hacer scroll: fade + desplazamiento corto (16 px), 500 ms.
   Solo se ocultan si hay JavaScript; core.js agrega .is-visible una vez. */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 80ms; }
.js [data-reveal-delay="2"] { transition-delay: 160ms; }
.js [data-reveal-delay="3"] { transition-delay: 240ms; }
.js [data-reveal-delay="4"] { transition-delay: 320ms; }

/* Menú del celular: etiqueta oculta para lectores de pantalla y barras animadas. */
.menu-toggle { display: none; }
.menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.menu-toggle-bars { position: relative; display: block; width: 22px; height: 2px; }
.menu-toggle-bars::before, .menu-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-toggle-bars::before { top: -4px; }
.menu-toggle-bars::after { top: 4px; }
.menu-open .menu-toggle-bars::before { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }
.menu-open { overflow: hidden; }

.need-a:not([hidden]) { animation: cc-aparecer 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cc-aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.field-error:empty { display: none; }

/* Versión 2 · titular dinámico y fondo de partículas (los configura shared/fx.js).
   El cursor solo existe con JavaScript; cada propuesta le da su color y su forma. */
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.fx-canvas.is-on { opacity: 1; }
.ht-a { display: block; text-wrap: balance; }
.ht-b { display: block; white-space: nowrap; }
.ht-caret { display: none; }
.js .ht-caret { display: inline-block; width: 0.06em; height: 0.8em; margin-left: 0.06em; vertical-align: -0.02em; background: currentColor; animation: cc-caret 1.05s steps(1) infinite; }
.js .ht-caret.is-done { opacity: 0; animation: none; transition: opacity 0.6s; }
@keyframes cc-caret { 50% { opacity: 0; } }

/* Reducir movimiento: sin animaciones ni transiciones no esenciales. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
