/* Eurotech Autohaus - scroll motion (DeCODE Digital)
   Used with js/dc-motion.js. The html element only gets the dc-motion class
   when the script is running, so content is never hidden without it. */

html.dc-motion .dc-reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .95s cubic-bezier(.2, .65, .2, 1), transform .95s cubic-bezier(.2, .65, .2, 1);
	transition-delay: var(--dc-delay, 0ms);
}
html.dc-motion .dc-reveal.is-in { opacity: 1; transform: none; }

/* Split-row photos wipe open (the class sits on the column, the photo inside is clipped) */
html.dc-motion .dc-reveal--wipe-l,
html.dc-motion .dc-reveal--wipe-r { opacity: 1; transform: none; transition: none; }
html.dc-motion .dc-reveal--wipe-l > .fl-col-content,
html.dc-motion .dc-reveal--wipe-r > .fl-col-content {
	transition: clip-path 1.35s cubic-bezier(.65, .05, .2, 1);
	transition-delay: var(--dc-delay, 0ms);
}
html.dc-motion .dc-reveal--wipe-l > .fl-col-content { clip-path: inset(0 100% 0 0); }
html.dc-motion .dc-reveal--wipe-r > .fl-col-content { clip-path: inset(0 0 0 100%); }
html.dc-motion .dc-reveal--wipe-l.is-in > .fl-col-content,
html.dc-motion .dc-reveal--wipe-r.is-in > .fl-col-content { clip-path: inset(0 0 0 0); }

/* The orange double rule under a heading draws in from the left */
html.dc-motion .dc-reveal .pp-heading-separator {
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 1s cubic-bezier(.2, .65, .2, 1) .35s;
}
html.dc-motion .dc-reveal.is-in .pp-heading-separator { transform: scaleX(1); }

/* Hero: the copy settles in once on load */
@media (prefers-reduced-motion: no-preference) {
	.dc-hero__heading, .dc-hero__sub, .dc-hero__actions { animation: dc-hero-in 1s cubic-bezier(.2, .65, .2, 1) both; }
	.dc-hero__sub { animation-delay: .22s; }
	.dc-hero__actions { animation-delay: .36s; }
	.dc-hero__rule { transform-origin: left center; animation: dc-hero-rule .9s cubic-bezier(.2, .65, .2, 1) .16s both; }
}
@keyframes dc-hero-in {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: none; }
}
@keyframes dc-hero-rule {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}
