/**
 * TD Homes — entrance animations (enhancement layer).
 *
 * Blocks mark elements with data-td-reveal="up|fade|media|line". They are only
 * hidden while <html> has .td-motion, which the inline head script adds when
 * IntersectionObserver is available (assets/js/motion.js reveals them), so
 * content is always visible without JavaScript and in the editor.
 *
 * Only opacity and transform are animated: nothing moves in the layout, and
 * the revealed state equals the element's normal state (motion.js removes
 * the attribute afterwards).
 *
 *   up     fade in, 16px upward movement (12px below 600px)
 *   fade   fade in only
 *   media  image settles from a 4% zoom — only on elements whose container
 *          clips them (overflow: hidden)
 *   line   rule drawn from the left
 */

:root {
	--td-reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--td-reveal-shift: 12px;
}

@media (min-width: 600px) {

	:root {
		--td-reveal-shift: 16px;
	}
}

.td-motion [data-td-reveal] {
	transition:
		opacity 0.7s var(--td-reveal-ease) var(--td-reveal-delay, 0s),
		transform 0.7s var(--td-reveal-ease) var(--td-reveal-delay, 0s);
}

.td-motion [data-td-reveal]:not(.is-revealed) {
	opacity: 0;
}

.td-motion [data-td-reveal="up"]:not(.is-revealed) {
	transform: translateY(var(--td-reveal-shift));
}

.td-motion [data-td-reveal="media"] {
	transition-duration: 1.1s;
}

.td-motion [data-td-reveal="media"]:not(.is-revealed) {
	transform: scale(1.04);
}

.td-motion [data-td-reveal="line"] {
	transform-origin: left center;
	transition-duration: 0.9s;
}

.td-motion [data-td-reveal="line"]:not(.is-revealed) {
	opacity: 1;
	transform: scaleX(0);
}

/* Keyboard focus never lands on invisible content. */
.td-motion [data-td-reveal]:focus-within {
	opacity: 1;
	transform: none;
}

/* Reduced motion: no movement or zoom; content simply appears (global.css
   shortens every transition). */
@media (prefers-reduced-motion: reduce) {

	.td-motion [data-td-reveal]:not(.is-revealed) {
		transform: none;
	}
}

@media print {

	.td-motion [data-td-reveal] {
		opacity: 1;
		transform: none;
	}
}
