/*
 * AH Proof Deck: heading row with platform filters, a horizontal coverflow of proof cards,
 * prev/next with a counter, and a footnote. The 3D falloff (--d, --ad) is set by JS only for
 * mouse users without reduced motion; phones get a flat, native swipe with snap points.
 */
.ah-pdeck,
.ah-pdeck *,
.ah-pdeck *::before,
.ah-pdeck *::after { box-sizing: border-box; }

.ah-pdeck {
	--ah-pdeck-w: 350px;
	--ah-pdeck-cw: min(var(--ah-pdeck-w), 82vw);
	color: var(--ah-ink);
	font-family: var(--ah-f-body);
	font-size: 17px;
	line-height: 1.75;
}

/* heading row */
.ah-pdeck .ah-pdeck__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 18px;
}
.ah-pdeck .ah-pdeck__intro { min-width: 0; flex: 1 1 420px; }
.ah-pdeck .ah-pdeck__title {
	margin: 0;
	font-family: var(--ah-f-display);
	font-weight: 800;
	font-size: clamp(1.3rem, 2.4vw, 1.8rem);
	line-height: 1.4;
	letter-spacing: 0;
	color: inherit;
	text-wrap: balance;
}
.ah-pdeck .ah-pdeck__text {
	max-width: 62ch;
	margin: 6px 0 0;
	font-size: .95rem;
	line-height: 1.75;
	color: var(--ah-muted);
}

/* filters */
.ah-pdeck .ah-pdeck__filter { display: flex; flex-wrap: wrap; gap: 6px; }
.ah-pdeck .ah-pdeck__filter[hidden] { display: none; }
.ah-pdeck .ah-pdeck__fbtn.ah-pdeck__fbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 14px;
	border: 1px solid var(--ah-line);
	border-radius: 999px;
	background: var(--ah-paper);
	box-shadow: none;
	font-family: var(--ah-f-body);
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	color: var(--ah-muted);
	cursor: pointer;
	transition: background-color .3s, color .3s, border-color .3s, transform .35s var(--ah-spring);
}
.ah-pdeck .ah-pdeck__fbtn.ah-pdeck__fbtn:hover { border-color: var(--ah-gold); color: var(--ah-ink); }
.ah-pdeck .ah-pdeck__fbtn.ah-pdeck__fbtn:active { transform: scale(.96); }
.ah-pdeck .ah-pdeck__fbtn.ah-pdeck__fbtn[aria-pressed="true"] { border-color: var(--ah-navy); background: var(--ah-navy); color: var(--ah-on-navy); }
.ah-pdeck .ah-pdeck__fbtn span { font-family: var(--ah-f-mono); font-weight: 500; font-size: .7rem; color: var(--ah-soft); }
.ah-pdeck .ah-pdeck__fbtn[aria-pressed="true"] span { color: var(--ah-gold-hi); }

/* the deck */
.ah-pdeck .ah-pdeck__stage { position: relative; margin-top: 8px; }
.ah-pdeck .ah-pdeck__track {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	padding-block: 34px 40px;
	padding-inline: calc(50% - var(--ah-pdeck-cw) / 2);
	perspective: 1400px;
	scrollbar-width: thin;
	scrollbar-color: var(--ah-line) transparent;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.ah-pdeck .ah-pdeck__track:focus { outline: none; }
.ah-pdeck .ah-pdeck__track:focus-visible { outline: 2px solid var(--ah-gold); outline-offset: -2px; }
@supports selector(:has(*)) {
	.ah-pdeck .ah-pdeck__track:focus-visible { outline: none; }
	.ah-pdeck .ah-pdeck__stage:has(> .ah-pdeck__track:focus-visible)::after {
		content: "";
		position: absolute;
		inset: 14px 0 20px;
		border: 2px solid var(--ah-gold);
		border-radius: 22px;
		pointer-events: none;
	}
}
.ah-pdeck.is-ready .ah-pdeck__track { scrollbar-width: none; }
.ah-pdeck.is-ready .ah-pdeck__track::-webkit-scrollbar { display: none; }
@media (pointer: fine) {
	.ah-pdeck.is-ready .ah-pdeck__track { cursor: grab; }
	.ah-pdeck.is-ready .ah-pdeck__card { -webkit-user-select: none; user-select: none; }
}
.ah-pdeck.is-drag .ah-pdeck__track { scroll-snap-type: none; cursor: grabbing; }
.ah-pdeck.is-drag .ah-pdeck__card { transition: none; }
.ah-pdeck.is-drag .ah-pdeck__shot { cursor: grabbing; }

/* card */
.ah-pdeck .ah-pdeck__card {
	flex: none;
	display: grid;
	align-content: start;
	gap: 12px;
	width: var(--ah-pdeck-cw);
	margin: 0;
	padding: 12px 12px 18px;
	border: 1px solid var(--ah-line);
	border-radius: 18px;
	background: var(--ah-paper);
	box-shadow: 0 30px 50px -40px rgba(15, 27, 60, .65);
	scroll-snap-align: center;
	transition: transform .25s ease-out, translate .45s var(--ah-ease), box-shadow .4s;
}
.ah-pdeck .ah-pdeck__card[hidden] { display: none; }
.ah-pdeck.ah-pdeck--3d .ah-pdeck__card { transform: rotateY(calc(var(--d, 0) * -24deg)) scale(calc(1 - var(--ad, 0) * .1)); }
@media (hover: hover) {
	.ah-pdeck .ah-pdeck__card:hover { translate: 0 -4px; box-shadow: 0 36px 56px -38px rgba(15, 27, 60, .7); }
}
.ah-pdeck .ah-pdeck__card.is-in { animation: ah-pdeck-in .55s var(--ah-ease) calc(var(--n, 0) * 60ms) both; }
@keyframes ah-pdeck-in { from { opacity: 0; translate: 0 18px; } }

.ah-pdeck .ah-pdeck__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px 0; }
.ah-pdeck .ah-pdeck__badge {
	--bc: var(--ah-soft);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--ah-f-en);
	font-weight: 600;
	font-size: .8rem;
	line-height: 1.5;
	white-space: nowrap;
}
.ah-pdeck .ah-pdeck__badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bc); }
/* platform colours (brand marks, not theme colours) */
.ah-pdeck .ah-pdeck__badge--tiktok { --bc: #FE2C55; }
.ah-pdeck .ah-pdeck__badge--google { --bc: #4285F4; }
.ah-pdeck .ah-pdeck__badge--snapchat { --bc: #F5C400; }
.ah-pdeck .ah-pdeck__badge--meta { --bc: #0866FF; }
.ah-pdeck .ah-pdeck__badge--sales { --bc: var(--ah-gold); }
.ah-pdeck .ah-pdeck__badge--automation { --bc: #6E8BFF; }
.ah-pdeck .ah-pdeck__period { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ah-f-mono); font-size: .66rem; line-height: 1.5; color: var(--ah-soft); }
.ah-pdeck .ah-pdeck__period[lang="en"] { letter-spacing: .05em; }

/* screenshot */
.ah-pdeck .ah-pdeck__shot.ah-pdeck__shot {
	position: relative;
	display: block;
	width: 100%;
	height: 200px;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--ah-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	cursor: default;
	transition: border-color .3s;
}
.ah-pdeck.is-ready .ah-pdeck__shot.ah-pdeck__shot { cursor: zoom-in; }
.ah-pdeck .ah-pdeck__shot.ah-pdeck__shot:hover { border-color: var(--ah-gold); background: #fff; }
.ah-pdeck .ah-pdeck__shot.ah-pdeck__shot:focus-visible { outline: 2px solid var(--ah-gold); outline-offset: 2px; }
.ah-pdeck .ah-pdeck__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	padding: 6px;
	object-fit: contain;
	-webkit-user-drag: none;
	pointer-events: none;
	transition: transform .6s var(--ah-ease);
}
.ah-pdeck .ah-pdeck__shot:hover .ah-pdeck__img { transform: scale(1.03); }
.ah-pdeck .ah-pdeck__zoom {
	position: absolute;
	inset-block-end: 8px;
	inset-inline-end: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(9, 18, 42, .86);
	color: var(--ah-on-navy);
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.6;
	opacity: 0;
	translate: 0 4px;
	transition: opacity .3s, translate .3s var(--ah-ease);
}
.ah-pdeck:not(.is-ready) .ah-pdeck__zoom { display: none; }
.ah-pdeck .ah-pdeck__shot:hover .ah-pdeck__zoom,
.ah-pdeck .ah-pdeck__shot:focus-visible .ah-pdeck__zoom { opacity: 1; translate: none; }
@media (hover: none) { .ah-pdeck .ah-pdeck__zoom { opacity: .92; translate: none; } }

/* numbers */
.ah-pdeck .ah-pdeck__body { display: grid; gap: 4px; min-width: 0; padding: 0 6px; }
.ah-pdeck .ah-pdeck__big {
	margin: 0;
	font-family: var(--ah-f-display);
	font-weight: 800;
	font-size: 2.3rem;
	line-height: 1.1;
	text-align: start;
	color: var(--ah-navy);
	font-variant-numeric: tabular-nums;
}
.ah-pdeck .ah-pdeck__big small { font-size: .95rem; font-weight: 600; color: var(--ah-soft); }
.ah-pdeck .ah-pdeck__note { font-size: 1.12rem; }
.ah-pdeck .ah-pdeck__kpis {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 8px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid var(--ah-line);
}
.ah-pdeck .ah-pdeck__kpis > div { display: grid; gap: 1px; align-content: start; min-width: 0; }
.ah-pdeck .ah-pdeck__kpis > div + div { padding-inline-start: 10px; border-inline-start: 1px solid var(--ah-line); }
.ah-pdeck .ah-pdeck__kpis dt { margin: 0; font-weight: 400; font-size: .72rem; line-height: 1.6; color: var(--ah-soft); }
.ah-pdeck .ah-pdeck__kpis dd { margin: 0; font-family: var(--ah-f-mono); font-size: .8rem; line-height: 1.6; overflow-wrap: anywhere; color: var(--ah-ink); }

/* prev / next */
.ah-pdeck .ah-pdeck__nav { display: flex; justify-content: center; align-items: center; gap: 16px; }
.ah-pdeck .ah-pdeck__nav[hidden] { display: none; }
.ah-pdeck .ah-pdeck__btn.ah-pdeck__btn {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ah-line);
	border-radius: 50%;
	background: var(--ah-paper);
	box-shadow: none;
	color: var(--ah-ink);
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color .3s, color .3s, border-color .3s, opacity .3s;
}
.ah-pdeck .ah-pdeck__btn.ah-pdeck__btn:hover:not(:disabled) { border-color: var(--ah-navy); background: var(--ah-navy); color: var(--ah-on-navy); }
.ah-pdeck .ah-pdeck__btn.ah-pdeck__btn:focus-visible { outline: 2px solid var(--ah-gold); outline-offset: 3px; }
.ah-pdeck .ah-pdeck__btn.ah-pdeck__btn:disabled { opacity: .4; cursor: default; }
.ah-pdeck .ah-pdeck__btn svg { width: 18px; height: 18px; transition: translate .35s var(--ah-ease); }
.ah-pdeck .ah-pdeck__btn--prev svg { scale: -1 1; }
[dir="rtl"] .ah-pdeck .ah-pdeck__btn--prev svg { scale: 1 1; }
[dir="rtl"] .ah-pdeck .ah-pdeck__btn--next svg { scale: -1 1; }
.ah-pdeck .ah-pdeck__btn--next:hover:not(:disabled) svg { translate: calc(var(--ah-dir, 1) * 3px) 0; }
.ah-pdeck .ah-pdeck__btn--prev:hover:not(:disabled) svg { translate: calc(var(--ah-dir, 1) * -3px) 0; }
.ah-pdeck .ah-pdeck__count { min-width: 64px; text-align: center; font-family: var(--ah-f-mono); font-size: .86rem; color: var(--ah-soft); font-variant-numeric: tabular-nums; }
.ah-pdeck .ah-pdeck__count b { font-weight: 500; color: var(--ah-ink); }

.ah-pdeck .ah-pdeck__fn { margin: 22px 0 0; }
.ah-pdeck .ah-pdeck__empty { margin: 0; padding: 18px; border: 1px dashed var(--ah-line); border-radius: 12px; font-size: .9rem; color: var(--ah-soft); }

@media (max-width: 767px) {
	.ah-pdeck .ah-pdeck__head { gap: 14px; }
	.ah-pdeck .ah-pdeck__intro { flex-basis: 100%; }
	.ah-pdeck .ah-pdeck__track { gap: 14px; padding-block: 22px 30px; -webkit-mask-image: none; mask-image: none; }
	.ah-pdeck .ah-pdeck__shot.ah-pdeck__shot { height: 170px; }
	.ah-pdeck .ah-pdeck__big { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ah-pdeck .ah-pdeck__card,
	.ah-pdeck .ah-pdeck__img,
	.ah-pdeck .ah-pdeck__zoom,
	.ah-pdeck .ah-pdeck__fbtn.ah-pdeck__fbtn,
	.ah-pdeck .ah-pdeck__btn svg { transition: none; }
	.ah-pdeck .ah-pdeck__card.is-in { animation: none; }
	.ah-pdeck .ah-pdeck__card:hover,
	.ah-pdeck .ah-pdeck__shot:hover .ah-pdeck__img { translate: none; transform: none; }
}
