/* Trofia Coach · animaciones y pulido visual. Lo lleva la sesión «Trofia - Animaciones». */
/* Los resortes de verdad los calcula animaciones.js (reglas de física de Trofia); aquí van ganchos y pulido. */

/* La entrada genérica de estilos.css la reemplaza animaciones.js (una tras otra, con resorte). */
.vista.entra > * { animation: none; }
/* El hundido lo hace el resorte (propiedad scale), no el :active fijo. */
.boton:active { transform: none; }
.aviso { animation: none; }

/* Trofio se achica / el panel se abre con resorte real (las variables las pone animaciones.js). */
.ia-escena { transition: height var(--dur-pesado, .55s) var(--resorte-pesado, cubic-bezier(.23, 1.16, .46, 1)); }
@media (max-width: 720px) {
  .ia { transition: transform var(--dur-pesado, .4s) var(--resorte-pesado, cubic-bezier(.23, 1.16, .46, 1)); }
}

/* Riel: una píldora que viaja entre secciones (en vez de saltar el fondo de una a otra). */
.riel { position: relative; }
.riel-item { position: relative; z-index: 1; }
.riel-item[aria-current="page"] { background: transparent; }
.riel-luz {
  position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0;
  border-radius: 11px; background: var(--superficie-2); pointer-events: none;
  box-shadow: inset 0 -2px 0 #0000002e;
}

/* Gráfico de la ficha: puntos que crecen desde su centro. */
.grafico circle { transform-box: fill-box; transform-origin: center; }
.barras i { transform-origin: bottom; }
.cifra strong { transform-origin: left center; }
.bandeja-cabeza b { display: inline-block; }

/* Pulido «Trofia»: relieve de botón que se puede apretar (borde de abajo más oscuro), como en la app. */
.boton { box-shadow: inset 0 -3px 0 #00000038; }
.boton.suave { box-shadow: inset 0 -3px 0 #00000045; }
.nombre-senal { border-radius: .45em; box-shadow: inset 0 -.12em 0 #0000002e; padding-bottom: .04em; }
/* El número de cada bandeja: pastilla chica en vez de un número gris suelto. */
.bandeja-cabeza b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #ffffff0f; color: var(--tenue); text-align: center; font-variant-numeric: tabular-nums; }

/* Hoja de cotización: el total destella cuando cambia. */
.destello { animation: destello .6s ease-out; }
@keyframes destello { from { background: #2b3ff22e; } to { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .riel-luz { transition: none; }
}

/* ---------- pantallas nuevas (2 dic) ---------- */
/* Cuadernos que se sienten cuadernos: lomo cosido, canto de hojas a la derecha y, al pasar el mouse,
   se levantan, se inclinan siguiendo el mouse y se ve la pila de hojas debajo. */
.cuaderno:not(.nuevo) {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)) rotate(var(--rz, 0deg));
  transition: transform var(--dur-gelatina, .5s) var(--resorte-gelatina, cubic-bezier(.23, 1.16, .46, 1)), box-shadow .25s, border-color .15s;
  will-change: transform;
}
.cuaderno:not(.nuevo):hover {
  --ty: -5px; --rz: -1.2deg;
  box-shadow: 5px 5px 0 -1px #1a2150, 10px 10px 0 -2px #141a42, 0 20px 34px #02041a70;
}
.cuaderno-lomo {
  box-shadow: inset -2px 0 0 #00000038;
  background-image: repeating-linear-gradient(to bottom, transparent 0 9px, #ffffff59 9px 12px);
  background-size: 2px 100%; background-repeat: no-repeat; background-position: 4px 0;
  background-color: var(--lomo);
}
.cuaderno:not(.nuevo)::after {
  content: ""; position: absolute; top: 10px; bottom: 10px; right: 0; width: 4px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, #ffffff14 0 1px, transparent 1px 3px);
}
.cuaderno.nuevo { transition: border-color .15s, background .2s; }
.cuaderno.nuevo:focus-within { border-color: var(--azul-claro); background: #2b3ff214; }

/* Fuente apagada: además de transparente, pierde el color (el resorte lo hace animaciones.js). */
.fuentes-lista li { transition: none; }
.fuentes-lista li.apagada { filter: grayscale(.85); }
.crear-item { transition: border-color .15s; } /* el hundido lo hace el resorte */
.crear-item:disabled { opacity: .5; }

/* Flechita y detalle de la carpeta: los gira y despliega el resorte (animaciones.js). */
.desplegar svg { transition: none; }

/* Chispa que vuela de «Crear» a «Guardado». */
.chispa-vuelo { position: fixed; left: -12px; top: -12px; width: 24px; height: 24px; z-index: 50; pointer-events: none; color: var(--estancado); filter: drop-shadow(0 0 8px #f8d44e99); }
.chispa-vuelo svg { width: 100%; height: 100%; fill: currentColor; }
.guardado li.destello { animation: destello .9s ease-out; }
