/* shamagnus: video site front page only (body.sh-vhome). Ink base with Ember and Plum bands, straight edges with a soft shadow, flame before headlines. Loaded from functions.php on the video front page only. */

.sh-vhome {
	--sh-ink: #1a1410;
	--sh-ember: #5a1b10;
	--sh-plum: #3a2343;
	--sh-flame-on-dark: #F4896A;
	--sh-pad-x: max(16px, var(--wp--style--root--padding-left, 16px));
}
html:has(body.sh-vhome) { overflow-x: hidden; }

/* Bands: each section gets a full-width background through a pseudo-element that reaches halfway into the gaps. */
.sh-vhome .sh-video-front {
	--sh-sec-gap: clamp(112px, 12vw, 160px);
	--sh-band: var(--sh-ink);
	padding-block: var(--wp--preset--spacing--40) calc(var(--sh-sec-gap) / 2);
	font-size: clamp(1.05rem, .55vw + .95rem, 1.25rem);
}
.sh-vhome .sh-video-front > * { position: relative; min-width: 0; max-width: 100%; }
.sh-vhome .sh-video-front > *::before,
.sh-vhome .sh-video-front > * + *::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	top: calc(var(--sh-sec-gap) / -2);
	bottom: calc(var(--sh-sec-gap) / -2);
	width: 100vw;
	max-width: none;
	height: auto;
	transform: translateX(-50%);
	background: var(--sh-band);
	pointer-events: none;
}
.sh-vhome .sh-cases { --sh-band: var(--sh-ember); }
.sh-vhome .sh-solo { --sh-band: var(--sh-plum); }
.sh-vhome .sh-mise { --sh-band: var(--sh-ember); }
.sh-vhome .sh-cases,
.sh-vhome .sh-mise { color: #f6ece4; }
.sh-vhome .sh-solo { color: #f2ede6; }
.sh-vhome .sh-cases .sh-case h3,
.sh-vhome .sh-solo h3 { color: inherit; }
.sh-vhome .sh-solo .sh-project p,
.sh-vhome .sh-solo .sh-project-thumb { color: #cdb9d3; }
.sh-vhome .sh-solo .sh-project-thumb { background: rgba(255, 255, 255, .08); }
.sh-vhome footer.wp-block-template-part { margin-block-start: 0 !important; }

/* Headlines: bigger, with the flame in front. */
.sh-vhome .sh-video-front .sh-solo-title,
.sh-vhome .sh-video-front .sh-mise-title {
	font-size: clamp(1.9rem, 4.6vw, 3.4rem);
	line-height: 1.08;
	text-wrap: balance;
}
.sh-vhome .sh-video-front h2::before {
	content: "";
	display: inline-block;
	width: .74em;
	height: .94em;
	margin-right: .26em;
	vertical-align: -.06em;
	background: url("shamagnus-flame.svg") center / contain no-repeat;
}
.sh-vhome .sh-video-front p { font-size: inherit; }
.sh-vhome .sh-video-front a { text-underline-offset: .2em; }

/* About: quote box overlapping the edge of the photo. */
.sh-vhome .sh-video-about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; gap: 0; }
.sh-vhome .sh-video-about .sh-quote {
	grid-column: 1 / 8;
	grid-row: 1;
	z-index: 2;
	max-width: none;
	box-shadow: 0 22px 50px rgba(0, 0, 0, .45);
}
.sh-vhome .sh-video-about .sh-video-photo { grid-column: 7 / 13; grid-row: 1; align-self: center; }
.sh-vhome .sh-video-about .sh-video-photo img { border-radius: 14px; }
.sh-vhome .sh-video-about .sh-video-photo figcaption { padding-left: 18%; }

/* Client logos: one slow row drifting right to left, paused on hover or focus. Static and wrapped for reduced motion. */
.sh-vhome .sh-logos-band {
	position: relative;
	margin-top: clamp(40px, 5vw, 64px);
	padding-block: clamp(28px, 3.4vw, 44px);
}
/* Pull the next section up so the brown band meets it directly, with the logos centred in the band. */
.sh-vhome .sh-recs { margin-bottom: calc(var(--sh-sec-gap) / -2) !important; }
.sh-vhome .sh-logos-band::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 100vw;
	transform: translateX(-50%);
	background: #2a231d;
}
.sh-vhome .sh-logos {
	max-width: 100%;
	contain: inline-size;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.sh-vhome .sh-logos-track {
	display: flex;
	width: max-content;
	animation: sh-logos-scroll 110s linear infinite;
}
.sh-vhome .sh-logos:hover .sh-logos-track,
.sh-vhome .sh-logos:focus-within .sh-logos-track { animation-play-state: paused; }
.sh-vhome .sh-logos-set {
	display: flex;
	flex: none;
	align-items: center;
	gap: clamp(44px, 5vw, 72px);
	padding-right: clamp(44px, 5vw, 72px);
}
.sh-vhome .sh-logos-set img { display: block; width: auto; max-width: none; max-height: 108px !important; flex: none; opacity: .92; border-radius: 0; }
@keyframes sh-logos-scroll { to { transform: translateX(-50%); } }
@media (max-width: 640px) { .sh-vhome .sh-logos-set img { zoom: .72; } }
@media (prefers-reduced-motion: reduce) {
	.sh-vhome .sh-logos { -webkit-mask-image: none; mask-image: none; }
	.sh-vhome .sh-logos-track { animation: none; width: auto; }
	.sh-vhome .sh-logos-set { flex-wrap: wrap; justify-content: center; padding-right: 0; row-gap: 32px; }
	.sh-vhome .sh-logos-set[aria-hidden="true"] { display: none; }
}

/* Rise on scroll for the pieces inside a band (not the bands themselves). */
.sh-vhome .sh-rise { transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s ease; }
.sh-anim .sh-rise:not(.sh-in-view) { transform: translateY(26px); opacity: .35; }
@media (prefers-reduced-motion: reduce) {
	.sh-vhome .sh-rise { transition: none; }
	.sh-anim .sh-rise:not(.sh-in-view) { transform: none; opacity: 1; }
}

/* Phone: photo first, box underneath (the photo caption stays readable). */
@media (max-width: 860px) {
	.sh-vhome .sh-video-about { display: flex; flex-direction: column; gap: 24px; }
	.sh-vhome .sh-video-about .sh-video-photo { order: 0; margin: 0; }
	.sh-vhome .sh-video-about .sh-video-photo figcaption { padding-left: 0; }
	.sh-vhome .sh-video-about .sh-quote { order: 1; margin: 0 !important; }
}
