/* ============================================================
   The page entry (Miles 2026-11-24: "a unified entry snappy animation for
   each page ... the title and icons when applicable ... nothing too long")
   One short arrival on every page, under a second, all in CSS so it starts
   with the first paint and needs no script:
   - inner pages (template-parts/pages/page-hero.php): the pin drops, then
     the gold line, the heading, the introduction and any buttons rise in
     one after another, and the icon strip follows in a quick ripple;
   - the homepage hero: the same rise for its words, while the round photo
     opens a little, the rings settle and the minis and price badge pop in.
   Only opacity, the individual transform properties (translate / scale,
   so hover transforms and the hero's magnet are untouched) and a clip, so
   nothing shifts the layout. `backwards` holds the first frame through the
   delay and lets go at the end. Skipped entirely under reduced motion.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {

	/* Inner pages */
	.page-hero__label,
	.page-hero__title,
	.page-hero__lead,
	.page-hero__jumps,
	.page-hero__actions,
	.glance__item {
		animation: tlo-enter-rise 0.55s var(--ease) backwards;
	}

	.page-hero__label .icon {
		animation: tlo-enter-pin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s backwards;
	}

	.page-hero__title {
		animation-delay: 0.07s;
	}

	.page-hero__lead {
		animation-delay: 0.14s;
	}

	.page-hero__jumps,
	.page-hero__actions {
		animation-delay: 0.21s;
	}

	.glance__item {
		animation-duration: 0.45s;
		animation-delay: 0.24s;
	}

	.glance__item:nth-child(2) { animation-delay: 0.28s; }
	.glance__item:nth-child(3) { animation-delay: 0.32s; }
	.glance__item:nth-child(4) { animation-delay: 0.36s; }
	.glance__item:nth-child(5) { animation-delay: 0.40s; }
	.glance__item:nth-child(n + 6) { animation-delay: 0.44s; }

	/* The homepage hero */
	.hero__title,
	.hero__loc,
	.hero__lead,
	.hero__btn {
		animation: tlo-enter-rise 0.55s var(--ease) backwards;
	}

	.hero__loc {
		animation-delay: 0.07s;
	}

	.hero__lead {
		animation-delay: 0.14s;
	}

	.hero__btn {
		animation-delay: 0.21s;
	}

	.hero__circle {
		animation: tlo-enter-open 0.6s var(--ease) backwards;
	}

	.hero__stage::before,
	.hero__stage::after {
		animation: tlo-enter-settle 0.6s var(--ease) 0.1s backwards;
	}

	.hero__mini {
		animation: tlo-enter-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
	}

	.hero__mini + .hero__mini {
		animation-delay: 0.36s;
	}

	.hero__price {
		animation: tlo-enter-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s backwards;
	}

	.hero__dots {
		animation: tlo-enter-fade 0.45s var(--ease) 0.45s backwards;
	}

	/* The current page's dotted rule in the menu draws in, dot by dot, like
	   its hover. */
	@media (min-width: 1181px) {
		.site-header__menu a[aria-current="page"]::after {
			animation: tlo-enter-dots 0.6s var(--ease) 0.15s backwards;
		}
	}
}

/* 0.01, not 0: the eye cannot tell, but Chrome does not count fully
   transparent text as painted, so the page's "largest paint" (a Core Web
   Vital) would wait for the end of the rise (0.85s, measured) instead of
   the first paint. */
@keyframes tlo-enter-rise {
	from {
		opacity: 0.01;
		translate: 0 16px;
	}
}

@keyframes tlo-enter-fade {
	from {
		opacity: 0;
	}
}

@keyframes tlo-enter-pin {
	from {
		opacity: 0;
		translate: 0 -12px;
	}
}

@keyframes tlo-enter-pop {
	from {
		opacity: 0;
		scale: 0.6;
	}
}

@keyframes tlo-enter-settle {
	from {
		opacity: 0;
		scale: 0.97;
	}
}

/* Explicit both ends: a clip cannot ease to or from none. */
@keyframes tlo-enter-open {
	from {
		clip-path: circle(44% at 50% 50%);
	}

	to {
		clip-path: circle(50% at 50% 50%);
	}
}

@keyframes tlo-enter-dots {
	from {
		-webkit-mask-position: var(--dots-hidden);
		mask-position: var(--dots-hidden);
	}

	to {
		-webkit-mask-position: var(--dots-shown);
		mask-position: var(--dots-shown);
	}
}
