/* EquiPal Studio: component styles. Colours, fonts and sizes come from theme.json presets. */

:root {
	--ep-cap: var(--wp--preset--color--black-cap);
	--ep-iron: var(--wp--preset--color--iron-grey);
	--ep-dapple: var(--wp--preset--color--dapple-grey);
	--ep-flea: var(--wp--preset--color--flea-bitten);
	--ep-white: var(--wp--preset--color--white-grey);
	--ep-heritage: var(--wp--preset--color--heritage-purple);
	--ep-silk: var(--wp--preset--color--royal-silk);
	--ep-sheen: var(--wp--preset--color--silk-sheen);
	--ep-rule: var(--wp--custom--rule, rgba(165, 161, 174, 0.16));
	--ep-display: var(--wp--preset--font-family--display);
	--ep-sans: var(--wp--preset--font-family--sans);
	--ep-gallop: var(--wp--custom--gait--gallop, 160ms);
	--ep-ease-gallop: var(--wp--custom--ease--gallop, cubic-bezier(.2, .8, .2, 1));
	--ep-header-h: 76px;
	--ep-shoe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 2.5C1.8 7.6 2.4 15 7 18.7c2.8 2.3 7.2 2.3 10 0C21.6 15 22.2 7.6 19.4 2.5h-3.3c2.2 4.5 1.8 9.8-1.4 12.2-1.5 1.2-3.9 1.2-5.4 0C6.1 12.3 5.7 7 7.9 2.5z'/%3E%3C/svg%3E");
	color-scheme: dark;
}

html { background: var(--ep-cap); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ep-silk); color: var(--ep-white); }
:focus-visible { outline: 2px solid var(--ep-sheen); outline-offset: 3px; }

h1, h2, h3 { text-wrap: balance; font-stretch: 108%; }
h1 em, h2 em, h3 em { font-weight: 500; color: var(--ep-sheen); }

/* Every block in a section starts on the same left edge of the 1280px column,
   including narrow headlines that WordPress would otherwise centre. */
.ep-section.is-layout-constrained > :not(.alignfull),
.ep-footer.is-layout-constrained > :not(.alignfull) {
	margin-left: max(0px, calc((100% - 1280px) / 2)) !important;
	margin-right: auto !important;
}

/* ---------- shared bits ---------- */
.ep-eyebrow {
	font-family: var(--ep-sans);
	font-stretch: 115%;
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ep-flea);
}
.ep-lead {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.5;
	color: var(--ep-flea);
	max-width: 44ch;
}
.ep-section {
	padding-block: clamp(5rem, 11vw, 9.5rem);
	border-top: 1px solid var(--ep-rule);
}
.ep-section__title { max-width: 17ch; margin-block-end: clamp(2.5rem, 5vw, 4.5rem) !important; }

/* Silks "hoops" strip, animated sideways on scroll */
hr.ep-hoops,
.wp-block-separator.ep-hoops {
	height: 14px;
	margin: 0 !important;
	border: 0;
	opacity: 1;
	background: repeating-linear-gradient(90deg, var(--ep-heritage) 0 28px, var(--ep-cap) 28px 56px);
	background-position: 0 0;
	max-width: none !important;
	width: 100%;
}

/* Buttons: gallop tempo */
.wp-element-button,
.wp-block-button__link {
	transition: background-color var(--ep-gallop) var(--ep-ease-gallop), color var(--ep-gallop) var(--ep-ease-gallop), box-shadow var(--ep-gallop) var(--ep-ease-gallop), transform var(--ep-gallop) var(--ep-ease-gallop);
	will-change: transform;
}
.wp-block-button__link:active { transform: scale(.96); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--ep-white);
	border: 0;
	box-shadow: inset 0 0 0 1px rgba(236, 234, 240, .35);
	padding: 1rem 1.625rem;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	box-shadow: inset 0 0 0 1px var(--ep-sheen);
	color: var(--ep-sheen);
}
.wp-block-buttons { gap: 0.75rem; }

/* ---------- header ---------- */
.ep-site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	transition:
		transform 420ms var(--wp--custom--ease--trot),
		background-color 420ms var(--wp--custom--ease--trot),
		box-shadow 420ms var(--wp--custom--ease--trot);
}
/* With JS on, the header floats over the hero so the silk can run up behind it. */
.ep-js .ep-site-header { position: fixed; left: 0; right: 0; }
.ep-js body:not(.home) .ep-main { padding-top: var(--ep-header-h); }
.admin-bar .ep-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ep-site-header { top: 46px; } }
.ep-site-header.is-scrolled {
	background: rgba(13, 11, 17, 0.72);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	backdrop-filter: blur(16px) saturate(150%);
	box-shadow: 0 1px 0 var(--ep-rule);
}
/* Leaving is quicker than arriving, and accelerates away. */
.ep-site-header.is-hidden {
	transform: translateY(-100%);
	transition-duration: 270ms;
	transition-timing-function: cubic-bezier(.55, 0, 1, .45);
}
.ep-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--ep-silk), var(--ep-sheen));
	opacity: 0;
	transition: opacity 420ms var(--wp--custom--ease--trot);
	pointer-events: none;
}
.is-scrolled .ep-progress { opacity: 1; }

.ep-header {
	min-height: var(--ep-header-h);
	padding-inline: clamp(1rem, 4vw, 3.5rem);
	gap: 1.5rem;
}
.ep-header__right { gap: clamp(1rem, 3vw, 2.5rem); }
.ep-header .wp-block-navigation { gap: clamp(1rem, 2.4vw, 2.25rem); }
.ep-header .wp-block-navigation__container { position: relative; }
.ep-header .wp-block-navigation a {
	color: var(--ep-flea);
	text-decoration: none;
	padding-block: 0.5rem;
}
.ep-header .wp-block-navigation__responsive-container-open,
.ep-header .wp-block-navigation__responsive-container-close { color: var(--ep-white); }

/* Link labels roll up to reveal a bright copy of themselves */
.ep-roll { display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.25; }
.ep-roll__in { display: block; position: relative; transition: transform 420ms var(--wp--custom--ease--trot); }
.ep-roll__in::after {
	content: attr(data-text);
	position: absolute;
	left: 0;
	top: 100%;
	color: var(--ep-white);
}
.ep-header a:hover .ep-roll__in,
.ep-header a:focus-visible .ep-roll__in { transform: translateY(-100%); }

/* Diamond marker under the hovered link or the section you're reading */
.ep-nav-dot {
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 5px;
	height: 5px;
	margin-left: -2.5px;
	background: var(--ep-sheen);
	box-shadow: 0 0 10px rgba(166, 133, 224, .8);
	opacity: 0;
	pointer-events: none;
}

.ep-header__cta .wp-block-button__link { padding: 0.85rem 1.25rem; font-size: 0.75rem; }
@media (max-width: 600px) { .ep-header .ep-header__cta { display: none !important; } }

/* Arrow on key buttons; nudges up-right on hover */
.ep-arrow .wp-block-button__link { display: inline-flex; align-items: center; gap: 0.65em; }
.ep-arrow .wp-block-button__link::after {
	content: "";
	width: 0.95em;
	height: 0.95em;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform var(--wp--custom--gait--trot) var(--wp--custom--ease--trot);
}
.ep-arrow .wp-block-button__link:hover::after { transform: translate(2px, -2px); }

/* Mobile menu overlay: panel fades in, links arrive at a canter */
.ep-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: clamp(1.25rem, 5vw, 2rem);
	animation: ep-menu-in 420ms var(--wp--custom--ease--trot) both;
}
.ep-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 4.5rem; }
.ep-header .is-menu-open .wp-block-navigation__container { gap: 1.25rem !important; align-items: flex-start !important; }
.ep-header .is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start !important; }
.ep-header .is-menu-open .wp-block-navigation-item a {
	font-size: clamp(2rem, 9vw, 2.75rem);
	font-weight: 600;
	font-stretch: 108%;
	letter-spacing: -0.03em;
	text-transform: none;
	color: var(--ep-white);
}
.ep-header .is-menu-open .wp-block-navigation-item { animation: ep-menu-item 520ms var(--wp--custom--ease--trot) both; }
.ep-header .is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 90ms; }
.ep-header .is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 180ms; }
.ep-header .is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 270ms; }
@keyframes ep-menu-in { from { opacity: 0; } }
@keyframes ep-menu-item { from { opacity: 0; transform: translateY(18px); } }

/* Wordmark */
.ep-wordmark { margin: 0; line-height: 1; white-space: nowrap; }
.ep-wordmark a {
	font-family: var(--ep-display);
	font-weight: 600;
	font-size: 1.5rem;
	letter-spacing: -0.03em;
	color: var(--ep-white);
	text-decoration: none;
	display: inline-flex;
	align-items: baseline;
	gap: 0.6rem;
}
.ep-wordmark span {
	font-family: var(--ep-sans);
	font-stretch: 125%;
	font-weight: 500;
	font-size: 0.6875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ep-flea);
}
.ep-wordmark--large a { font-size: clamp(3rem, 8vw, 6.5rem); gap: 1rem; }
.ep-wordmark--large span { font-size: clamp(0.625rem, 1.2vw, 0.875rem); }

/* ---------- hero ---------- */
.ep-hero {
	--ep-hero-gutter: max(clamp(1rem, 4vw, 3.5rem), calc((100% - 1280px) / 2));
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	min-height: max(680px, 100svh);
	padding: calc(var(--ep-header-h) + clamp(1.5rem, 5vh, 3.5rem)) var(--ep-hero-gutter) 0;
	margin: 0 !important;
}
.ep-hero > * { margin: 0 !important; }

/* Stage: a full-section particle horse when JS runs, a still silhouette otherwise */
.ep-hero__stage {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	background:
		radial-gradient(55% 60% at 64% 46%, rgba(101, 63, 166, .30), transparent 70%),
		radial-gradient(40% 35% at 70% 78%, rgba(166, 133, 224, .10), transparent 70%),
		var(--ep-cap);
}
.ep-hero__stage::before {
	/* scrim keeps the headline crisp over the horse */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(13, 11, 17, .94) 0%, rgba(13, 11, 17, .78) 30%, rgba(13, 11, 17, .25) 52%, rgba(13, 11, 17, 0) 66%),
		linear-gradient(0deg, rgba(13, 11, 17, .96) 0%, rgba(13, 11, 17, 0) 24%),
		linear-gradient(180deg, rgba(13, 11, 17, .55) 0%, rgba(13, 11, 17, 0) 18%);
}
.ep-hero__video {
	position: absolute;
	top: -3%;
	left: -3%;
	width: 106%;
	height: 106%;
	z-index: 0;
	object-fit: cover;
	object-position: 68% 50%;
	will-change: transform;
}
.ep-herd { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; }
.ep-hero__still {
	position: absolute;
	z-index: 1;
	right: 4%;
	top: 50%;
	width: min(62%, 900px);
	transform: translateY(-55%);
	color: var(--ep-silk);
	opacity: .55;
	filter: drop-shadow(0 0 40px rgba(166, 133, 224, .35));
}
.ep-hero__stage.is-live .ep-hero__still { display: none; }

.ep-hero__content {
	grid-column: 1;
	grid-row: 1;
	align-self: center;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-block: clamp(1.5rem, 4vh, 3rem);
}
.ep-hero__content > * { margin: 0 !important; }
.ep-hero__eyebrow { display: inline-flex; align-items: center; gap: 0.9rem; }
.ep-hero__eyebrow::before {
	content: "";
	width: 2.25rem;
	height: 1px;
	background: var(--ep-sheen);
}
.ep-hero__title {
	font-size: clamp(3rem, 6.6vw, 6.25rem) !important;
	line-height: 0.95 !important;
	letter-spacing: -0.045em;
	margin-block: clamp(1.25rem, 3vh, 2rem) clamp(1.5rem, 4vh, 2.5rem) !important;
	padding-bottom: 0.06em;
}
.ep-hero__title .ep-char { will-change: transform; }
.ep-hero__title em {
	background: linear-gradient(100deg, var(--ep-sheen) 0%, var(--ep-sheen) 42%, #E8DDFB 50%, var(--ep-sheen) 58%, var(--ep-sheen) 100%);
	background-size: 260% 100%;
	background-position: 0% 0;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	padding-right: 0.06em;
}
/* Gradient-clipped text can't hold animated letters, so the accent is flat purple during the intro. */
.ep-hero__title.is-splitting em {
	background: none;
	-webkit-background-clip: border-box;
	background-clip: border-box;
	color: var(--ep-sheen);
}
.ep-hero__title.is-sheen em { animation: ep-sheen 2.4s var(--wp--custom--ease--walk) 1 both; }
@keyframes ep-sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.ep-hero__lead { max-width: 40ch; }
.ep-hero__actions { margin-block-start: clamp(1.75rem, 4vh, 2.5rem) !important; }

.ep-hero__bar {
	grid-column: 1 / -1;
	grid-row: 2;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	padding-block: 1.4rem;
	border-top: 1px solid var(--ep-rule);
	font-size: var(--wp--preset--font-size--small);
	color: var(--ep-flea);
}
.ep-hero__proof { margin: 0; justify-self: end; }
.ep-hero__proof strong { color: var(--ep-white); font-weight: 600; margin-right: 0.35em; }

/* Pace readout: gait name + four legs lighting in footfall order */
.ep-gait { display: inline-flex; align-items: center; gap: 0.85rem; }
.ep-gait__label,
.ep-scrollcue span {
	font-stretch: 115%;
	font-weight: 600;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.ep-gait__name {
	position: relative;
	display: inline-block;
	min-width: 4.6em;
	height: 1.3em;
	overflow: hidden;
	color: var(--ep-white);
	font-weight: 600;
}
.ep-gait__word { position: absolute; left: 0; top: 0; line-height: 1.3; }
.ep-gait__legs { display: inline-grid; grid-template-columns: repeat(4, 7px); gap: 5px; }
.ep-gait__legs i {
	width: 7px;
	height: 7px;
	transform: rotate(45deg) scale(.8);
	background: var(--ep-dapple);
	transition: background-color 380ms ease-out, box-shadow 380ms ease-out, transform 380ms ease-out;
}
.ep-gait__legs i.is-lit {
	background: var(--ep-sheen);
	box-shadow: 0 0 10px rgba(166, 133, 224, .9);
	transform: rotate(45deg) scale(1.1);
	transition: none;
}

.ep-scrollcue {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	color: var(--ep-flea);
	text-decoration: none;
}
.ep-scrollcue:hover { color: var(--ep-white); }
.ep-scrollcue i {
	position: relative;
	width: 1px;
	height: 2.25rem;
	overflow: hidden;
	background: var(--ep-rule);
}
.ep-scrollcue i::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 40%;
	background: var(--ep-sheen);
	animation: ep-cue 1.8s var(--wp--custom--ease--walk) infinite;
}
@keyframes ep-cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

@media (max-width: 900px) {
	/* extra height so the horse band above the text never touches it */
	.ep-hero { grid-template-columns: 1fr; min-height: max(720px, calc(100svh + 56px)); }
	.ep-hero__stage::before {
		background: linear-gradient(0deg, rgba(13, 11, 17, .96) 0%, rgba(13, 11, 17, .7) 50%, rgba(13, 11, 17, 0) 64%);
	}
	.ep-hero__video {
		top: 64px; left: 0; width: 100%; height: 56%; object-position: 80% 40%;
		-webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
		mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
	}
	.ep-hero__content { align-self: end; padding-block: 2rem 2.5rem; }
	.ep-hero__bar { grid-template-columns: 1fr auto; }
	.ep-scrollcue { display: none; }
}
@media (max-width: 480px) {
	.ep-hero__bar { grid-template-columns: 1fr; gap: 0.5rem; }
	.ep-hero__proof { justify-self: start; }
	.ep-hero__actions .wp-block-button { width: auto; }
}

/* ---------- statement ---------- */
.ep-statement__text {
	font-size: clamp(2.125rem, 5.4vw, 4.75rem) !important;
	line-height: 1.08 !important;
	max-width: 22ch;
	margin-block-start: 1.75rem !important;
}
.ep-statement__text .ep-word { display: inline-block; }

/* ---------- services ---------- */
.ep-services { border-top: 1px solid var(--ep-rule); }
.ep-services > .ep-service { margin: 0; }
.ep-service {
	position: relative;
	display: grid;
	grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.9fr);
	gap: 0.75rem clamp(1.25rem, 3.4vw, 3.5rem);
	align-items: baseline;
	padding-block: clamp(1.75rem, 3.4vw, 2.75rem);
	border-bottom: 1px solid var(--ep-rule);
	isolation: isolate;
}
.ep-service > * { margin: 0 !important; }
.ep-service::before {
	content: "";
	position: absolute;
	inset: 0 calc(-1 * clamp(1rem, 2vw, 1.5rem));
	z-index: -1;
	background: linear-gradient(90deg, rgba(61, 40, 98, .55), rgba(61, 40, 98, 0));
	opacity: 0;
	transform: scaleX(0.96);
	transform-origin: left center;
	transition: opacity 420ms var(--wp--custom--ease--trot), transform 420ms var(--wp--custom--ease--trot);
	border-radius: 4px;
}
.ep-service h3 {
	font-size: var(--wp--preset--font-size--heading-3);
	transition: transform var(--wp--custom--gait--trot) var(--wp--custom--ease--trot), color var(--ep-gallop) var(--ep-ease-gallop);
}
.ep-service p { color: var(--ep-flea); max-width: 46ch; }
.ep-service .ep-service__tags {
	font-size: 0.75rem;
	font-stretch: 115%;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ep-flea);
	justify-self: end;
	text-align: right;
}
@media (hover: hover) {
	.ep-service:hover::before { opacity: 1; transform: none; }
	.ep-service:hover h3 { transform: translateX(0.5rem); color: var(--ep-sheen); }
}
@media (max-width: 900px) {
	.ep-service { grid-template-columns: 1fr; }
	.ep-service .ep-service__tags { justify-self: start; text-align: left; }
}

/* ---------- testimonials: video stories ---------- */
.ep-stories {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	align-items: stretch;
}
.ep-story { min-width: 0; }
.ep-story__open {
	position: relative;
	display: block;
	aspect-ratio: 460 / 720;
	max-width: 100%;
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--ep-iron);
	background-size: cover;
	background-position: center;
	color: var(--ep-white);
	text-decoration: none;
	isolation: isolate;
	box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9);
}
.ep-story__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.02);
	transition: transform 800ms var(--wp--custom--ease--walk), filter 420ms var(--wp--custom--ease--trot);
	filter: saturate(.85);
}
.ep-story__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(13, 11, 17, .55) 0%, rgba(13, 11, 17, 0) 22%),
		linear-gradient(0deg, rgba(13, 11, 17, .96) 0%, rgba(13, 11, 17, .7) 30%, rgba(13, 11, 17, 0) 58%);
	transition: background-color 420ms var(--wp--custom--ease--trot);
}
.ep-story__time {
	position: absolute;
	top: 1rem;
	right: 1rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: rgba(13, 11, 17, .6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: 0.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.ep-story__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4.25rem;
	height: 4.25rem;
	margin: -2.125rem 0 0 -2.125rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(101, 63, 166, .85);
	box-shadow: 0 0 0 0 rgba(166, 133, 224, .5);
	transition: transform 420ms var(--wp--custom--ease--trot), background-color 160ms var(--ep-ease-gallop);
}
.ep-story__play svg { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; }
.ep-motion-ready .ep-story__play { animation: ep-pulse 2.4s var(--wp--custom--ease--walk) infinite; }
@keyframes ep-pulse { 0% { box-shadow: 0 0 0 0 rgba(166, 133, 224, .45); } 70%, 100% { box-shadow: 0 0 0 18px rgba(166, 133, 224, 0); } }
.ep-story__meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	gap: 0.35rem;
	padding: 1.5rem;
}
.ep-story__logo { display: block; margin-bottom: 0.4rem; }
.ep-story__logo .ep-logo { max-height: 2.75rem; }
.ep-story__logo .ep-logo img { max-height: 2.75rem; width: auto; }
.ep-story__person { font-size: 1.25rem; font-weight: 600; font-stretch: 105%; letter-spacing: -0.02em; }
.ep-story__person span { font-weight: 500; color: var(--ep-flea); }
.ep-story__work { font-size: var(--wp--preset--font-size--small); color: var(--ep-flea); line-height: 1.45; }
@media (hover: hover) {
	.ep-story__open:hover .ep-story__preview { transform: scale(1.07); filter: saturate(1); }
	.ep-story__open:hover .ep-story__play { transform: scale(1.1); background: var(--ep-silk); }
}
.ep-story__open:focus-visible { outline: 2px solid var(--ep-sheen); outline-offset: 4px; }

/* Written quote card, same height as the videos */
.ep-story--quote { display: flex; }
.ep-story__quote {
	margin: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 2rem;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border-radius: 10px;
	background:
		radial-gradient(80% 60% at 100% 0%, rgba(101, 63, 166, .3), transparent 70%),
		var(--ep-iron);
}
.ep-story__quote .ep-icon--rosette { width: 2.75rem; height: 2.75rem; color: var(--ep-sheen); overflow: visible; }
.ep-story__quote blockquote { margin: 0; }
.ep-story__quote blockquote p {
	margin: 0;
	font-size: clamp(1.25rem, 1.9vw, 1.625rem);
	font-weight: 500;
	font-stretch: 105%;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--ep-white);
}
.ep-story__quote figcaption {
	font-size: 0.75rem;
	font-stretch: 115%;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ep-flea);
}
.ep-story__quote figcaption::before { content: ""; display: inline-block; width: 1.75rem; height: 1px; background: var(--ep-silk); vertical-align: middle; margin-right: 0.75rem; }
.ep-story__quote .ep-icon__tail--l,
.ep-story__quote .ep-icon__tail--r { animation: ep-sway 2.4s ease-in-out infinite alternate; }

@media (max-width: 900px) {
	.ep-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ep-story--quote { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.ep-stories { grid-template-columns: 1fr; }
	.ep-story__open { aspect-ratio: 4 / 5; }
}

/* Player (sits inside a constrained section, so undo the column alignment margins) */
.ep-section.is-layout-constrained > dialog.ep-player,
.ep-player {
	margin: auto !important;
	inset: 0;
	width: min(92vw, 520px);
	max-width: none !important;
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ep-white);
	overflow: visible;
}
.ep-player::backdrop { background: rgba(9, 8, 12, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ep-player__frame { position: relative; display: grid; gap: 0.9rem; }
.ep-player__video {
	width: 100%;
	max-height: calc(92vh - 4rem);
	aspect-ratio: 460 / 720;
	object-fit: contain;
	border-radius: 10px;
	background: #000;
}
.ep-player__title { margin: 0; font-weight: 600; font-size: 1rem; }
.ep-player__close {
	position: absolute;
	top: -0.75rem;
	right: -0.75rem;
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--ep-white);
	color: var(--ep-cap);
	cursor: pointer;
	transition: transform 160ms var(--ep-ease-gallop);
}
.ep-player__close svg { width: 1.25rem; height: 1.25rem; }
.ep-player__close:hover { transform: rotate(90deg); }
.ep-player-open { overflow: hidden; }

/* ---------- CTA ---------- */
.ep-cta {
	background:
		radial-gradient(60% 80% at 85% 100%, rgba(101, 63, 166, .28), transparent 70%),
		var(--ep-cap);
}
.ep-cta__title { font-size: var(--wp--preset--font-size--heading-1) !important; max-width: 12ch; margin-block: 1.5rem 1.75rem !important; }
.ep-cta .wp-block-buttons { margin-block-start: 2.5rem !important; }

/* ---------- footer ---------- */
.ep-footer { padding-block: clamp(4rem, 8vw, 6.5rem) 2.5rem; }
.ep-footer__tagline { font-family: var(--ep-display); font-size: 1.5rem; margin-block-start: 1rem !important; }
.ep-footer__tagline em { color: var(--ep-sheen); }
.ep-footer__links { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: flex-end; }
.ep-footer__links a {
	color: var(--ep-white);
	text-decoration: none;
	font-size: 0.8125rem;
	font-stretch: 115%;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: linear-gradient(var(--ep-sheen), var(--ep-sheen)) 0 100% / 0 1px no-repeat;
	padding-bottom: 4px;
	transition: background-size var(--wp--custom--gait--trot) var(--wp--custom--ease--trot), color var(--ep-gallop);
}
.ep-footer__links a:hover { background-size: 100% 1px; color: var(--ep-sheen); }
.ep-footer__meta { margin-block-start: clamp(3rem, 6vw, 5rem) !important; padding-top: 1.5rem; border-top: 1px solid var(--ep-rule); font-size: var(--wp--preset--font-size--small); color: var(--ep-flea); }
@media (max-width: 781px) { .ep-footer__links { justify-content: flex-start; } }

/* ---------- journal ---------- */
.ep-journal .wp-block-post-template > li { border-top: 1px solid var(--ep-rule); padding-block: 2rem; }
.ep-journal .wp-block-post-title a { color: var(--ep-white); text-decoration: none; }
.ep-journal .wp-block-post-title a:hover { color: var(--ep-sheen); }

/* ---------- clients: featured client + logo row ---------- */
/* One-colour logos; original colours return on a light tile */
.ep-logo {
	position: relative;
	display: block;
	max-width: 100%;
	transition: transform 420ms var(--wp--custom--ease--trot);
}
.ep-logo img { display: block; width: 100%; height: auto; transition: opacity 420ms var(--wp--custom--ease--trot); }
/* Logos never outgrow their cell (inline widths are optical targets, not minimums) */
.ep-logo-grid__cell { grid-template-columns: minmax(0, 1fr); justify-items: center; min-width: 0; }
.ep-logo-grid__cell .ep-logo { max-width: 100%; }
.ep-logo__mono { opacity: .9; }
.ep-logo__color { position: absolute; inset: 0; opacity: 0; }
.ep-logo-grid { list-style: none; margin: 0; padding: 0; }

/* Logo tiles */
.ep-logo-grid { display: grid; gap: 0.75rem; }
.ep-logo-grid__cell {
	display: grid;
	place-items: center;
	min-height: 110px;
	padding: 1rem;
	border-radius: 6px;
	background: var(--ep-iron);
	transition: background 420ms var(--wp--custom--ease--trot);
}
@media (hover: hover) {
	.ep-logo-grid__cell:hover { background: var(--ep-white); }
	.ep-logo-grid__cell:hover .ep-logo__color { opacity: 1; }
	.ep-logo-grid__cell:hover .ep-logo__mono { opacity: 0; }
}
.ep-logo-grid--row { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ep-logo-grid--row .ep-logo-grid__cell { background: transparent; min-height: 90px; padding: 0.5rem; }
@media (max-width: 1024px) { .ep-logo-grid--row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Featured client card */
.ep-featured__card {
	position: relative;
	padding: clamp(2rem, 5vw, 4rem);
	border-radius: 8px;
	background:
		radial-gradient(70% 90% at 100% 0%, rgba(101, 63, 166, .35), transparent 70%),
		var(--ep-iron);
	overflow: hidden;
}
.ep-featured__card > * { margin: 0 !important; }
.ep-featured__card .ep-icon--rosette { width: 3rem; height: 3rem; color: var(--ep-sheen); margin-bottom: 1.25rem !important; overflow: visible; }
.ep-featured__quote { margin-top: 1rem !important; }
.ep-featured__quote p {
	font-size: clamp(1.75rem, 3.6vw, 3rem);
	font-weight: 600;
	font-stretch: 105%;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--ep-white);
	max-width: 26ch;
	text-wrap: balance;
}
.ep-featured__quote p em { color: var(--ep-sheen); font-style: normal; }
.ep-featured__quote cite {
	display: block;
	margin-top: 1.5rem;
	font-style: normal;
	font-size: 0.8125rem;
	font-stretch: 115%;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ep-flea);
}
.ep-featured__label { margin-top: clamp(2.5rem, 5vw, 4rem) !important; margin-bottom: 0.5rem !important; }

/* ---------- horse graphics ---------- */
.ep-horse { display: block; fill: currentColor; overflow: visible; }
.ep-icon * { transform-box: view-box; }

/* Header: a small horse gallops along the scroll-progress line */
.ep-progress-rider {
	position: absolute;
	left: 0;
	bottom: 1px;
	width: 40px;
	height: 25px;
	color: var(--ep-sheen);
	opacity: 0;
	pointer-events: none;
	will-change: transform;
	transition: opacity 420ms var(--wp--custom--ease--trot);
}
.ep-progress-rider svg { width: 100%; height: 100%; transition: transform 270ms var(--wp--custom--ease--trot); }
.ep-progress-rider.is-reversed svg { transform: scaleX(-1); }
.is-scrolled .ep-progress-rider { opacity: 1; }
@media (max-width: 600px) { .ep-progress-rider { width: 30px; height: 19px; } }

/* Statement: a chronophotograph gallops behind the sentence */
.ep-statement {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	/* the horses gallop in their own band below the sentence */
	padding-bottom: calc(min(34vw, 470px) * 0.62 + clamp(3rem, 6vw, 5rem)) !important;
}
.ep-section.is-layout-constrained > .ep-chrono,
.ep-chrono {
	position: absolute !important;
	inset: 0;
	z-index: -1;
	margin: 0 !important;
	max-width: none !important;
	pointer-events: none;
}
.ep-chrono__horse {
	position: absolute;
	bottom: clamp(1.5rem, 4vw, 3.5rem);
	left: 0;
	width: min(34vw, 470px);
	height: auto;
	color: var(--ep-heritage);
	will-change: transform;
}
/* Still exposure sequence when there's no motion */
.ep-chrono__horse:nth-child(1) { left: 2%; opacity: .22; }
.ep-chrono__horse:nth-child(2) { left: 14%; opacity: .3; }
.ep-chrono__horse:nth-child(3) { left: 26%; opacity: .42; }
.ep-chrono__horse:nth-child(4) { left: 38%; opacity: .6; }
.ep-chrono__horse:nth-child(5) { left: 50%; opacity: .9; }
.ep-chrono.is-live .ep-chrono__horse { left: 0; }

/* Services icons */
.ep-service .ep-icon { width: 2.75rem; height: 2.75rem; color: var(--ep-sheen); align-self: center; overflow: visible; }
.ep-icon--horseshoe { transition: transform var(--wp--custom--gait--trot) var(--wp--custom--ease--trot); transform-origin: 50% 20%; }
.ep-icon__arc { stroke-dasharray: 2 5; opacity: 0; transition: opacity var(--wp--custom--gait--trot) var(--wp--custom--ease--trot); }
.ep-icon__heat { opacity: 0; transform: translateY(4px); transition: opacity var(--wp--custom--gait--trot), transform var(--wp--custom--gait--walk) var(--wp--custom--ease--walk); }
.ep-icon--branding-iron { transition: transform var(--ep-gallop) var(--ep-ease-gallop); }
@media (hover: hover) {
	.ep-service:hover .ep-icon--horseshoe { transform: rotate(-14deg); }
	.ep-service:hover .ep-icon__tail--l,
	.ep-service:hover .ep-icon__tail--r { animation: ep-sway 900ms ease-in-out infinite alternate; }
	.ep-service:hover .ep-icon__arc { opacity: 1; animation: ep-march 900ms linear infinite; }
	.ep-service:hover .ep-icon--branding-iron { transform: translate(-2px, 2px); }
	.ep-service:hover .ep-icon__heat { opacity: .8; transform: none; }
}
.ep-icon__tail--l { transform-origin: 32px 42px; }
.ep-icon__tail--r { transform-origin: 32px 42px; animation-direction: alternate-reverse !important; }
@keyframes ep-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes ep-march { to { stroke-dashoffset: -14; } }

/* Testimonials: a rosette for each client */
.ep-quotes .wp-block-column > * { margin-block: 0; }
.ep-quotes .ep-icon--rosette { width: 2.75rem; height: 2.75rem; color: var(--ep-sheen); margin-bottom: 1.5rem; overflow: visible; }
.ep-quotes .ep-icon__tail--l,
.ep-quotes .ep-icon__tail--r { animation: ep-sway 2.4s ease-in-out infinite alternate; }

/* Call to action: hoofprints lead to the button */
.ep-cta { position: relative; overflow: hidden; isolation: isolate; }
.ep-section.is-layout-constrained > .ep-cta__trail,
.ep-cta__trail {
	position: absolute !important;
	right: 0;
	bottom: clamp(1rem, 5vw, 4rem);
	width: min(64%, 980px);
	margin: 0 !important;
	max-width: none !important;
	z-index: -1;
	color: var(--ep-silk);
	opacity: .75;
	pointer-events: none;
}
.ep-hoofprints { display: block; width: 100%; height: auto; overflow: visible; }
@media (max-width: 781px) { .ep-cta__trail { width: 100%; opacity: .45; bottom: 0; } }

/* Footer: the horse gallops on the spot while the hoops roll beneath */
.ep-treadmill { position: relative; height: clamp(62px, 6.4vw, 88px); overflow: hidden; }
.ep-treadmill__track {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 14px;
	background: repeating-linear-gradient(90deg, var(--ep-heritage) 0 28px, var(--ep-cap) 28px 56px);
}
.ep-treadmill__horse {
	position: absolute;
	bottom: 13px;
	left: 64%;
	height: clamp(46px, 5.2vw, 72px);
	width: auto;
	aspect-ratio: 561 / 348;
	color: var(--ep-sheen);
}

/* ---------- motion starting states (only when the motion script is allowed to run) ---------- */
.ep-motion .is-style-ep-split,
.ep-motion .ep-header > *,
.ep-motion .ep-hero__stage,
.ep-motion .ep-hero__eyebrow,
.ep-motion .ep-hero__title,
.ep-motion .ep-hero__lead,
.ep-motion .ep-hero__actions,
.ep-motion .ep-hero__bar,
.ep-motion .is-style-ep-walk,
.ep-motion .is-style-ep-canter > *,
.ep-motion .wp-block-columns.is-style-ep-canter > .wp-block-column,
.ep-motion .wp-block-post-template.is-style-ep-canter > li { opacity: 0; }
.ep-line-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
