/* Y3K motion pack: starfield warp, holo sweeps, tilt + glare, scroll progress, parallax, draw-ins.
   Everything that moves is gated by html.yk-motion (added in <head> unless the visitor prefers reduced motion). */

/* --- Static pieces (shown with or without motion) --- */
.yk-strike { position: absolute; z-index: -1; right: 4%; top: 6%; height: 88%; width: auto; pointer-events: none; opacity: .08; }
.yk-strike path { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.yk-seal { position: absolute; z-index: 2; width: 118px; height: 118px; left: -48px; top: -36px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .8)); }
.yk-seal__disc { fill: #080c15; stroke: rgba(200, 225, 255, .55); stroke-width: 1.2; }
.yk-seal text { font: 700 11.5px "JetBrains Mono", monospace; letter-spacing: 2.6px; fill: #e9eef5; }
.yk-seal__bolt { fill: #fff; }
.yk-plate { overflow: hidden; }
.yk-plate__shine { position: absolute; inset: 0; border-radius: 22px; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%); background-size: 250% 100%; background-position: 130% 0; mix-blend-mode: screen; }
.yk-dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.yk-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--yk-grad-metal); transform-origin: left center; transform: scaleX(var(--yk-progress, 0)); pointer-events: none; }

.yk-band { overflow: hidden; padding: 26px 0; border-top: 1px solid var(--yk-line-soft); border-bottom: 1px solid var(--yk-line-soft); background: #05080f; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.yk-band__track { display: flex; width: max-content; }
.yk-band__group { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.yk-band__group span { font: 400 clamp(46px, 6vw, 84px)/1.1 var(--yk-display); white-space: nowrap; background: var(--yk-grad-chrome); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--yk-silver); }
.yk-band__group span.yk-band__outline { background: none; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.2px rgba(200, 225, 255, .55); color: transparent; }
.yk-band .yk-star { width: 18px; height: 32px; color: var(--yk-silver-l); }

/* Glare layer used by the tilt cards */
.yk-glare { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .16), transparent 45%); }
.yk-site .products > .product .product-inner { position: relative; }

@media (max-width: 991px) {
	.yk-seal { width: 92px; height: 92px; left: -16px; top: -26px; }
	.yk-strike { right: -6%; opacity: .05; }
}

/* --- Keyframes --- */
@keyframes yk-seal-spin { to { transform: rotate(360deg); } }
@keyframes yk-band-move { to { transform: translateX(-50%); } }
@keyframes yk-plate-shine { 0%, 62% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@keyframes yk-strike {
	0% { stroke-dashoffset: 1100; opacity: 0; }
	6% { opacity: .5; }
	22% { stroke-dashoffset: 0; opacity: .5; }
	24% { opacity: .95; filter: drop-shadow(0 0 18px #fff); }
	26% { opacity: .2; }
	28% { opacity: .85; }
	40%, 100% { stroke-dashoffset: 0; opacity: .08; filter: none; }
}
@keyframes yk-flash { 0%, 21%, 31%, 100% { opacity: 0; } 24% { opacity: .5; } 26% { opacity: .1; } 28% { opacity: .35; } }
@keyframes yk-ken { from { transform: scale(1.04); } to { transform: scale(1.14) translate3d(-1.5%, 0, 0); } }
@keyframes yk-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes yk-pop-in { from { opacity: 0; transform: scale(.4) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes yk-slide-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes yk-chrome-sweep { from { background-position: 50% 100%; } to { background-position: 50% 0%; } }

/* --- Hero --- */
html.yk-motion .yk-hero__bg { animation: yk-ken 28s ease-in-out infinite alternate; will-change: transform; }
html.yk-motion .yk-strike path { stroke-dasharray: 1100; animation: yk-strike 9s ease-in-out 1.2s infinite; }
html.yk-motion .yk-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 80% at 82% 40%, rgba(124, 245, 211, .55), transparent 60%); opacity: 0; animation: yk-flash 9s ease-in-out 1.2s infinite; mix-blend-mode: overlay; }
html.yk-motion .yk-hero__grid { position: relative; }
html.yk-motion .yk-hero__grid::before { content: ""; position: absolute; inset: -40% -20%; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(124, 245, 211, .09), transparent 60%); }
html.yk-motion .yk-seal { animation: yk-seal-spin 22s linear infinite; }
html.yk-motion .yk-seal__bolt { transform-origin: 60px 60px; animation: yk-seal-spin 22s linear infinite reverse; }
html.yk-motion .yk-plate__shine { animation: yk-plate-shine 7s ease-in-out 2s infinite; }

/* --- Band (second marquee) runs the other way --- */
html.yk-motion .yk-band__track { animation: yk-band-move 38s linear infinite reverse; }
.yk-band:hover .yk-band__track { animation-play-state: paused; }

/* --- Section heads: chrome sweeps in, rule draws from the center --- */
html.yk-motion .yk-reveal .yk-h2 .yk-holo { background-size: 100% 260%; background-position: 50% 100%; }
html.yk-motion .yk-reveal.is-in .yk-h2 .yk-holo-old { animation: yk-chrome-sweep 1.6s cubic-bezier(.2, .8, .2, 1) .2s both; }
html.yk-motion .yk-reveal .yk-rule i { transform: scaleX(0); }
html.yk-motion .yk-reveal .yk-rule i:first-child { transform-origin: right; }
html.yk-motion .yk-reveal .yk-rule i:last-child { transform-origin: left; }
html.yk-motion .yk-reveal.is-in .yk-rule i { animation: yk-draw 1s cubic-bezier(.2, .8, .2, 1) .35s both; }
html.yk-motion .yk-reveal .yk-rule .yk-star { opacity: 0; }
html.yk-motion .yk-reveal.is-in .yk-rule .yk-star { animation: yk-pop-in .6s cubic-bezier(.2, .9, .3, 1.4) .2s both, yk-flicker 5s steps(1) 1.4s infinite; }

/* --- Spec sheet rows slide in one after another --- */
html.yk-motion .yk-reveal .yk-spec > div { opacity: 0; }
html.yk-motion .yk-reveal.is-in .yk-spec > div { animation: yk-slide-in .7s cubic-bezier(.2, .8, .2, 1) both; }
html.yk-motion .yk-reveal.is-in .yk-spec > div:nth-child(2) { animation-delay: .08s; }
html.yk-motion .yk-reveal.is-in .yk-spec > div:nth-child(3) { animation-delay: .16s; }
html.yk-motion .yk-reveal.is-in .yk-spec > div:nth-child(4) { animation-delay: .24s; }
html.yk-motion .yk-reveal.is-in .yk-spec > div:nth-child(5) { animation-delay: .32s; }
html.yk-motion .yk-reveal.is-in .yk-spec > div:nth-child(6) { animation-delay: .4s; }
html.yk-motion .yk-spec dt .yk-ico { transition: transform .4s cubic-bezier(.2, .9, .3, 1.4), color .3s ease; }
html.yk-motion .yk-spec > div:hover dt .yk-ico { transform: scale(1.3) rotate(-10deg); color: #fff; }

/* --- Feature + step icons pop, step connectors draw --- */
html.yk-motion .yk-reveal .yk-feature__ico,
html.yk-motion .yk-reveal .yk-guide__marker { opacity: 0; }
html.yk-motion .yk-reveal.is-in .yk-feature__ico,
html.yk-motion .yk-reveal.is-in .yk-guide__marker { animation: yk-pop-in .7s cubic-bezier(.2, .9, .3, 1.3) calc(.2s + var(--yk-i, 0) * 80ms) both; }
html.yk-motion .yk-feature:hover .yk-feature__ico { animation: yk-flicker 1.2s steps(1) 1; }
html.yk-motion .yk-steps li::after { transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.2, .8, .2, 1) .6s; }
html.yk-motion .yk-steps li.is-in::after { transform: scaleX(1); }
html.yk-motion .yk-steps__n { background-size: 100% 260%; background-position: 50% 100%; transition: background-position 1.4s cubic-bezier(.2, .8, .2, 1) .3s; }
html.yk-motion .yk-steps li.is-in .yk-steps__n { background-position: 50% 0%; }

/* --- Tilt cards (angles set by script.js) --- */
html.yk-motion .yk-tilt.is-tilting { transition: border-color .3s ease, box-shadow .35s ease; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
html.yk-motion .yk-tilt.is-tilting .yk-glare { opacity: 1; }

/* --- Wholesale + CTA --- */
html.yk-motion .yk-wholesale__bg { animation: yk-ken 30s ease-in-out infinite alternate-reverse; }
html.yk-motion .yk-cta__mark { transform: translate(-50%, -50%) rotate(var(--yk-rot, 0deg)); }
html.yk-motion .yk-reveal .yk-packs li { opacity: 0; }
html.yk-motion .yk-reveal.is-in .yk-packs li { animation: yk-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(2) { animation-delay: .07s; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(3) { animation-delay: .14s; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(4) { animation-delay: .21s; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(5) { animation-delay: .28s; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(6) { animation-delay: .35s; }
html.yk-motion .yk-reveal.is-in .yk-packs li:nth-child(7) { animation-delay: .42s; }

/* --- Magnetic buttons (offset set by script.js) --- */
html.yk-motion .yk-btn.is-magnet { translate: var(--bx, 0px) var(--by, 0px); }

/* --- FAQ answers ease open --- */
html.yk-motion .yk-faq details[open] p { animation: yk-slide-in .45s ease both; }

/* --- Logo glints on hover --- */
html.yk-motion .yk-logo { position: relative; overflow: hidden; }
html.yk-motion .yk-logo::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-200%) skewX(-20deg); pointer-events: none; }
html.yk-motion .yk-logo:hover::after { animation: yk-shine 1s ease forwards; }

@media (prefers-reduced-motion: reduce) {
	.yk-band__track { width: auto; justify-content: center; }
	.yk-band__group:nth-child(2) { display: none; }
	.yk-band__group { flex-wrap: wrap; justify-content: center; row-gap: 12px; padding: 0 16px; }
	.yk-band__group span { font-size: clamp(30px, 5vw, 56px); }
}

/* --- Y3K: hero posters tilt with the pointer, billboard drifts, spec ring orbits --- */
.yk-posters { transform: perspective(1200px) rotateY(var(--yk-ry, 0deg)) rotateX(var(--yk-rx, 0deg)); transition: transform .2s ease-out; }
@keyframes yk-orbit { to { transform: rotate(360deg); } }
@keyframes yk-float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes yk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes yk-holo-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
html.yk-motion .yk-poster--a { animation: yk-float-a 7s ease-in-out infinite; }
html.yk-motion .yk-poster--b { animation: yk-float-a 7s ease-in-out -3.5s infinite; }
html.yk-motion .yk-specs__ring { animation: yk-orbit 24s linear infinite; }
html.yk-motion .yk-billboard__img { animation: yk-ken 30s ease-in-out infinite alternate; }
html.yk-motion .yk-dot,
html.yk-motion .yk-billboard__hud span:first-child { animation: yk-pulse 1.6s ease-in-out infinite; }
html.yk-motion .yk-hero__sub .yk-holo,
html.yk-motion .yk-pagehero__title .yk-holo { background-size: 200% 100%; animation: yk-holo-shift 8s ease-in-out infinite; }
html.yk-motion .yk-reveal .yk-h2 .yk-holo { background-size: 220% 100%; background-position: 100% 50%; }
html.yk-motion .yk-reveal.is-in .yk-h2 .yk-holo { animation: yk-holo-in 1.6s cubic-bezier(.2, .8, .2, 1) .2s both; }
@keyframes yk-holo-in { from { background-position: 100% 50%; } to { background-position: 0% 50%; } }
@media (prefers-reduced-motion: reduce) { .yk-posters { transform: none !important; } }
