/*
 * Ekhaa 2026 — the cinematic layer.
 *
 * Loaded after style.css. Everything here is presentation: remove this file
 * and the site is still complete, readable and navigable. That is deliberate —
 * none of the drama below is allowed to carry meaning.
 *
 * Every effect sits inside a no-preference query or behind
 * :root[data-ekhaa-motion="off"], so a visitor who asks for stillness gets a
 * completely static page. WCAG 2.3.3 Animation from Interactions.
 */

/* ==========================================================================
   1. Hero — full bleed, layered, cinematic
   ========================================================================== */

.ekhaa-hero {
	min-height: min(92svh, 860px);
	display: grid;
	align-items: center;
	padding-block: clamp(4rem, 10vw, 8rem) clamp(5rem, 11vw, 9rem);
}

/* The photograph is a layer of the stage, not a box beside the text. */
.ekhaa-stage {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
}

.ekhaa-stage img {
	width: 100%;
	height: 118%;
	object-fit: cover;
	object-position: 50% 42%;
	/* Pushed back so white type always wins. */
	filter: saturate(.72) contrast(1.06) brightness(.42);
	will-change: transform;
}

/* Warm light raking across the picture, plus a deep floor for the text. */
.ekhaa-stage::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(70% 55% at 78% 18%, rgba(220,168,89,.42), transparent 62%),
		radial-gradient(60% 50% at 12% 88%, rgba(61,141,133,.34), transparent 66%),
		linear-gradient(to top, rgba(10,18,36,.94) 0%, rgba(14,24,46,.72) 42%, rgba(14,24,46,.46) 100%);
}

.ekhaa-hero__inner { position: relative; z-index: 2; }

/* Type big enough to carry a page on its own. */
.ekhaa-hero h1 {
	font-size: clamp(3rem, 9.5vw, 7.4rem);
	line-height: 1.02;
	letter-spacing: -.025em;
	max-width: 12ch;
	text-shadow: 0 2px 30px rgba(6, 12, 26, .55);
}

/* A slow sheen travelling across the gold word. */
.ekhaa-hero h1 em {
	background: linear-gradient(100deg,
		var(--gold-soft) 0%, #ffe6b0 28%, var(--gold) 52%, var(--gold-soft) 80%);
	background-size: 260% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
	.ekhaa-hero h1 em { animation: ekhaa-sheen 7s ease-in-out infinite; }
}
:root[data-ekhaa-motion="off"] .ekhaa-hero h1 em {
	animation: none;
	background: none;
	-webkit-text-fill-color: var(--gold-soft);
	color: var(--gold-soft);
}

@keyframes ekhaa-sheen {
	0%, 100% { background-position: 100% 0; }
	50%      { background-position: 0 0; }
}

.ekhaa-hero__lede {
	font-size: clamp(1.15rem, 1.7vw, 1.5rem);
	color: #e4d9c4;
	text-shadow: 0 1px 14px rgba(6, 12, 26, .6);
}

/* A quiet invitation to keep going. */
.ekhaa-scroll {
	position: absolute;
	inset-inline-start: 50%;
	bottom: 1.8rem;
	transform: translateX(50%);
	z-index: 3;
	display: grid;
	justify-items: center;
	gap: .5rem;
	color: #cbb99a;
	font-size: .8rem;
	text-decoration: none;
}
.ekhaa-scroll span {
	width: 1px; height: 42px;
	background: linear-gradient(to bottom, transparent, var(--gold));
}
@media (prefers-reduced-motion: no-preference) {
	.ekhaa-scroll span { animation: ekhaa-trail 2.2s ease-in-out infinite; transform-origin: top; }
}
@keyframes ekhaa-trail {
	0%, 100% { transform: scaleY(.35); opacity: .4; }
	50%      { transform: scaleY(1);   opacity: 1; }
}

/* ==========================================================================
   2. Scroll-driven section entrances
   Sections lift and sharpen as they arrive rather than merely fading.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	:root[data-ekhaa-anim="on"] .ekhaa-reveal {
		opacity: 0;
		transform: translateY(30px) scale(.985);
		filter: blur(6px);
		transition:
			opacity .8s var(--ease),
			transform .8s var(--ease),
			filter .8s var(--ease);
	}
	:root[data-ekhaa-anim="on"] .ekhaa-reveal.is-in {
		opacity: 1; transform: none; filter: none;
	}
}

/* ==========================================================================
   3. Magnetic buttons
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	.ekhaa-btn {
		transform: translate(calc(var(--mx, 0) * 7px), calc(var(--my, 0) * 7px));
		transition: transform .25s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
	}
	.ekhaa-btn:hover {
		transform: translate(calc(var(--mx, 0) * 7px), calc(var(--my, 0) * 7px - 2px));
	}
}

/* ==========================================================================
   4. Section headings get a drawn rule
   ========================================================================== */

.ekhaa-head h2 { position: relative; display: inline-block; }
.ekhaa-head h2::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: -.3em;
	width: 100%;
	height: 4px;
	background-image:
		linear-gradient(45deg, var(--gold) 25%, transparent 25%, transparent 75%, var(--gold) 75%),
		linear-gradient(45deg, var(--gold) 25%, transparent 25%, transparent 75%, var(--gold) 75%);
	background-size: 8px 8px;
	background-position: 0 0, 4px 4px;
	transform: scaleX(0);
	transform-origin: inline-start;
	transition: transform .85s var(--ease) .18s;
}
.ekhaa-head.is-in h2::after,
:root:not([data-ekhaa-anim="on"]) .ekhaa-head h2::after { transform: scaleX(1); }

/* ==========================================================================
   5. Stat cards: the number fills with gold as it counts
   ========================================================================== */

.stat { position: relative; padding-inline-start: 1.1rem; }
.stat::before {
	content: "";
	position: absolute;
	inset-inline-start: 0; top: .35rem; bottom: .35rem;
	width: 3px;
	background: linear-gradient(to bottom, var(--gold), transparent);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .7s var(--ease);
}
.stat.is-in::before,
:root:not([data-ekhaa-anim="on"]) .stat::before { transform: scaleY(1); }

/* ==========================================================================
   6. Cards gain a moving sheen on hover
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	.ekhaa-card::after {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: inherit;
		pointer-events: none;
		background: radial-gradient(
			18rem 18rem at var(--px, 50%) var(--py, 50%),
			rgba(220, 168, 89, .14),
			transparent 62%);
		opacity: 0;
		transition: opacity .3s var(--ease);
	}
	.ekhaa-card:hover::after { opacity: 1; }
}

/* ==========================================================================
   7. Journey: the line is drawn, the photographs rise
   ========================================================================== */

.journey__step { transition: transform .5s var(--ease); }

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	.journey__step:hover { transform: translateY(-6px); }
}

/* ==========================================================================
   8. Mobile
   ========================================================================== */

@media (max-width: 760px) {
	.ekhaa-hero { min-height: auto; }
	.ekhaa-hero h1 { font-size: clamp(2.5rem, 12vw, 3.6rem); max-width: 14ch; }
	.ekhaa-scroll { display: none; }
	.ekhaa-stage img { filter: saturate(.7) contrast(1.05) brightness(.34); }
}

/* ==========================================================================
   9. Listing pages
   ========================================================================== */

.ekhaa-person__photo {
	width: 112px; height: 112px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 1rem;
	border: 3px solid var(--cream);
	box-shadow: 0 0 0 1px var(--sand);
}
.ekhaa-person__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* A partner with no logo still needs to read as a tile, not a bare link. */
.ekhaa-partners a > span {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--ink);
	text-align: center;
	font-size: .95rem;
}

/* The document card's icon tile picks up the gold on hover. */
.ekhaa-card:hover .ekhaa-card__icon { background: var(--gold); color: var(--ink); }
.ekhaa-card__icon { transition: background-color .25s var(--ease), color .25s var(--ease); }
