/*! Wingsoft FX · animaciones de entrada y efectos tecnológicos.
   Solo se activan con JavaScript (clase html.ws-fx-on) y nunca en lo que ya se ve al cargar:
   el contenido siempre es visible para Google y para quien no tiene JavaScript. */

@property --ws-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* Entrada: subir + desenfoque */
html.ws-fx-on .ws-scope .ws-fx {
	opacity: 0;
	transform: translate3d(0, 24px, 0);
	filter: blur(6px);
	transition: opacity .75s cubic-bezier(.2,.7,.2,1) var(--ws-d, 0ms), transform .75s cubic-bezier(.2,.7,.2,1) var(--ws-d, 0ms), filter .75s cubic-bezier(.2,.7,.2,1) var(--ws-d, 0ms);
	will-change: opacity, transform;
}
html.ws-fx-on .ws-scope .ws-fx.is-in { opacity: 1; transform: none; filter: none; }

/* Títulos: barrido de izquierda a derecha */
html.ws-fx-on .ws-scope .ws-fx.ws-fx--wipe {
	opacity: 1; transform: none; filter: none;
	clip-path: inset(0 100% 0 0);
	transition: clip-path 1s cubic-bezier(.7,0,.2,1) var(--ws-d, 0ms);
}
html.ws-fx-on .ws-scope .ws-fx.ws-fx--wipe.is-in { clip-path: inset(0 0 0 0); }

/* Etiquetas: cursor de terminal que parpadea al aparecer */
html.ws-fx-on .ws-scope .ws-eyebrow.ws-fx--caret::after {
	content: ''; display: inline-block; width: 7px; height: 1em; margin-left: 6px; vertical-align: -2px;
	background: currentColor; animation: ws-caret 1s steps(1) 3; opacity: 0;
}
@keyframes ws-caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* Pasos: la línea entre pasos se dibuja */
html.ws-fx-on .ws-scope .ws-how__step.ws-fx .ws-how__num::after { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.7,0,.2,1) calc(var(--ws-d, 0ms) + 250ms); }
html.ws-fx-on .ws-scope .ws-how__step.ws-fx.is-in .ws-how__num::after { transform: scaleX(1); }

/* Fondo del hero: cuadrícula de puntos que se desplaza lentamente */
.ws-scope .ws-lhero::before, .ws-scope .ws-hero::before {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background-image: radial-gradient(rgba(21,23,28,.10) 1px, transparent 1.2px);
	background-size: 24px 24px;
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 30%, transparent 75%);
	animation: ws-grid 40s linear infinite;
}
.ws-scope .ws-lhero > .ws-wrap, .ws-scope .ws-hero > .ws-wrap { position: relative; z-index: 1; }
@keyframes ws-grid { to { background-position: 240px 120px; } }

/* Facetas del hero: flotan suavemente */
.ws-scope .ws-lhero__facets, .ws-scope .ws-hero__facets { animation: ws-float 14s ease-in-out infinite alternate; transform-origin: 70% 30%; }
@keyframes ws-float { to { transform: translate(-14px, 14px) rotate(-1.5deg); } }

/* Tarjetas destacadas: borde con luz que recorre el contorno */
.ws-scope :is(.ws-sum, .ws-quiz__card, .ws-track)::before {
	content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
	background: conic-gradient(from var(--ws-a), transparent 0 72%, rgba(181,32,42,.85) 82%, rgba(229,72,79,.4) 88%, transparent 94%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	animation: ws-spin 7s linear infinite;
}
@keyframes ws-spin { to { --ws-a: 360deg; } }

/* Luz que sigue al cursor en tarjetas */
html.ws-fx-on .ws-scope :is(.ws-card, .ws-prob__item, .ws-opt, .ws-risk__item, .ws-why__item, .ws-tile) { position: relative; isolation: isolate; }
html.ws-fx-on .ws-scope :is(.ws-card, .ws-prob__item, .ws-opt, .ws-risk__item, .ws-why__item, .ws-tile)::after {
	content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
	background: radial-gradient(280px circle at var(--ws-mx, 50%) var(--ws-my, 50%), rgba(181,32,42,.10), transparent 65%);
	opacity: 0; transition: opacity .25s ease;
}
html.ws-fx-on .ws-scope :is(.ws-opt--main, .ws-risk__item, .ws-card--main)::after { background: radial-gradient(280px circle at var(--ws-mx, 50%) var(--ws-my, 50%), rgba(255,138,143,.18), transparent 65%); }
html.ws-fx-on .ws-scope :is(.ws-card, .ws-prob__item, .ws-opt, .ws-risk__item, .ws-why__item, .ws-tile):hover::after { opacity: 1; }

/* Botón principal: destello al pasar el cursor y pulso suave en el hero */
html .ws-scope .ws-btn { position: relative; overflow: hidden; }
html .ws-scope .ws-btn--red::after {
	content: ''; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; pointer-events: none;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); transform: skewX(-20deg);
	transition: left .65s ease;
}
html .ws-scope .ws-btn--red:hover::after { left: 130%; }
html .ws-scope :is(.ws-lhero__ctas, .ws-hero__ctas) .ws-btn--red { animation: ws-pulse 3.2s ease-out 1.5s infinite; }
@keyframes ws-pulse { 0% { box-shadow: 0 0 0 0 rgba(181,32,42,.38); } 70%, 100% { box-shadow: 0 0 0 14px rgba(181,32,42,0); } }

/* Sin animaciones para quien las desactiva en su sistema */
@media (prefers-reduced-motion: reduce) {
	html.ws-fx-on .ws-scope .ws-fx, html.ws-fx-on .ws-scope .ws-fx.ws-fx--wipe { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; transition: none !important; }
	.ws-scope *, .ws-scope *::before, .ws-scope *::after { animation: none !important; }
}
