/* Zenesis v2 — "Why Zenesis Consulting" section.
   Layout, content, colours and typography are set in Elementor / Site Settings.
   This file adds the portrait crop + gold corner line, small typographic accents, and the scroll reveal. */

.zn-why {
	--zn-ease-out: cubic-bezier(.16, 1, .3, 1);
	--zn-corner: 24px; /* gold corner line offset from the portrait */
}
.zn-why p:last-child { margin-bottom: 0; }

/* ── Portrait: fixed 4:5 window (image slightly oversized for the scroll drift) ── */
.zn-why .zn-why__media { position: relative; }
.zn-why .zn-why__portrait { position: relative; z-index: 1; overflow: hidden; }
.zn-why .zn-why__portrait img {
	display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
	scale: 1.08; translate: 0 var(--zn-py, 0px);
}
/* fine gold corner line framing the portrait's top-left */
.zn-why .zn-why__media::before {
	content: ""; position: absolute; z-index: 0;
	top: calc(var(--zn-corner) * -1); left: calc(var(--zn-corner) * -1);
	width: 46%; height: 38%;
	border-top: 1px solid var(--e-global-color-primary);
	border-left: 1px solid var(--e-global-color-primary);
	pointer-events: none;
}
.zn-why .zn-why__card { position: relative; z-index: 2; }

/* ── Typographic accents ── */
.zn-why .zn-why__dot,
.zn-why .elementor-counter-number-suffix { color: var(--e-global-color-primary); }

/* "About Zenesis": the standard site button (white, gold sweep, arrow; global.css), as "Explore Insights";
   a gold edge sets it off the white section, as on the Get Started form's Submit button */
.zn-why .zn-why__link .elementor-button { border: 1px solid var(--e-global-color-primary); }

/* ── Scroll reveal (states armed by why.js; without JS everything is visible) ── */
.zn-why.is-armed .zn-why-rv { opacity: 0; translate: 0 28px; }
.zn-why.is-armed .zn-why-rv.is-in {
	opacity: 1; translate: 0 0;
	transition: opacity 1s ease, translate 1.2s var(--zn-ease-out);
	transition-delay: var(--zn-d, 0s);
}
.zn-why.is-armed .zn-why__accent { scale: 1 0; transform-origin: 50% 0; }
.zn-why.is-armed .zn-why__accent.is-in { scale: 1 1; transition: scale 1.2s var(--zn-ease-out) .1s; }

.zn-why.is-armed .zn-why__portrait { clip-path: inset(100% 0 0 0); }
.zn-why.is-armed .zn-why__portrait img { scale: 1.2; }
/* driven by the column (a fully clipped element never reports as intersecting) */
.zn-why.is-armed .zn-why__media.is-in .zn-why__portrait { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--zn-ease-out); }
.zn-why.is-armed .zn-why__media.is-in .zn-why__portrait img { scale: 1.08; transition: scale 2s var(--zn-ease-out); }

.zn-why.is-armed .zn-why__media::before { scale: 0; transform-origin: 0 0; }
.zn-why.is-armed .zn-why__media.is-in::before { scale: 1; transition: scale 1.6s var(--zn-ease-out) .5s; }

/* stacked layouts: wider crop centred on the face keeps the section height in check */
@media (max-width: 1024px) {
	.zn-why .zn-why__portrait img { aspect-ratio: 16 / 10; object-position: 50% 24%; }
}
@media (max-width: 767px) {
	.zn-why { --zn-corner: 12px; }
	.zn-why .zn-why__portrait img { aspect-ratio: 1 / 1; object-position: 50% 20%; }
}

@media (prefers-reduced-motion: reduce) {
	.zn-why .zn-why__portrait img { scale: 1; translate: none; }
}
