/* ============================================================================
   Página /como-funciona/ (template page-como-funciona.php): encabezado, portada,
   3 secciones a ancho completo y cierre. Las tarjetas (.kf-how__*) son las mismas que tenía el banner de la home.
   Color: --tier-live (sigue --kf-tier, el último plan elegido en la home; Guerrero si no hay ninguno).
   Animaciones solo con transform y opacity; con «reducir movimiento» todo queda quieto.
   ========================================================================== */
body.kf-cf { margin: 0; }
html:has(body.kf-cf) { scroll-padding: 0; }
.kf-cf-top { align-items: center; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; height: 56px; justify-content: space-between; padding: 0 16px; position: sticky; top: 0; z-index: 30; }
.kf-cf-logo { color: var(--accent); font-size: 20px; font-style: italic; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.kf-cf-back { align-items: center; color: var(--text); display: inline-flex; font-size: 14px; font-weight: 600; min-height: 44px; text-decoration: none; }
.kf-cf-back:hover { color: var(--tier-live); }
.kf-cf-wrap { margin: 0 auto; max-width: 760px; padding: 0 16px; }



/* Secciones a ancho completo (una debajo de otra) */
.kf-cf-sec { padding: 32px 0 0; }
.kf-cf-sec .kf-how__card { transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.kf-cf-sec .kf-how__card.is-armed:not(.is-in) { opacity: 0; transform: translateY(16px); }
.kf-cf-sec .kf-how__bar { min-height: 92px; }

/* Cierre */
.kf-cf-end { display: grid; gap: 8px; justify-items: center; padding: 40px 0 56px; text-align: center; }
.kf-cf-end .kf-sales-button { border-radius: 999px; font-size: 16px; font-weight: 700; max-width: 480px; min-height: 52px; width: 100%; }
.kf-cf-home { align-items: center; color: var(--muted); display: inline-flex; font-size: 14px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.kf-cf-home:hover { color: var(--tier-live); }
.kf-cf-legal { padding-bottom: 8px; }

/* Tarjetas */
.kf-how__card {
	align-self: stretch;
	background: linear-gradient(180deg, color-mix(in srgb, var(--tier-live) 9%, #141416), #0e0e10 72%);
	border: 1px solid color-mix(in srgb, var(--tier-live) 45%, transparent);
	border-radius: 24px;
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier-live) 10%, transparent), 0 24px 56px -32px color-mix(in srgb, var(--tier-live) 60%, transparent);
	display: flex;
	flex-direction: column;
	min-width: 0;
	position: relative;
	width: 100%;
}
.kf-how__body { display: flex; flex: 1; flex-direction: column; gap: 16px; min-width: 0; padding: 16px 24px 24px; }
.kf-how__head { align-items: center; display: flex; gap: 8px; }
.kf-how__n { align-items: center; background: var(--tier-live); border-radius: 50%; color: #0b0b0c; display: grid; flex: none; font-size: 16px; font-weight: 800; height: 32px; justify-items: center; width: 32px; }
.kf-sales #kf-home-main .kf-how__card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.kf-sales #kf-home-main .kf-how__sub { color: #c9c9cf; font-size: 14px; line-height: 1.5; margin: -8px 0 0; }

/* Mascota protagonista: mismo tamaño y espacio reservado en las 3 tarjetas */
.kf-how__art { display: grid; flex: none; height: 128px; place-items: center; position: relative; }
.kf-how__glow { background: radial-gradient(circle, color-mix(in srgb, var(--tier-live) 45%, transparent), transparent 68%); border-radius: 50%; height: 144px; opacity: .8; position: absolute; width: 144px; }
.kf-how__mascot { height: 120px; position: relative; width: 96px; z-index: 1; }

/* Tarjeta 3: la mascota montada en la moto (ancha). Rueda y moto se mueven con transform; con «reducir movimiento» quedan quietas */
.kf-how__art--moto .kf-how__glow { height: 128px; width: 220px; border-radius: 50%; }
.kf-how__moto { height: 124px; overflow: visible; position: relative; width: 198px; z-index: 1; }
.kf-moto-bob { animation: kf-moto-bob 2.4s ease-in-out infinite; }
.kf-moto-spin { animation: kf-moto-spin 1.9s linear infinite; transform-box: fill-box; transform-origin: center; }
.kf-moto-lines { animation: kf-moto-lines 1.4s ease-in-out infinite alternate; }
@keyframes kf-moto-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes kf-moto-spin { to { transform: rotate(360deg); } }
@keyframes kf-moto-lines { from { opacity: .35; transform: translateX(-3px); } to { opacity: 1; transform: translateX(3px); } }

/* Línea de tiempo vertical (tarjetas 1 y 3): círculos iguales y conector continuo */
.kf-how__tl { display: flex; flex: 1; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.kf-how__tl li { align-items: start; flex: 1 1 auto; display: grid; gap: 16px; grid-template-columns: 40px minmax(0, 1fr); padding-bottom: 16px; position: relative; }
.kf-how__tl li:last-child { padding-bottom: 0; }
.kf-how__tl li:not(:last-child)::after { background: color-mix(in srgb, var(--tier-live) 55%, transparent); bottom: 4px; content: ""; left: 19px; position: absolute; top: 44px; width: 2px; }
.kf-how__dot { align-items: center; background: color-mix(in srgb, var(--tier-live) 16%, #0e0e10); border: 1.5px solid var(--tier-live); border-radius: 50%; color: var(--tier-live); display: grid; font-size: 16px; font-weight: 800; height: 40px; justify-items: center; width: 40px; }
.kf-how__dot .kf-sales-icon { color: var(--tier-live); height: 22px; width: 22px; }
.kf-sales #kf-home-main .kf-how__tl p { color: #d4d4d8; font-size: 14px; align-self: start; line-height: 1.45; margin: 0; padding-top: 10px; }
.kf-sales #kf-home-main .kf-how__tl p b, .kf-how__tl b { color: var(--text); font-weight: 700; }

/* Tarjeta 2: ticket perforado protagonista */
.kf-how__ticket { background: color-mix(in srgb, var(--tier-live) 14%, #101012); border: 1px dashed color-mix(in srgb, var(--tier-live) 75%, transparent); border-radius: 16px; padding: 16px; position: relative; text-align: center; }
.kf-how__ticket::before, .kf-how__ticket::after { background: #101012; border: 1px dashed color-mix(in srgb, var(--tier-live) 75%, transparent); border-radius: 50%; content: ""; height: 16px; position: absolute; top: calc(50% - 8px); width: 16px; }
.kf-how__ticket::before { left: -9px; clip-path: inset(0 0 0 50%); }
.kf-how__ticket::after { right: -9px; clip-path: inset(0 50% 0 0); }
.kf-sales #kf-home-main .kf-how__big { color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.1; margin: 0; }
.kf-how__big b { color: var(--tier-live); font-size: 40px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.04em; }
.kf-how__meter { background: #ffffff1a; border-radius: 99px; height: 8px; margin-top: 16px; overflow: hidden; }
.kf-how__meter i { background: var(--tier-live); border-radius: inherit; display: block; height: 100%; transform-origin: left center; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.kf-how__pop { align-items: center; background: var(--tier-live); border-radius: 50%; display: grid; height: 32px; justify-items: center; position: absolute; right: 16px; top: -16px; transition: opacity .4s ease 1.2s, transform .5s cubic-bezier(.3, 1.6, .5, 1) 1.2s; width: 32px; }
.kf-how__pop .kf-sales-icon { color: #0b0b0c; height: 20px; width: 20px; }
.kf-how__card.is-armed .kf-how__meter i { transform: scaleX(0); }
.kf-how__card.is-armed .kf-how__pop { opacity: 0; transform: scale(.4) rotate(-12deg); }
.kf-how__card.is-armed.is-in .kf-how__meter i { transform: scaleX(1); }
.kf-how__card.is-armed.is-in .kf-how__pop { opacity: 1; transform: none; }

/* Puntos por día: 3 fichas iguales en una sola fila */
.kf-how__daybox { display: grid; gap: 8px; }
.kf-sales #kf-home-main .kf-how__lbl { color: #c9c9cf; font-size: 13px; font-weight: 700; letter-spacing: .06em; margin: 0; text-transform: uppercase; }
.kf-how__days { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kf-sales #kf-home-main .kf-how__tile { align-items: center; background: #ffffff0f; border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-direction: column-reverse; gap: 0; justify-content: center; margin: 0; min-height: 64px; padding: 8px 4px; text-align: center; }
.kf-how__tile b { color: var(--text); font-size: 24px; font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1.1; }
.kf-how__tile span { color: #c9c9cf; font-size: 13px; line-height: 1.2; }

/* Tabla de rangos compacta */
.kf-how__table { border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; width: 100%; }
.kf-how__table th, .kf-how__table td { border-top: 1px solid var(--line-2); padding: 8px 4px; text-align: center; }
.kf-how__table tbody th { color: #c9c9cf; font-weight: 500; line-height: 1.25; padding-left: 0; text-align: left; width: 36%; }
.kf-how__table thead th { border-top: 0; padding: 0 3px 8px; }
.kf-how__table thead th:first-child { width: 36%; }
.kf-how__table thead th.kf-how__rk { background: var(--rk); border-radius: 10px; color: #0b0b0c; font-size: 13px; font-weight: 700; padding: 6px 2px; }
.kf-how__table td { color: var(--rk); font-variant-numeric: tabular-nums; font-weight: 700; }
.kf-how__rk--base { --rk: var(--rar-std); }
.kf-how__rk--plus { --rk: var(--rar-gold); }
.kf-how__rk--elite { --rk: var(--rar-legend); }

/* Ejemplo destacado */
.kf-how__exbox { background: color-mix(in srgb, var(--tier-live) 14%, #101012); border: 1px solid color-mix(in srgb, var(--tier-live) 55%, transparent); border-radius: 16px; display: grid; gap: 8px; padding: 16px; }
.kf-sales #kf-home-main .kf-how__ex { color: var(--text); font-size: 15px; line-height: 1.4; margin: 0; }
.kf-how__ex b { color: var(--tier-live); }
.kf-sales #kf-home-main .kf-how__note { color: #d4d4d8; font-size: 13px; line-height: 1.4; margin: 0; }

/* Barra inferior: misma altura y alineación en las 3 tarjetas */
.kf-how__bar { align-content: center; background: #000; border-radius: 0 0 23px 23px; border-top: 1px solid color-mix(in srgb, var(--tier-live) 35%, transparent); display: grid; gap: 4px; margin: 0; min-height: 108px; padding: 16px 24px; text-align: center; }
.kf-how__bar span { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; line-height: 1.35; text-transform: uppercase; }
.kf-how__bar span:first-child { color: var(--tier-live); }
/* Enlace al sorteo en vivo (línea inferior de la barra de la tarjeta 1) */
.kf-how__bar .kf-how__live { color: #fff; display: inline-block; padding: 4px 0; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--tier-live) 70%, transparent); text-underline-offset: 4px; }
.kf-how__bar .kf-how__live small { color: #d4d4d8; display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; margin-top: 2px; text-transform: none; }
.kf-how__bar .kf-how__live:hover, .kf-how__bar .kf-how__live:focus-visible { color: var(--tier-live); }

@media (min-width: 768px) {
	.kf-how__body { padding: 24px 32px 32px; }
	.kf-how__art { height: 144px; }
	.kf-how__glow { height: 160px; width: 160px; }
	.kf-how__mascot { height: 132px; width: 106px; }
	.kf-how__moto { height: 136px; width: 218px; }
	.kf-sales #kf-home-main .kf-how__card h2 { font-size: 24px; }
}
@media (max-width: 480px) {
	.kf-how__body { padding: 8px 16px 24px; }
	.kf-how__art { height: 112px; }
	.kf-how__glow { height: 128px; width: 128px; }
	.kf-how__mascot { height: 104px; width: 84px; }
	.kf-how__art--moto { height: 124px; }
	.kf-how__moto { height: 118px; width: 188px; }
	.kf-how__art--moto .kf-how__glow { width: 206px; }
	.kf-how__bar { padding: 16px; }
	.kf-how__big b { font-size: 36px; }
}
/* Tarjeta 1: la moto y la PlayStation giran de fondo alrededor de la mascota (órbita en 3D falsa: la profundidad cambia tamaño y brillo,
   el círculo se inclina al cruzar). Van detrás de la mascota y de los textos; solo transform/opacity. */
#como .kf-how__body { position: relative; z-index: 1; }
#como .kf-how__head { align-items: flex-start; }
#como .kf-how__n { margin-top: 1px; }
#como #kf-cf-t1 { font-size: 19px; text-wrap: balance; }
.kf-cf-orbit { --T: 18s; --R: 36%; --ry: 18px; --d: 60px; --oy: 64px; border-radius: inherit; height: 230px; inset: 0 0 auto; overflow: hidden; pointer-events: none; position: absolute; z-index: 0; }
.kf-cf-o { animation: kf-cf-ox calc(var(--T) / 2) cubic-bezier(.37, 0, .63, 1) infinite alternate both; height: 0; inset-inline: 0; margin-inline: auto; position: absolute; top: var(--oy); width: min(100%, 520px); will-change: transform; }
.kf-cf-o__y { animation: kf-cf-oy calc(var(--T) / 2) cubic-bezier(.37, 0, .63, 1) infinite alternate both; height: 0; left: 50%; position: absolute; top: 0; width: 0; will-change: transform, opacity; }
.kf-cf-o__d { animation: kf-cf-od calc(var(--T) / 2) cubic-bezier(.37, 0, .63, 1) infinite alternate both; background: color-mix(in srgb, var(--tier-live) 12%, #0b0b0c); border: 2px solid var(--tier-live); border-radius: 50%; box-shadow: 0 0 22px color-mix(in srgb, var(--tier-live) 55%, transparent); height: var(--d); left: calc(var(--d) / -2); overflow: hidden; position: absolute; top: calc(var(--d) / -2); width: var(--d); }
.kf-cf-o__d picture, .kf-cf-o__d img { border-radius: 50%; display: block; height: 100%; width: 100%; }
.kf-cf-o__d img { object-fit: cover; }
.kf-cf-o--a .kf-cf-o__y { animation-delay: calc(var(--T) / -4); }
.kf-cf-o--b { animation-delay: calc(var(--T) / -2); }
.kf-cf-o--b .kf-cf-o__y { animation-delay: calc(var(--T) * -.75); }
.kf-cf-o--b .kf-cf-o__d { animation-delay: calc(var(--T) / -2); }
/* Con tres fotos (moto, PlayStation y Dyson) van repartidas a tercios de vuelta, para que no se pisen */
.kf-cf-orbit--3 .kf-cf-o--b { animation-delay: calc(var(--T) / -3); }
.kf-cf-orbit--3 .kf-cf-o--b .kf-cf-o__y { animation-delay: calc(var(--T) * -.58333); }
.kf-cf-orbit--3 .kf-cf-o--b .kf-cf-o__d { animation-delay: calc(var(--T) / -3); }
.kf-cf-o--c { animation-delay: calc(var(--T) * -.66667); }
.kf-cf-o--c .kf-cf-o__y { animation-delay: calc(var(--T) * -.91667); }
.kf-cf-o--c .kf-cf-o__d { animation-delay: calc(var(--T) * -.66667); }
@keyframes kf-cf-ox { from { transform: translateX(calc(var(--R) * -1)); } to { transform: translateX(var(--R)); } }
@keyframes kf-cf-oy { from { opacity: .4; transform: translateY(calc(var(--ry) * -1)) scale(.6); } to { opacity: .95; transform: translateY(var(--ry)) scale(1); } }
@keyframes kf-cf-od { from { transform: perspective(420px) rotateY(-30deg); } to { transform: perspective(420px) rotateY(30deg); } }
@media (min-width: 481px) { .kf-cf-orbit { --d: 72px; --oy: 80px; --ry: 22px; } #como #kf-cf-t1 { font-size: 22px; } }
@media (min-width: 768px) { .kf-cf-orbit { --d: 96px; --oy: 96px; --ry: 30px; height: 260px; } #como #kf-cf-t1 { font-size: 24px; } }

/* Tarjeta 1 con vida: la mascota flota, su brillo respira, los pasos vibran por turnos y la barra brilla (solo transform/opacity) */
#como .kf-how__mascot { animation: kf-cf-bob 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
#como .kf-how__glow { animation: kf-cf-glow 2.8s ease-in-out infinite; }
#como .kf-how__dot { animation: kf-cf-dot 6s ease-in-out infinite; position: relative; }
#como .kf-how__dot::after { animation: kf-cf-ring 6s ease-out infinite; border: 2px solid var(--tier-live); border-radius: 50%; content: ""; inset: -2px; opacity: 0; pointer-events: none; position: absolute; }
#como .kf-how__tl li:nth-child(2) .kf-how__dot, #como .kf-how__tl li:nth-child(2) .kf-how__dot::after { animation-delay: 1.5s; }
#como .kf-how__tl li:nth-child(3) .kf-how__dot, #como .kf-how__tl li:nth-child(3) .kf-how__dot::after { animation-delay: 3s; }
#como .kf-how__tl li:nth-child(4) .kf-how__dot, #como .kf-how__tl li:nth-child(4) .kf-how__dot::after { animation-delay: 4.5s; }
#como .kf-how__bar { overflow: hidden; position: relative; }
#como .kf-how__bar::after { animation: kf-cf-sheen 5s ease-in-out infinite; background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--tier-live) 22%, transparent), transparent); content: ""; inset: 0 auto 0 0; pointer-events: none; position: absolute; transform: translateX(-120%); width: 40%; }
@keyframes kf-cf-bob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-6px) rotate(-2.5deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-4px) rotate(2.5deg); } }
@keyframes kf-cf-glow { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes kf-cf-dot { 0%, 16%, 100% { transform: none; } 3% { transform: scale(1.15) rotate(-8deg); } 6% { transform: scale(1.15) rotate(8deg); } 9% { transform: scale(1.12) rotate(-6deg); } 12% { transform: scale(1.08) rotate(4deg); } }
@keyframes kf-cf-ring { 0% { opacity: .75; transform: scale(1); } 24%, 100% { opacity: 0; transform: scale(1.7); } }
@keyframes kf-cf-sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) {
	#como .kf-how__mascot, #como .kf-how__glow, #como .kf-how__dot, #como .kf-how__dot::after, #como .kf-how__bar::after { animation: none; }
	.kf-cf-o, .kf-cf-o__y, .kf-cf-o__d { animation: none; }
	.kf-cf-o--a { transform: translateX(calc(var(--R) * -1)); }
	.kf-cf-o--b { transform: translateX(var(--R)); }
	.kf-cf-o--c { display: none; }
	.kf-cf-o__y { opacity: .85; }
	.kf-moto-bob, .kf-moto-spin, .kf-moto-lines { animation: none; }
	.kf-cf-sec .kf-how__card { transition: none; }
	.kf-cf-sec .kf-how__card.is-armed:not(.is-in) { opacity: 1; transform: none; }
	.kf-how__meter i, .kf-how__pop { transition: none; }
	.kf-how__card.is-armed .kf-how__meter i { transform: none; }
	.kf-how__card.is-armed .kf-how__pop { opacity: 1; transform: none; }
}
