/* Global Auto premium motion system: progressive enhancement only. */
:root {
	--motion-fast: 180ms;
	--motion-normal: 520ms;
	--motion-slow: 820ms;
	--ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

/* Restrained atmospheric continuity between light and dark sections. */
.paat-r2-catalog,
.paat-r2-company,
.paat-r2-gallery,
.ga-section:not(.ga-section--dark) {
	background-image: linear-gradient(180deg, rgb(235 246 241 / 50%) 0%, rgb(255 255 255 / 0%) 13rem, rgb(255 255 255 / 0%) calc(100% - 10rem), rgb(241 246 247 / 58%) 100%);
}

.paat-r2-process,
.ga-section--surface {
	background-image: linear-gradient(180deg, rgb(237 246 243 / 72%), rgb(244 247 248 / 88%) 48%, rgb(255 255 255 / 82%));
}

.paat-r2-services,
.paat-r2-cta,
.ga-section--dark {
	background-image: linear-gradient(135deg, #071e36 0%, #102b46 58%, #173957 100%);
}

/* Header and navigation are stable; only the indicator and surface interpolate. */
.ga-site-header,
.ga-header-inner { transition-timing-function: var(--ease-premium); }
.ga-site-header { transition-duration: var(--motion-normal); }
.ga-primary-menu > li > a,
.ga-language-switcher__link {
	position: relative;
	transition: color var(--motion-fast) var(--ease-premium), opacity var(--motion-fast) var(--ease-premium);
}
.ga-primary-menu > li > a::after,
.ga-language-switcher__link::after {
	background: var(--color-accent);
	bottom: -0.45rem;
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--motion-normal) var(--ease-premium);
	width: 100%;
}
.ga-primary-menu > li.current-menu-item > a::after,
.ga-primary-menu > li.current-menu-ancestor > a::after,
.ga-primary-menu > li > a:hover::after,
.ga-primary-menu > li > a:focus-visible::after,
.ga-language-switcher__link.is-current::after,
.ga-language-switcher__link:hover::after,
.ga-language-switcher__link:focus-visible::after { transform: scaleX(1); }

/* Shared button and card touch points. */
.paat-button,
.paat-r2-button,
.ga-button,
.wp-block-button__link,
.company-enquiry-form button[type="submit"] {
	transition: background-color var(--motion-fast) var(--ease-premium), border-color var(--motion-fast) var(--ease-premium), box-shadow var(--motion-normal) var(--ease-premium), color var(--motion-fast) var(--ease-premium), transform var(--motion-fast) var(--ease-premium);
}
@media (hover: hover) {
	.paat-button:hover,
	.paat-r2-button:hover,
	.ga-button:hover,
	.wp-block-button__link:hover,
	.company-enquiry-form button[type="submit"]:hover {
		box-shadow: 0 0.7rem 1.5rem rgb(8 36 64 / 14%);
		transform: translateY(-2px);
	}
	.ga-catalog-card:hover,
	.ga-card:hover,
	.ga-step:hover {
		box-shadow: var(--shadow-lift);
		transform: translateY(-0.35rem);
	}
	.ga-catalog-card__media img,
	.ga-card img,
	.paat-r2-gallery figure img,
	.paat-r2-company__visual { transition: transform var(--motion-slow) var(--ease-premium); }
	.ga-catalog-card:hover .ga-catalog-card__media img,
	.ga-card:hover img,
	.paat-r2-gallery figure:hover img,
	.paat-r2-company__visual:hover { transform: translateY(-0.15rem); }
}
.paat-button:active,
.paat-r2-button:active,
.ga-button:active,
.wp-block-button__link:active,
.company-enquiry-form button[type="submit"]:active { transform: translateY(0); }

/* Howo/Shacman and the 01–06 controls use one calm indicator language. */
.paat-r2-showcase .paat-showcase__brand,
.paat-r2-showcase .paat-showcase__category {
	position: relative;
	transition: color var(--motion-normal) var(--ease-premium), opacity var(--motion-normal) var(--ease-premium), transform var(--motion-normal) var(--ease-premium);
}
.paat-r2-showcase .paat-showcase__brand::after,
.paat-r2-showcase .paat-showcase__category::after {
	background: var(--color-secondary);
	bottom: -0.15rem;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--motion-normal) var(--ease-premium);
	width: 100%;
}
.paat-r2-showcase .paat-showcase__brand.is-active::after,
.paat-r2-showcase .paat-showcase__category.is-active::after { transform: scaleX(1); }
.paat-r2-showcase .paat-showcase__category.is-active { transform: translateY(-2px); }

/* Existing interaction states become a synchronized crossfade, not a carousel slide. */
.paat-r2-showcase .paat-showcase__vehicle img {
	transition: opacity var(--motion-normal) var(--ease-soft), transform var(--motion-slow) var(--ease-premium);
	will-change: opacity, transform;
}
.paat-r2-showcase .paat-showcase__copy > * {
	transition: opacity var(--motion-normal) var(--ease-soft), transform var(--motion-normal) var(--ease-premium);
}
.paat-r2-showcase .paat-showcase__copy > :nth-child(2) { transition-delay: 40ms; }
.paat-r2-showcase .paat-showcase__copy > :nth-child(3) { transition-delay: 80ms; }
.paat-r2-showcase .paat-showcase__copy > :nth-child(6) { transition-delay: 120ms; }
.paat-r2-showcase .paat-showcase__stage.is-changing .paat-showcase__vehicle img { opacity: 0; transform: scale(1.012); }
.paat-r2-showcase .paat-showcase__stage.is-changing .paat-showcase__copy > * { opacity: 0; transform: translateY(-0.45rem); transition-delay: 0ms; }

/* Base content stays visible; hiding starts only after enhancement has initialized. */
html.motion-enabled .ga-motion-reveal {
	opacity: 0;
	transform: translateY(2rem);
	transition: opacity var(--motion-slow) var(--ease-premium) var(--motion-delay, 0ms), transform var(--motion-slow) var(--ease-premium) var(--motion-delay, 0ms);
	will-change: opacity, transform;
}
html.motion-enabled .ga-motion-reveal.is-motion-revealed { opacity: 1; transform: translateY(0); }
html.motion-enabled .ga-motion-header:not(.is-motion-ready) { opacity: 0; transform: translateY(-0.8rem); }
html.motion-enabled .ga-motion-header { transition: opacity var(--motion-normal) var(--ease-premium), transform var(--motion-normal) var(--ease-premium), background-color var(--motion-normal) var(--ease-premium), box-shadow var(--motion-normal) var(--ease-premium); }
html.motion-enabled .paat-r3-hero__copy > *,
html.motion-enabled .paat-r3-hero__visual img { transition: opacity var(--motion-slow) var(--ease-premium), transform var(--motion-slow) var(--ease-premium); }
html.motion-enabled .paat-r3-hero:not(.is-motion-ready) .paat-r3-hero__copy > * { opacity: 0; transform: translateY(1.7rem); }
html.motion-enabled .paat-r3-hero:not(.is-motion-ready) .paat-r3-hero__visual img { opacity: 0; transform: scale(1.025); }
html.motion-enabled .paat-r3-hero__copy > :nth-child(2) { transition-delay: 80ms; }
html.motion-enabled .paat-r3-hero__copy > :nth-child(3) { transition-delay: 150ms; }
html.motion-enabled .paat-r3-hero__copy > :nth-child(4) { transition-delay: 220ms; }
html.motion-enabled .paat-r3-hero__copy > :nth-child(5) { transition-delay: 280ms; }

@media (max-width: 48rem) {
	html { scroll-behavior: auto; }
	html.motion-enabled .ga-motion-reveal { transform: translateY(1.15rem); transition-duration: 560ms; }
	.paat-r2-showcase .paat-showcase__category.is-active { transform: translateY(-1px); }
	.paat-r2-showcase .paat-showcase__vehicle img { will-change: auto; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after { animation-duration: 0.01ms !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
	html.motion-enabled .ga-motion-reveal,
	html.motion-enabled .ga-motion-reveal.is-motion-revealed,
	html.motion-enabled .ga-motion-header,
	html.motion-enabled .paat-r3-hero__copy > *,
	html.motion-enabled .paat-r3-hero__visual img { opacity: 1 !important; transform: none !important; }
}

/* R4.2: viewport-aware showcase and bidirectional section motion. */
@media (min-width: 48.0625rem) {
	.paat-r2-showcase {
		height: calc(100dvh - var(--ga-admin-viewport-offset, 0px) - var(--ga-header-viewport-overlap, 0px));
	}

	body.admin-bar .paat-r2-showcase { --ga-admin-viewport-offset: 32px; }
}

html.motion-enabled .ga-motion-section {
	opacity: 0.88;
	transition: opacity 680ms var(--ease-premium), transform 680ms var(--ease-premium);
}
html.motion-enabled .ga-motion-section.motion-enter-from-down { transform: translateY(28px); }
html.motion-enabled .ga-motion-section.motion-enter-from-up { transform: translateY(-22px); }
html.motion-enabled .ga-motion-section.is-motion-visible { opacity: 1; transform: translateY(0); }

[data-motion-parallax] {
	--scroll-parallax-y: 0px;
	transition: transform 180ms linear;
}
.paat-r2-showcase .paat-showcase__vehicle { transform: translate3d(var(--showcase-pointer-x, 0px), calc(var(--showcase-pointer-y, 0px) + var(--scroll-parallax-y)), 0); }
.paat-r2-parts__visual { transform: translateY(var(--scroll-parallax-y)); }
.paat-r2-gallery__grid { transform: translateY(var(--scroll-parallax-y)); }
.paat-r3-hero__visual { transform: translateY(var(--scroll-parallax-y)); }

html.motion-enabled .paat-r2-company__copy,
html.motion-enabled .paat-r2-company__visual {
	--company-enter-x: 0px;
	opacity: 1;
	transform: translate3d(var(--company-enter-x), var(--scroll-parallax-y, 0px), 0);
	transition: opacity 680ms var(--ease-premium), transform 680ms var(--ease-premium);
}
html.motion-enabled .paat-r2-company:not(.is-motion-visible) .paat-r2-company__copy { --company-enter-x: -20px; opacity: 0.88; }
html.motion-enabled .paat-r2-company:not(.is-motion-visible) .paat-r2-company__visual { --company-enter-x: 20px; opacity: 0.88; }

html.motion-enabled .paat-r2-catalog .paat-r2-section__header,
html.motion-enabled .paat-r2-catalog .paat-r2-catalog__tabs,
html.motion-enabled .paat-r2-catalog [data-home-vehicle-card] {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 620ms var(--ease-premium), transform 620ms var(--ease-premium);
}
html.motion-enabled .paat-r2-catalog:not(.is-motion-visible) .paat-r2-section__header { opacity: 0.88; transform: translateY(22px); }
html.motion-enabled .paat-r2-catalog:not(.is-motion-visible) .paat-r2-catalog__tabs { opacity: 0.88; transform: translateY(18px); }
html.motion-enabled .paat-r2-catalog:not(.is-motion-visible) [data-home-vehicle-card] { opacity: 0.88; transform: translateY(24px); }
html.motion-enabled .paat-r2-catalog.is-motion-visible .paat-r2-catalog__tabs { transition-delay: 80ms; }
html.motion-enabled .paat-r2-catalog.is-motion-visible [data-home-vehicle-card]:nth-child(1) { transition-delay: 120ms; }
html.motion-enabled .paat-r2-catalog.is-motion-visible [data-home-vehicle-card]:nth-child(2) { transition-delay: 200ms; }
html.motion-enabled .paat-r2-catalog.is-motion-visible [data-home-vehicle-card]:nth-child(3) { transition-delay: 280ms; }
html.motion-enabled .paat-r2-catalog.is-motion-visible [data-home-vehicle-card]:nth-child(4) { transition-delay: 360ms; }
html.motion-enabled .paat-r2-catalog.motion-enter-from-up.is-motion-visible [data-home-vehicle-card]:nth-child(1) { transition-delay: 360ms; }
html.motion-enabled .paat-r2-catalog.motion-enter-from-up.is-motion-visible [data-home-vehicle-card]:nth-child(2) { transition-delay: 280ms; }
html.motion-enabled .paat-r2-catalog.motion-enter-from-up.is-motion-visible [data-home-vehicle-card]:nth-child(3) { transition-delay: 200ms; }
html.motion-enabled .paat-r2-catalog.motion-enter-from-up.is-motion-visible [data-home-vehicle-card]:nth-child(4) { transition-delay: 120ms; }

html.motion-enabled .paat-r2-services li { position: relative; }
html.motion-enabled .paat-r2-services li::after {
	background: var(--color-accent);
	bottom: 0;
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	transform: scaleX(1);
	transform-origin: left center;
	transition: transform 620ms var(--ease-premium);
	width: 100%;
}
html.motion-enabled .paat-r2-services:not(.is-motion-visible) li::after { transform: scaleX(0); }
html.motion-enabled .paat-r2-services.is-motion-visible li:nth-child(2)::after { transition-delay: 80ms; }
html.motion-enabled .paat-r2-services.is-motion-visible li:nth-child(3)::after { transition-delay: 160ms; }
html.motion-enabled .paat-r2-services.is-motion-visible li:nth-child(4)::after { transition-delay: 240ms; }

@media (min-width: 48.0625rem) {
	html.motion-enabled .paat-r2-process ol:not(.paat-r2-process__route) { position: relative; }
	html.motion-enabled .paat-r2-process ol:not(.paat-r2-process__route)::before {
		background: #b7c9cc;
		content: "";
		height: 1px;
		left: 8%;
		position: absolute;
		right: 8%;
		top: 4.15rem;
		transform: scaleX(1);
		transform-origin: left center;
		transition: transform 720ms var(--ease-premium);
		z-index: 1;
	}
	html.motion-enabled .paat-r2-process:not(.is-motion-visible) ol:not(.paat-r2-process__route)::before { transform: scaleX(0); }
}

.paat-r2-showcase .paat-showcase__brands { position: relative; }
.paat-r2-showcase .paat-showcase__brands::after {
	background: var(--color-secondary);
	bottom: -0.15rem;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	transform: translateX(var(--showcase-brand-indicator-x, 0px));
	transition: transform 480ms var(--ease-premium), width 480ms var(--ease-premium);
	width: var(--showcase-brand-indicator-width, 0px);
}
.paat-r2-showcase .paat-showcase__brand::after { display: none; }
.paat-r2-showcase .paat-showcase__category:hover::after { transform: scaleX(1); }
.paat-r2-showcase .paat-showcase__stage::after { content: attr(data-showcase-category-index); transition: opacity 420ms var(--ease-premium), transform 420ms var(--ease-premium); }
.paat-r2-showcase .paat-showcase__stage.is-changing::after { opacity: 0.02; transform: scale(0.98); }
.paat-r2-showcase .paat-showcase__stage.is-changing .paat-showcase__vehicle img { opacity: 0; transform: translateX(-18px) scale(0.99); }
.paat-r2-showcase .paat-showcase__vehicle.is-entering img { opacity: 0; transform: translateX(26px) scale(1.015); }
@media (hover: hover) {
	.paat-r2-showcase .paat-showcase__vehicle:hover img { transform: scale(1.012); }
	.paat-r2-showcase .paat-showcase__vehicle.is-entering:hover img { transform: translateX(26px) scale(1.008); }
}

@media (max-width: 48rem) {
	html.motion-enabled .ga-motion-section.motion-enter-from-down { transform: translateY(16px); }
	html.motion-enabled .ga-motion-section.motion-enter-from-up { transform: translateY(-14px); }
	[data-motion-parallax] { transition: none; }
	.paat-r3-hero__visual { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	html.motion-enabled .ga-motion-section,
	html.motion-enabled .ga-motion-section.motion-enter-from-down,
	html.motion-enabled .ga-motion-section.motion-enter-from-up,
	html.motion-enabled .paat-r2-company__copy,
	html.motion-enabled .paat-r2-company__visual,
	html.motion-enabled .paat-r2-catalog .paat-r2-section__header,
	html.motion-enabled .paat-r2-catalog .paat-r2-catalog__tabs,
	html.motion-enabled .paat-r2-catalog [data-home-vehicle-card] { opacity: 1 !important; transform: none !important; }
}
