/* Sushell · pulido global y movimiento
   Capa final: se carga después del resto. Respeta prefers-reduced-motion. */

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.15);
}

::selection { background: rgba(90, 82, 255, .38); color: #fff; }

/* Foco visible consistente (teclado) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #5A52FF;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: #26282c transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #202122; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #34373f; background-clip: padding-box; border: 2px solid transparent; }

/* Texto con mejor ritmo */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Entrada de página */
@keyframes sh-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }

.one-body .one-main > *,
.one-body main > * { animation: sh-rise .5s var(--ease-out) both; }
.one-body .one-main > *:nth-child(2) { animation-delay: .04s; }
.one-body .one-main > *:nth-child(3) { animation-delay: .08s; }
.one-body .one-main > *:nth-child(4) { animation-delay: .12s; }
.one-body .one-main > *:nth-child(5) { animation-delay: .16s; }
.one-body .one-main > *:nth-child(n+6) { animation-delay: .2s; }

/* Métricas: escalonado + elevación sutil */
.atomist-metric-card {
  animation: sh-rise .5s var(--ease-out) both;
  transition: border-color .2s ease, transform .25s var(--ease-out), background .2s ease;
}
.atomist-metric-card:nth-child(2) { animation-delay: .07s; }
.atomist-metric-card:nth-child(3) { animation-delay: .14s; }
.atomist-metric-card:nth-child(4) { animation-delay: .21s; }
.atomist-metric-card:hover { transform: translateY(-2px); }

/* Tarjetas y tablas */
.one-card { transition: border-color .2s ease, background .2s ease; }
.one-card:hover { border-color: rgba(255, 255, 255, .13); }
.one-table tbody tr { transition: background .15s ease; }
.one-table tbody tr:hover { background: rgba(255, 255, 255, .025); }

/* Botones: respuesta táctil */
.one-btn, .btn, .btn-s26, .al-btn, .ac-btn, .eq-btn, .sos-btn {
  transition: background .16s ease, border-color .16s ease, color .16s ease,
              box-shadow .16s ease, transform .14s var(--ease-out), opacity .15s ease;
}
.one-btn:not(:disabled):active,
.btn:not(:disabled):active,
.btn-s26:active,
.ac-btn:not(:disabled):active,
.eq-btn:not(:disabled):active,
.sos-btn:active { transform: translateY(0) scale(.985); }
.one-btn:not(:disabled):hover,
.ac-btn:not(:disabled):hover,
.eq-btn:not(:disabled):hover { transform: translateY(-1px); }

/* Barra lateral: indicador que se desliza */
.one-nav a { position: relative; transition: background .15s ease, color .15s ease, padding-left .2s var(--ease-out); }
.one-nav a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0;
  background: #5A52FF; border-radius: 2px; transform: translateY(-50%);
  transition: height .22s var(--ease-out);
}
.one-nav a:hover::before { height: 40%; }
.one-nav a.active::before, .one-nav a.is-active::before, .one-nav a[aria-current="page"]::before { height: 60%; }

/* Inputs */
.form input, .form select, .form textarea, .al-input {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* Alertas */
.one-alert { animation: sh-rise .4s var(--ease-out) both; }

/* Esqueleto de carga reutilizable */
.sh-skel {
  background: linear-gradient(90deg, #121212 0%, #1a1b1d 50%, #121212 100%);
  background-size: 200% 100%; border-radius: 6px;
  animation: sh-skel 1.4s linear infinite;
}
@keyframes sh-skel { to { background-position: -200% 0; } }

/* Revelado al hacer scroll (data-reveal) */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

