/* ===== Motion (assets/js/animations.js) =====
   Hidden states only apply when html.dq-anim is set (JS on, no reduced-motion). */

/* Page transition wipe */
.dq-wipe { position: fixed; inset: 0; z-index: 100000; background: #111; pointer-events: none; transform: scaleY(0); transform-origin: top; display: none; }
html.dq-anim .dq-wipe { display: block; animation: dq-wipe-out .8s cubic-bezier(.77, 0, .18, 1) .05s both; }
html.dq-anim .dq-wipe.is-leaving { animation: none; transform: scaleY(1); transform-origin: bottom; transition: transform .5s cubic-bezier(.77, 0, .18, 1); pointer-events: all; }
@keyframes dq-wipe-out { from { transform: scaleY(1); } to { transform: scaleY(0); } }

/* Scroll reveal */
html.dq-anim [data-dq] { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22, .61, .36, 1), transform .9s cubic-bezier(.22, .61, .36, 1); transition-delay: calc(var(--dq-i, 0) * 90ms); }
html.dq-anim [data-dq].is-in { opacity: 1; transform: none; }

/* Product title: letter reveal */
.dq-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.dq-c { display: inline-block; }

/* Product gallery: soft zoom while crossfading */
.t_sp_gallery_img { transform: scale(1.05); transition: opacity .7s ease, transform 1.6s cubic-bezier(.22, .61, .36, 1); }
.t_sp_gallery_img.is-active { transform: scale(1); }

/* Image hover zoom */
.t_sp_apps_row figure { overflow: hidden; }
.t_sp_colors_grid img, .t_sp_apps_row img { transition: transform 1s cubic-bezier(.22, .61, .36, 1); }
.t_sp_colors_grid a:hover img, .t_sp_colors_grid span:hover img, .t_sp_apps_row figure:hover img { transform: scale(1.05); }

/* Parallax banners: same "fixed image" look as before, but on a GPU layer.
   background-attachment: fixed repaints on every scroll frame and stutters;
   a position: fixed pseudo-element clipped by the banner does not. */
@media (min-width: 1024px) {
	.parallax { background-image: none; background-attachment: scroll; clip-path: inset(0); isolation: isolate; }
	.parallax::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; will-change: transform; background-image: var(--img); background-size: cover; background-position: center; background-repeat: no-repeat; }
}

/* Product buttons: fill sweep */
.t_sp_btn { position: relative; overflow: hidden; z-index: 0; transition: color .45s ease, background-color .3s ease; }
.t_sp_btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.77, 0, .18, 1); }
.t_sp_btn--dark::before { background: #fff; }
.t_sp_btn--light::before { background: #000; }
.t_sp_btn:hover::before { transform: scaleX(1); }
.t_sp_btn--dark:hover { background: #000; color: #000; }
.t_sp_btn--light:hover { background: transparent; color: #fff; }

/* Menu overlay: staggered links (delay only while opening) */
html.dq-anim .t_header_menu ul li, html.dq-anim .t_header_menu .menudata { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
html.dq-anim .t_header_menu.menushow ul li, html.dq-anim .t_header_menu.menushow .menudata { opacity: 1; transform: none; }
html.dq-anim .t_header_menu.menushow ul li:nth-child(1) { transition-delay: .25s; }
html.dq-anim .t_header_menu.menushow ul li:nth-child(2) { transition-delay: .33s; }
html.dq-anim .t_header_menu.menushow ul li:nth-child(3) { transition-delay: .41s; }
html.dq-anim .t_header_menu.menushow ul li:nth-child(4) { transition-delay: .49s; }
html.dq-anim .t_header_menu.menushow ul li:nth-child(n+5) { transition-delay: .57s; }
html.dq-anim .t_header_menu.menushow .menudata { transition-delay: .65s; }

@media (prefers-reduced-motion: reduce) {
	.dq-wipe { display: none !important; }
	html.dq-anim [data-dq] { opacity: 1; transform: none; transition: none; }
	.t_sp_gallery_img, .t_sp_colors_grid img, .t_sp_apps_row img { transition: none; transform: none; }
}
