/* The Homepage's pieces outside site.css for its budget, loaded on the Homepage only (inc/hero.php). */

/* The Project Wall (parts/home.css) comes in last (Da, 24 Nov 2026, "lazy load please"): out of the page until the
   rest of it has loaded (js/home.js), so none of its pictures load before; then it fades in, each picture over its
   white card as it arrives. */
.home-wall:not(.is-in) .home-wall__rows {
	display: none;
}
.home-wall__rows {
	transition: opacity 0.6s ease;
}
@starting-style {
	.home-wall__rows {
		opacity: 0;
	}
}
.home-wall__card img {
	opacity: 0;
	transition: scale 0.7s var(--fall), opacity 0.5s ease;
}
.home-wall__card img.is-in {
	opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
	.home-wall__rows,
	.home-wall__card img {
		transition: none;
	}
}

/* Service Focus's Folders (Da, 24 Nov 2026: "The left animation boxes, when I scroll up I want them to be stacked
   like folders with text above and stacked upon each other"; the text went the same evening). From
   992px the left column holds one Folder (components/folder.css) a service, an empty strip over the Tour's
   animation of it. Each comes up from below with its service's words and stops a step under the one before, so
   the edges of the ones read stay in view over it; all six leave together. They stack as the Featured Projects'
   cards do (Da, 24 Nov 2026: "can the stack of the homepage be like featured projects? now it's very resource
   consuming"): 20px lower each. Where each starts (--at) is measured so
   it stops as its words do (assets/js/home.js). Under 992px there are none (parts/home.css). */
@media (min-width: 992px) {
	.home-focus__stack {
		--strip: clamp(34px, 4.6vh, 44px);
		--step: 20px;
		--pad: 16px;
		--n: 6;
		/* the animation, 900 : 668, as tall as the strip, the steps and the bar leave it */
		--tour: calc((100vh - 180px - var(--strip) - var(--step) * (var(--n) - 1) - 2 * var(--pad)) * 1.347);
		display: grid;
		align-self: stretch;
	}
	.home-folder {
		--strip: inherit;
		position: sticky;
		top: calc(var(--stack-top, 116px) + var(--i) * var(--step));
		box-sizing: border-box;
		grid-area: 1 / 1;
		align-self: start;
		min-width: 0;
		margin: var(--at, calc(var(--i) * var(--focus-step))) 0 calc((var(--n) - 1 - var(--i)) * var(--step));
		/* a step smaller for every Folder on top (Da, 24 Nov 2026: "reduce size as you go like the actual stacks";
		   js/home.js), once as the next one comes over it and not with every frame of the scrolling */
		transform-origin: 50% 0;
		transition: scale var(--dbd-move) var(--dbd-ease);
		/* a white line round each, so stacked ones read as separate Folders */
		box-shadow: 0 0 0 2px var(--c-white);
	}
	.home-folder .folder__label {
		height: var(--strip);
		cursor: pointer;
	}
	.home-folder.is-on .folder__label {
		cursor: default;
	}
	/* under the next Folder, or away from the screen: its place is kept, its animation is not drawn */
	.home-folder.is-away .dbd-v--desktop {
		content-visibility: hidden;
	}
	/* the service's picture (Da, 24 Nov 2026, "experimental"); until it has loaded, white with the Glow Box's pale
	   light in its top left corner (Da, 23 Nov 2026) */
	.home-folder__panel {
		padding: var(--pad);
		background: var(--bg, radial-gradient(85% 95% at 0% 0%, rgb(65 170 185 / 0.17), rgb(65 170 185 / 0.06) 45%, rgb(65 170 185 / 0) 75%)) center / cover no-repeat var(--c-white);
	}
	.home-folder__panel .dbd-hero {
		box-sizing: border-box;
		padding-inline: max(0px, (100% - var(--tour)) / 2);
	}
	.home-folder__panel :is(.tp-pick, .tp-list) {
		display: none;
	}
	/* the Tour Pill is only its pause ring here, at the right end of the strip of the Folder being read */
	.home-folder__panel .tp {
		top: calc(var(--strip) / -2 - var(--pad) - 22px);
		right: calc(6px - var(--pad));
		bottom: auto;
		background: none;
		box-shadow: none;
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.3s;
	}
	.home-folder.is-on .tp {
		visibility: visible;
		opacity: 1;
	}
}
/* always the Tour's Desktop Version, whatever the Folder's width */
.home-folder__panel .dbd-v--phone {
	display: none;
}
.home-folder__panel .dbd-v--desktop {
	display: block;
	/* what runs out of the animation's foot (the old website's heap, renovate) ends at the panel's edge, not in a
	   line over it */
	overflow: visible;
	clip-path: inset(0 0 calc(-1 * var(--pad)) 0);
}
