/* ============================================================
   Markital homepage effects. Front page only.
   Every colour is an existing token. Nothing here redefines --ink, --bg,
   --line, --muted, --accent or --ease on a class: that shadows the token for
   everything outside the element and breaks the day/night switch.
   ============================================================ */

/* ============================================================
   1. Hero parallax
   --px / --py are set by home-fx.js in the range -1..1.
   ============================================================ */
.hero.has-parallax .hero__art {
	--px: 0;
	--py: 0;
}

.hero.has-parallax .hero__aurora {
	transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) scale(1.03);
	transition: transform .5s cubic-bezier(.22, .8, .24, 1);
	will-change: transform;
}

.hero.has-parallax .shot {
	transition: transform .5s cubic-bezier(.22, .8, .24, 1), box-shadow .5s var(--ease);
	will-change: transform;
}

/* the two cards sit at different depths, so they separate as you move */
.hero.has-parallax .shot--ad {
	transform: translate3d(calc(var(--px) * 16px), calc(var(--py) * 12px), 0)
		rotate(calc(var(--px) * 1.1deg));
}

.hero.has-parallax .shot--chat {
	transform: translate3d(calc(var(--px) * 30px), calc(var(--py) * 22px), 0)
		rotate(calc(var(--px) * -1.4deg));
}

@media (hover: hover) and (pointer: fine) {
	.hero.has-parallax:hover .shot--ad,
	.hero.has-parallax:hover .shot--chat {
		box-shadow: 0 34px 70px -28px rgba(var(--shadow-rgb), .75);
	}
}

/* ============================================================
   2. Service card spotlight
   --mx / --my are pixel coordinates inside the hovered card.
   ============================================================ */
.svcs.has-spotlight .svc { isolation: isolate; }

.svcs.has-spotlight .svc::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	transition: opacity .4s var(--ease);
	background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%),
		rgba(124, 224, 42, .17), transparent 62%);
}

.svcs.has-spotlight .svc--lead::after {
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
		rgba(124, 224, 42, .13), transparent 64%);
}

.svcs.has-spotlight .svc:hover::after { opacity: 1; }

/* the pseudo-element is positioned, so content needs to be lifted above it;
   the whole-card link stays on top of everything so the card stays clickable */
.svcs.has-spotlight .svc > :not(.svc__link) {
	position: relative;
	z-index: 1;
}

.svcs.has-spotlight .svc__link { z-index: 2; }

/* ============================================================
   3. Proof numbers
   home-fx.js locks each cell's width before counting, so nothing reflows.
   ============================================================ */
.proof li strong { font-variant-numeric: tabular-nums; }

/* ============================================================
   4. Client logo marquee
   The row is duplicated in JS, so -50% is exactly one full set.
   ============================================================ */
.strip.has-marquee .wrap {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	overflow: hidden;
}

.strip.has-marquee .strip__row {
	--mq-time: 36s;
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	animation: mk-marquee var(--mq-time) linear infinite;
	will-change: transform;
}

.strip.has-marquee .strip__row > li { flex: none; }

.strip.has-marquee:hover .strip__row,
.strip.has-marquee:focus-within .strip__row {
	animation-play-state: paused;
}

@keyframes mk-marquee {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

/* ============================================================
   5. Scroll nudge
   Lives inside .mkc (position: fixed, bottom-right), so it tracks the chat
   launcher on every screen size without its own positioning maths.
   ============================================================ */
.mk-nudge {
	position: absolute;
	right: 0;
	bottom: 72px;
	z-index: 2;
	width: min(290px, calc(100vw - 48px));
	padding: 16px 34px 16px 18px;
	border-radius: 18px 18px 4px;
	border: 1px solid var(--edge-lit);
	background: var(--surface);
	box-shadow: 0 26px 54px -20px rgba(var(--shadow-rgb), .65);
	opacity: 0;
	transform: translate3d(22px, 8px, 0) scale(.96);
	transform-origin: 100% 100%;
	transition: opacity .34s var(--ease), transform .34s var(--ease);
	pointer-events: none;
}

.mk-nudge.is-in {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
	pointer-events: auto;
}

.mk-nudge__dot {
	display: block;
	width: 8px;
	height: 8px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 0 rgba(124, 224, 42, .55);
	animation: mk-nudge-pulse 2.4s var(--ease) infinite;
}

@keyframes mk-nudge-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(124, 224, 42, .5); }
	70%  { box-shadow: 0 0 0 9px rgba(124, 224, 42, 0); }
	100% { box-shadow: 0 0 0 0 rgba(124, 224, 42, 0); }
}

.mk-nudge__t {
	margin: 0;
	font-family: var(--font-display);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.015em;
	color: var(--ink);
}

.mk-nudge__l {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted-hi);
}

.mk-nudge__go {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 12px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--accent-text);
	transition: gap .25s var(--ease);
}

.mk-nudge__go svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mk-nudge__go:hover,
.mk-nudge__go:focus-visible { gap: 11px; }

.mk-nudge__x {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: color .2s var(--ease), background-color .2s var(--ease);
}

.mk-nudge__x:hover,
.mk-nudge__x:focus-visible {
	color: var(--ink);
	background: rgba(var(--ink-rgb), .08);
}

/* the built-in teaser and the nudge must never stack */
.mkc.is-open .mk-nudge { display: none; }

@media (max-width: 600px) {
	.mk-nudge {
		bottom: 64px;
		padding: 14px 30px 14px 15px;
		border-radius: 16px 16px 4px;
	}
	.mk-nudge__t { font-size: 13.5px; }
	.mk-nudge__l { font-size: 12.5px; }
}

/* ============================================================
   Reduced motion: keep the information, drop the movement.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.hero.has-parallax .hero__aurora,
	.hero.has-parallax .shot--ad,
	.hero.has-parallax .shot--chat {
		transform: none;
		transition: none;
	}

	.strip.has-marquee .strip__row { animation: none; width: auto; }
	.svcs.has-spotlight .svc::after { transition: none; }
	.mk-nudge { transition: opacity .01s linear; transform: none; }
	.mk-nudge.is-in { transform: none; }
	.mk-nudge__dot { animation: none; }
}
