/* EquiPal Studio: services section (bento grid with live demos). */

/* Shared pieces */
.ep-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ep-chips li {
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--ep-rule);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--ep-flea);
	white-space: nowrap;
}
.ep-chips--small li { font-size: 0.6875rem; padding: 0.2rem 0.55rem; }
.ep-svc-section .ep-icon { overflow: visible; }

/* =========================================================
   Bento with live demos
   ========================================================= */
.ep-svc3 {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: minmax(0, auto);
	gap: 1rem;
}
.ep-svc3__tile {
	--mx: 50%;
	--my: 50%;
	position: relative;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 1.25rem;
	padding: clamp(1.25rem, 2.4vw, 2rem);
	border-radius: 14px;
	background: var(--ep-iron);
	box-shadow: inset 0 0 0 1px var(--ep-rule);
	overflow: hidden;
	isolation: isolate;
	transform-style: preserve-3d;
	will-change: transform;
}
.ep-svc3__tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(360px circle at var(--mx) var(--my), rgba(166, 133, 224, .22), transparent 60%);
	opacity: 0;
	transition: opacity 420ms var(--wp--custom--ease--trot);
}
.ep-svc3__tile:hover::before { opacity: 1; }
.ep-svc3__tile--websites { grid-column: span 4; }
.ep-svc3__tile--social { grid-column: span 2; grid-row: span 2; }
.ep-svc3__tile--advertising { grid-column: span 2; }
.ep-svc3__tile--brand { grid-column: span 2; }
.ep-svc3__demo {
	position: relative;
	min-height: 200px;
	border-radius: 10px;
	background: linear-gradient(180deg, rgba(13, 11, 17, .6), rgba(13, 11, 17, .2));
	overflow: hidden;
	display: grid;
	place-items: center;
}
.ep-svc3__tile--social .ep-svc3__demo { min-height: 420px; }
.ep-svc3__title { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 2.2vw, 2rem) !important; }
.ep-svc3__desc { margin: 0 0 0.9rem; color: var(--ep-flea); font-size: var(--wp--preset--font-size--small); max-width: 46ch; }
.ep-svc3 [class*="demo"] { animation-play-state: paused !important; }
.ep-svc3 .is-inview [class*="demo"] { animation-play-state: running !important; }

/* Websites demo: a page scrolls in a browser while a cursor clicks "Book now" */
.demo-browser { position: relative; width: min(92%, 520px); height: 210px; border-radius: 8px; background: #16131B; box-shadow: 0 20px 40px -24px #000, inset 0 0 0 1px var(--ep-rule); overflow: hidden; }
.demo-browser__bar { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-bottom: 1px solid var(--ep-rule); }
.demo-browser__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--ep-dapple); }
.demo-browser__bar b { margin-left: 10px; height: 8px; width: 40%; border-radius: 4px; background: rgba(165, 161, 174, .15); }
.demo-browser__page { position: absolute; inset: 24px 0 0; overflow: hidden; }
.demo-browser__scroll { padding: 12px; display: grid; gap: 10px; animation: demo-scroll 7s var(--wp--custom--ease--walk) infinite alternate; }
@keyframes demo-scroll { 0%, 18% { transform: translateY(0); } 82%, 100% { transform: translateY(-190px); } }
.demo-hero { position: relative; height: 110px; border-radius: 6px; background: linear-gradient(135deg, var(--ep-heritage), #1E1530); overflow: hidden; }
.demo-hero__horse { position: absolute; right: 6%; bottom: 8px; width: 42%; color: rgba(166, 133, 224, .75); }
.demo-hero span { position: absolute; left: 12px; height: 8px; border-radius: 4px; background: rgba(236, 234, 240, .8); }
.demo-hero span:nth-of-type(1) { top: 22px; width: 38%; }
.demo-hero span:nth-of-type(2) { top: 38px; width: 26%; background: rgba(166, 133, 224, .8); }
.demo-hero em { position: absolute; left: 12px; bottom: 16px; font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--ep-silk); color: var(--ep-white); animation: demo-press 7s ease-in-out infinite; }
@keyframes demo-press { 0%, 8% { transform: scale(1); } 11% { transform: scale(.88); box-shadow: 0 0 0 6px rgba(166, 133, 224, .35); } 16%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(166, 133, 224, 0); } }
.demo-lines { display: grid; gap: 6px; }
.demo-lines span { height: 6px; border-radius: 3px; background: rgba(165, 161, 174, .22); }
.demo-lines span:nth-child(2) { width: 82%; }
.demo-lines span:nth-child(3) { width: 64%; }
.demo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-cards span { height: 58px; border-radius: 6px; background: rgba(101, 63, 166, .28); }
.demo-browser__cursor { position: absolute; left: 60%; top: 70%; width: 14px; height: 14px; border-radius: 50%; background: var(--ep-white); box-shadow: 0 0 0 4px rgba(236, 234, 240, .25); animation: demo-cursor 7s var(--wp--custom--ease--walk) infinite; }
@keyframes demo-cursor { 0% { transform: translate(0, 0); } 9%, 12% { transform: translate(-200px, -30px) scale(.8); } 30% { transform: translate(-40px, 10px); } 100% { transform: translate(0, 0); } }

/* Social demo: a feed scrolls and hearts pop */
.demo-phone { position: relative; width: 190px; height: 380px; border-radius: 28px; padding: 12px; background: #16131B; box-shadow: inset 0 0 0 1px var(--ep-rule), 0 30px 60px -30px #000; overflow: hidden; }
.demo-phone__feed { display: grid; gap: 10px; animation: demo-feed 8s linear infinite; }
@keyframes demo-feed { to { transform: translateY(-50%); } }
.demo-post { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(165, 161, 174, .06); }
.demo-post__head { display: flex; align-items: center; gap: 6px; }
.demo-post__head i { width: 16px; height: 16px; border-radius: 50%; background: var(--ep-silk); }
.demo-post__head b { height: 6px; width: 50%; border-radius: 3px; background: rgba(165, 161, 174, .3); }
.demo-post__img { height: 110px; border-radius: 8px; }
.demo-post__img--a { background: repeating-linear-gradient(180deg, var(--ep-heritage) 0 14px, #1E1530 14px 28px); }
.demo-post__img--b { background: radial-gradient(circle at 30% 30%, var(--ep-sheen), var(--ep-silk) 40%, var(--ep-heritage)); }
.demo-post__foot { display: flex; align-items: center; gap: 6px; }
.demo-post__foot svg { width: 14px; height: 14px; fill: var(--ep-sheen); }
.demo-post__foot b { height: 5px; width: 34%; border-radius: 3px; background: rgba(165, 161, 174, .25); }
.demo-phone__heart { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; animation: demo-heart 2.6s var(--wp--custom--ease--trot) infinite; }
.demo-phone__heart svg { width: 100%; height: 100%; fill: var(--ep-white); filter: drop-shadow(0 6px 16px rgba(101, 63, 166, .8)); }
@keyframes demo-heart { 0%, 55% { transform: scale(0); opacity: 0; } 65% { transform: scale(1.15); opacity: 1; } 75% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1) translateY(-40px); opacity: 0; } }

/* Advertising demo: bars rise, a line draws, the audience lights up */
.demo-ads { width: min(92%, 360px); display: grid; gap: 16px; padding: 16px 0; }
.demo-ads__chart { width: 100%; height: auto; overflow: visible; }
.demo-ads__grid { stroke: rgba(165, 161, 174, .15); stroke-width: 1; fill: none; }
.demo-ads__bar { fill: rgba(101, 63, 166, .55); transform-box: fill-box; transform-origin: 50% 100%; animation: demo-bar 5s var(--wp--custom--ease--trot) infinite; }
.demo-ads__bar:nth-of-type(2) { animation-delay: .09s; } .demo-ads__bar:nth-of-type(3) { animation-delay: .18s; } .demo-ads__bar:nth-of-type(4) { animation-delay: .27s; } .demo-ads__bar:nth-of-type(5) { animation-delay: .36s; } .demo-ads__bar:nth-of-type(6) { animation-delay: .45s; }
@keyframes demo-bar { 0% { transform: scaleY(0); } 25%, 80% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.demo-ads__line { fill: none; stroke: var(--ep-sheen); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 320; animation: demo-line 5s var(--wp--custom--ease--walk) infinite; }
@keyframes demo-line { 0%, 10% { stroke-dashoffset: 320; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -320; } }
.demo-ads__audience { display: grid; grid-template-columns: repeat(7, 12px); gap: 8px; justify-content: center; }
.demo-ads__audience i { aspect-ratio: 1; border-radius: 50%; background: rgba(165, 161, 174, .18); animation: demo-target 5s ease-in-out infinite; }
.demo-ads__audience i:nth-child(3n+1) { animation-delay: .4s; } .demo-ads__audience i:nth-child(4n+2) { animation-delay: 1.1s; } .demo-ads__audience i:nth-child(5n) { animation-delay: 1.7s; }
.demo-ads__audience i:nth-child(2n) { animation-name: none; }
@keyframes demo-target { 0%, 30% { background: rgba(165, 161, 174, .18); box-shadow: none; } 45%, 80% { background: var(--ep-sheen); box-shadow: 0 0 10px rgba(166, 133, 224, .8); } 100% { background: rgba(165, 161, 174, .18); } }

/* Brand demo: the iron stamps an E that glows, then cools */
.demo-brand { position: relative; width: 100%; height: 220px; display: grid; place-items: center; }
.demo-brand__patch { width: 120px; height: 120px; border-radius: 14px; background: radial-gradient(circle at 40% 35%, #3A3244, #231E2B); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); display: grid; place-items: center; }
.demo-brand__patch svg { width: 80px; height: 80px; }
.demo-brand__mark { fill: none; stroke: var(--ep-sheen); stroke-width: 6; stroke-linecap: round; opacity: 0; animation: demo-mark 4s ease-out infinite; }
@keyframes demo-mark { 0%, 38% { opacity: 0; stroke: #FFE9D6; filter: none; } 42% { opacity: 1; stroke: #FFF3E8; filter: drop-shadow(0 0 8px rgba(255, 200, 150, .9)); } 70% { opacity: 1; stroke: var(--ep-sheen); filter: drop-shadow(0 0 6px rgba(166, 133, 224, .7)); } 92%, 100% { opacity: 0; } }
.demo-brand__iron { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -150px 0 0 -10px; color: var(--ep-white); animation: demo-iron 4s var(--wp--custom--ease--trot) infinite; }
.demo-brand__iron .ep-icon { width: 100%; height: 100%; }
@keyframes demo-iron { 0%, 12% { transform: translate(40px, -40px); opacity: 0; } 25% { opacity: 1; } 38% { transform: translate(-6px, 48px); } 44% { transform: translate(-4px, 44px); } 60%, 100% { transform: translate(40px, -40px); opacity: 0; } }

@media (max-width: 1024px) {
	.ep-svc3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ep-svc3__tile--websites { grid-column: span 2; }
	.ep-svc3__tile--social { grid-column: span 1; grid-row: span 2; }
	.ep-svc3__tile--advertising, .ep-svc3__tile--brand { grid-column: span 1; }
}
@media (max-width: 640px) {
	.ep-svc3 { grid-template-columns: 1fr; }
	.ep-svc3__tile, .ep-svc3__tile--websites, .ep-svc3__tile--social, .ep-svc3__tile--advertising, .ep-svc3__tile--brand { grid-column: auto; grid-row: auto; }
	.ep-svc3__tile--social .ep-svc3__demo { min-height: 400px; }
}

@media (prefers-reduced-motion: reduce) {
	.ep-svc3 [class*="demo"] { animation: none !important; }
}
