/*
 * Case studies: the single design (not built with Elementor), the case cards and the case grids.
 * The design language is the homepage v5 work section: the dossier (photo frame, key facts, before /
 * after), the ".case" cards and the navy numbers band.
 *
 * Loaded after templates.css on case views only, so the --aht-* tokens (with fallbacks) are there.
 * Logical properties only; the before / after slider is physical on purpose (left is left), like the
 * AH Case Dossier widget. Breakpoints 1200 / 1024 / 767. Arabic never gets letter-spacing or italics;
 * numbers are isolated left-to-right runs (.ahc-num, dir="ltr"). No JavaScript needed to read anything.
 */

/* ---------- shared ---------- */
:is(.ahc-hero, .ahc-nums, .ahc-compare, .ahc-did, .ahc-gal, .ahc-end, .ahc-card) {
	font-family: var(--aht-f-body);
	font-size: 17px;
	line-height: 1.75;
	letter-spacing: 0;
	-webkit-font-smoothing: antialiased;
}
.ahc-num { unicode-bidi: isolate; direction: ltr; font-variant-numeric: tabular-nums; }
.ahc-case :is(h1, h2, h3) { text-wrap: balance; }

/* section heads (kicker + title) */
:is(.ahc-nums__head, .ahc-compare__head, .ahc-did__head) { display: grid; gap: 10px; align-content: start; }
:is(.ahc-nums, .ahc-compare, .ahc-did) :is(.ahc-nums__title, .ahc-compare__title, .ahc-did__title) {
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(1.5rem, 2.8vw, 2.2rem);
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--aht-ink);
}
.ahc-nums .ahc-nums__title { color: var(--aht-on-navy); }

/* ---------- hero ---------- */
.ahc-hero {
	position: relative;
	isolation: isolate;
	padding-block: var(--aht-top) 48px;
	background-color: var(--aht-ivory);
	background-image: var(--aht-grain);
	border-block-end: 1px solid var(--aht-line);
	color: var(--aht-ink);
}

.ahc-hero .ahc-hero__in {
	display: grid;
	grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
	gap: 40px 64px;
	align-items: center;
}
.ahc-hero:not(.ahc-hero--cover) .ahc-hero__in { grid-template-columns: minmax(0, 1fr); }
.ahc-hero .ahc-hero__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: start; align-content: start; min-width: 0; }
.ahc-hero .ahc-hero__copy > * { max-width: 100%; min-width: 0; }

.ahc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.ahc-chips li { margin: 0; }
span.aht-chip.ahc-chip--sector,
a.aht-chip.ahc-chip--sector { border-color: rgba(122, 95, 49, .45); background: rgba(255, 255, 255, .55); color: var(--aht-ink-gold); font-weight: 700; }

.ahc-hero .ahc-hero__client {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 6px 0 0;
	font-size: .92rem;
	line-height: 1.6;
	color: var(--aht-muted);
}
.ahc-hero .ahc-hero__client > span + span::before { content: "·"; margin-inline-end: 12px; color: var(--aht-soft); }
.ahc-hero .ahc-hero__k { font-weight: 700; color: var(--aht-ink-gold); }
.ahc-hero .ahc-hero__who { font-weight: 700; color: var(--aht-ink); unicode-bidi: isolate; }

.ahc-hero .ahc-hero__title {
	max-width: 760px;
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 700;
	font-size: clamp(1.1rem, 1.6vw, 1.35rem);
	line-height: 1.55;
	letter-spacing: 0;
	color: var(--aht-muted);
}
.ahc-hero .ahc-hero__title.ahc-hero__title--big {
	max-width: 920px;
	font-weight: 800;
	font-size: clamp(2rem, 4.4vw, 3.4rem);
	line-height: 1.24;
	color: var(--aht-ink);
}
.ahc-hero .ahc-hero__headline {
	max-width: 900px;
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(1.9rem, 3.9vw, 3.1rem);
	line-height: 1.28;
	color: var(--aht-ink);
	text-wrap: balance;
}
[dir="rtl"] .ahc-hero .ahc-hero__headline { line-height: 1.38; }
.ahc-hero .ahc-hero__summary { max-width: 62ch; margin: 0; font-size: 1.08rem; line-height: 1.85; color: var(--aht-muted); }
[dir="rtl"] .ahc-hero .ahc-hero__summary { line-height: 2; }
.ahc-hero .ahc-hero__soon { margin: 0; }

/* the featured image, framed like the dossier photo */
.ahc-hero .ahc-hero__fig { position: relative; justify-self: end; width: 100%; max-width: 500px; margin: 0; }
.ahc-hero .ahc-hero__frame {
	display: block;
	padding: 10px;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r);
	background: var(--aht-card);
	box-shadow: 0 34px 60px -40px rgba(9, 18, 42, .55);
	rotate: .7deg;
}
[dir="rtl"] .ahc-hero .ahc-hero__frame { rotate: -.7deg; }
.ahc-hero .ahc-hero__img.ahc-hero__img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: 4px; background: var(--aht-sand); }
.ahc-hero .ahc-hero__cap {
	position: absolute;
	bottom: 22px;
	inset-inline-start: 22px;
	max-width: calc(100% - 44px);
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(9, 18, 42, .82);
	color: var(--aht-on-navy);
	font-family: var(--ah-f-en, "IBM Plex Sans", system-ui, sans-serif);
	font-size: .76rem;
	line-height: 1.6;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ahc-hero .ahc-hero__cap:not([lang]) { font-family: var(--aht-f-body); }
.ahc-hero .ahc-hero__cap[lang],
.ahc-card .ahc-card__client[lang] { unicode-bidi: isolate; }

/* key facts: each column as wide as its value needs */
.ahc-facts {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: auto;
	margin: 40px 0 0;
	border: 1px solid var(--aht-line);
	border-radius: 8px;
	background: rgba(255, 255, 255, .62);
}
.ahc-facts .ahc-facts__i { display: grid; gap: 2px; align-content: start; min-width: 0; padding: 12px 16px; }
.ahc-facts .ahc-facts__i + .ahc-facts__i { border-inline-start: 1px solid var(--aht-line); }
.ahc-facts dt { margin: 0; font-weight: 400; font-size: .76rem; line-height: 1.5; color: var(--aht-soft); }
.ahc-facts dd {
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 600;
	font-size: .98rem;
	line-height: 1.55;
	color: var(--aht-ink);
	unicode-bidi: plaintext;
	text-align: start;
	overflow-wrap: anywhere;
}
.ahc-facts dd a { color: var(--aht-ink-gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.ahc-facts dd a:hover { color: var(--aht-ink); }

/* ---------- numbers band ---------- */
.ahc-nums {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(56px, 7vw, 96px);
	background: radial-gradient(90% 120% at 15% 0%, #1B2C58 0%, var(--aht-navy) 55%, var(--aht-deep) 100%);
	color: var(--aht-on-navy);
}
[dir="rtl"] .ahc-nums { background: radial-gradient(90% 120% at 85% 0%, #1B2C58 0%, var(--aht-navy) 55%, var(--aht-deep) 100%); }
.ahc-nums::before,
.ahc-nums::after { content: ""; position: absolute; z-index: -1; width: 22px; height: 22px; opacity: .7; pointer-events: none; }
.ahc-nums::before { top: 22px; inset-inline-start: max(10px, env(safe-area-inset-left, 0px)); border-top: 1px solid rgba(226, 197, 143, .45); border-inline-start: 1px solid rgba(226, 197, 143, .45); }
.ahc-nums::after { bottom: 22px; inset-inline-end: max(10px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid rgba(226, 197, 143, .45); border-inline-end: 1px solid rgba(226, 197, 143, .45); }
.ahc-nums .ahc-nums__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px 56px; align-items: end; }
.ahc-nums .ahc-nums__head { grid-column: 1 / -1; }
.ahc-nums .ahc-big { display: grid; gap: 8px; justify-items: start; margin: 0; }
.ahc-nums__in:not(:has(.ahc-kpis)) .ahc-big,
.ahc-nums__in:not(:has(.ahc-big)) .ahc-kpis { grid-column: 1 / -1; }
.ahc-nums .ahc-big__v {
	display: inline-flex;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(3.4rem, 8.6vw, 7rem);
	line-height: .95;
	color: var(--aht-gold-hi);
	white-space: nowrap;
}
.ahc-nums .ahc-big__l { max-width: 34ch; font-weight: 700; font-size: 1.05rem; line-height: 1.6; color: var(--aht-on-navy); }
.ahc-nums .ahc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin: 0; }
.ahc-nums .ahc-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ahc-nums .ahc-kpis--1 { grid-template-columns: minmax(0, 1fr); }
.ahc-nums .ahc-kpi { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--aht-line-navy); }
.ahc-nums .ahc-kpi__v { margin: 0; }
.ahc-nums .ahc-kpi__v .ahc-num {
	display: inline-flex;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	line-height: 1.05;
	color: var(--aht-gold-hi);
	white-space: nowrap;
}
.ahc-nums .ahc-num > span { white-space: pre; }
/* each number fits its column: the size follows the column width where container queries work */
@supports (container-type: inline-size) {
	.ahc-nums .ahc-kpi { container-type: inline-size; }
	.ahc-nums .ahc-kpi__v .ahc-num { font-size: clamp(1.35rem, 15cqi, 2.6rem); }
}
.ahc-nums .ahc-kpi__l { margin: 0; font-weight: 500; font-size: .92rem; line-height: 1.6; color: var(--aht-on-navy-muted); }

/* ---------- before / after (same look and keys as the AH Case Dossier widget) ---------- */
.ahc-compare { padding-block: clamp(56px, 7vw, 88px) 8px; background: var(--aht-ivory); color: var(--aht-ink); }
.ahc-compare .ahc-compare__in { display: grid; gap: 22px; max-width: calc(980px + 2 * var(--aht-gutter)); }
.ahc-ba {
	--p: 50%;
	position: relative;
	height: 220px;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 30px 50px -40px rgba(9, 18, 42, .6);
	-webkit-user-select: none;
	user-select: none;
	touch-action: pan-y;
}
.ahc-ba .ahc-ba__pn { position: absolute; inset: 0; display: grid; align-content: center; padding: 22px 28px; }
.ahc-ba .ahc-ba__pn--before { background: #E7E1D3; background: color-mix(in srgb, var(--aht-sand) 85%, var(--aht-gold)); color: var(--aht-ink); }
.ahc-ba .ahc-ba__pn--after { background: var(--aht-navy); color: var(--aht-on-navy); clip-path: inset(0 0 0 var(--p)); }
[dir="rtl"] .ahc-ba .ahc-ba__pn--after { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ahc-ba .ahc-ba__pin { display: grid; gap: 4px; justify-items: start; max-width: 44%; }
.ahc-ba .ahc-ba__pn--after .ahc-ba__pin { margin-inline-start: auto; }
.ahc-ba .ahc-ba__lbl { font-family: var(--aht-f-mono); font-size: .7rem; line-height: 1.5; letter-spacing: .24em; }
.ahc-ba .ahc-ba__lbl.ahc-ba__lbl--ar { font-family: var(--aht-f-body); font-weight: 700; font-size: .8rem; letter-spacing: 0; }
.ahc-ba .ahc-ba__pn--before .ahc-ba__lbl { color: var(--aht-soft); }
.ahc-ba .ahc-ba__pn--after .ahc-ba__lbl { color: var(--aht-gold-hi); }
.ahc-ba .ahc-ba__v { font-family: var(--aht-f-display); font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.1; white-space: nowrap; }
.ahc-ba .ahc-ba__pn--before .ahc-ba__v { color: var(--ah-red, #9B3B2A); }
.ahc-ba .ahc-ba__pn--after .ahc-ba__v { color: var(--aht-gold-hi); }
.ahc-ba .ahc-ba__d { font-size: .9rem; line-height: 1.7; }
.ahc-ba .ahc-ba__pn--before .ahc-ba__d { color: var(--aht-muted); }
.ahc-ba .ahc-ba__pn--after .ahc-ba__d { color: var(--aht-on-navy-muted); }
.ahc-ba .ahc-ba__range.ahc-ba__range {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	opacity: 0;
	direction: ltr;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}
.ahc-ba .ahc-ba__handle { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: var(--aht-gold); pointer-events: none; }
.ahc-ba .ahc-ba__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--aht-gold);
	color: var(--aht-deep);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	transform: translate(-50%, -50%);
	transition: transform .35s var(--ah-spring, cubic-bezier(.2, .9, .25, 1.15)), background-color .3s, box-shadow .3s;
}
.ahc-ba .ahc-ba__knob svg { display: block; width: 18px; height: 18px; }
.ahc-ba:hover .ahc-ba__knob { transform: translate(-50%, -50%) scale(1.1); background: var(--aht-gold-hi); }
.ahc-ba.is-active .ahc-ba__knob { transform: translate(-50%, -50%) scale(.92); }
.ahc-ba .ahc-ba__range:focus-visible + .ahc-ba__handle .ahc-ba__knob {
	background: var(--aht-gold-hi);
	box-shadow: 0 0 0 3px var(--aht-paper), 0 0 0 5px var(--aht-gold), 0 6px 18px rgba(0, 0, 0, .25);
}
.ahc-compare .ahc-compare__hint { margin: 0; font-size: 1.15rem; text-align: center; }

/* ---------- what we did ---------- */
.ahc-did { padding-block: clamp(56px, 7vw, 88px) 8px; background: var(--aht-ivory); color: var(--aht-ink); }
.ahc-did .ahc-did__in { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 24px 56px; align-items: start; }
.ahc-did .ahc-did__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 0; padding: 0; list-style: none; }
.ahc-did .ahc-did__list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r-sm);
	background: var(--aht-card);
	font-weight: 600;
	font-size: .97rem;
	line-height: 1.6;
	color: var(--aht-ink);
}
.ahc-did .ahc-did__ic { flex: none; width: 22px; height: 22px; margin-top: .05em; padding: 3px; border-radius: 50%; background: var(--aht-navy); color: var(--aht-gold-hi); }

/* ---------- the story ---------- */
.ahc-story { counter-reset: ahc-h2; }
.ahc-story .aht-prose > .ah-kicker:first-child { margin-block-end: 1.6em; }
.ahc-story .aht-prose.aht-prose h2 { counter-increment: ahc-h2; }
.ahc-story .aht-prose.aht-prose h2::before {
	content: counter(ahc-h2, decimal-leading-zero);
	display: block;
	width: max-content;
	height: auto;
	margin-block-end: 12px;
	padding: 1px 9px;
	border: 1px solid rgba(122, 95, 49, .4);
	border-radius: 999px;
	background: none;
	font-family: var(--aht-f-mono);
	font-weight: 500;
	font-size: .76rem;
	line-height: 1.7;
	letter-spacing: .06em;
	color: var(--aht-ink-gold);
	direction: ltr;
}
/* figures: the full column, the image never upscaled */
.ahc-story .aht-prose.aht-prose figure.wp-block-image {
	width: 100%;
	margin: 2em 0;
	padding: 8px;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r);
	background: var(--aht-card);
	box-shadow: var(--aht-shadow);
	box-sizing: border-box;
}
.ahc-story .aht-prose.aht-prose figure.wp-block-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(78vh, 760px);
	margin-inline: auto;
	border-radius: 6px;
}
.ahc-story .aht-prose.aht-prose figure.wp-block-image figcaption { margin: 8px 4px 2px; }
/* two or more images in a row (grouped by inc/cases.php) */
.ahc-story .aht-prose .ahc-run { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 2em; }
.ahc-story .aht-prose.aht-prose .ahc-run figure.wp-block-image { margin: 0; align-self: start; }
.ahc-story .aht-prose.aht-prose .ahc-run figure.wp-block-image img { width: 100%; max-height: 420px; object-fit: cover; object-position: top center; }
.ahc-story .aht-prose a.ahc-zoom.ahc-zoom { display: block; border-radius: 6px; text-decoration: none; cursor: zoom-in; }
.ahc-story .aht-prose a.ahc-zoom:focus-visible { outline: 2px solid var(--aht-gold); outline-offset: 3px; }
/* embeds centred; Facebook / Instagram links as a card */
.ahc-story .aht-prose :is(iframe, .wp-block-embed, .wp-embedded-content, blockquote.instagram-media, blockquote.tiktok-embed) { display: block; margin-inline: auto; }
.ahc-story .aht-prose.aht-prose a.ahc-social {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 12px;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	padding: 12px 18px;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r-sm);
	background: var(--aht-card);
	color: var(--aht-ink);
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	box-shadow: 0 18px 32px -30px rgba(9, 18, 42, .6);
	transition: border-color .25s, transform .35s var(--aht-ease);
}
.ahc-story .aht-prose.aht-prose a.ahc-social:hover { border-color: var(--aht-ink-gold); color: var(--aht-ink); transform: translateY(-2px); }
.ahc-story .aht-prose a.ahc-social .ahc-social__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--aht-navy); color: var(--aht-gold-hi); }
.ahc-story .aht-prose a.ahc-social .ahc-social__u { font-family: var(--aht-f-mono); font-weight: 500; font-size: .76rem; color: var(--aht-soft); overflow-wrap: anywhere; }
/* a paragraph that is only a link (the old buttons) */
.ahc-story .aht-prose.aht-prose p.ahc-linkbtn { margin-block: 1.6em; }
.ahc-story .aht-prose.aht-prose p.ahc-linkbtn > a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border: 1px solid var(--aht-navy);
	border-radius: 999px;
	background: var(--aht-navy);
	color: var(--aht-on-navy);
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color .25s, color .25s;
}
.ahc-story .aht-prose.aht-prose p.ahc-linkbtn > a:hover { background: var(--aht-navy-2); color: var(--aht-gold-hi); }
.ahc-story .aht-prose.aht-prose p.ahc-linkbtn > a::after { content: "↗"; font-size: .9em; line-height: 1; }

/* ---------- gallery ---------- */
.ahc-gal { padding-block: 40px 72px; background: var(--aht-ivory); color: var(--aht-ink); }
.ahc-gal .ahc-gal__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ahc-gal .ahc-gal__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ahc-gal .ahc-gal__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.ahc-gal .ahc-gal__grid--1 { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.ahc-gal .ahc-gal__item { margin: 0; min-width: 0; }
.ahc-gal .ahc-gal__fig { margin: 0; }
.ahc-gal .ahc-gal__link { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--aht-line); border-radius: 10px; background: var(--aht-sand); cursor: zoom-in; }
.ahc-gal .ahc-gal__img.ahc-gal__img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; transition: transform .9s var(--aht-ease); }
.ahc-gal .ahc-gal__link:hover .ahc-gal__img { transform: scale(1.04); }
.ahc-gal .ahc-gal__link:focus-visible { outline: 2px solid var(--aht-gold); outline-offset: 3px; }
.ahc-gal .ahc-gal__cap { margin: 8px 2px 0; font-size: .82rem; line-height: 1.6; color: var(--aht-soft); }

/* ---------- testimonial and sources ---------- */
.ahc-end { padding-block: 24px 72px; background: var(--aht-ivory); color: var(--aht-ink); }
.ahc-end .ahc-end__in { display: grid; gap: 24px; max-width: calc(860px + 2 * var(--aht-gutter)); }
.ahc-end .ahc-quote {
	position: relative;
	display: grid;
	gap: 18px;
	margin: 0;
	padding: clamp(24px, 4vw, 44px);
	border-radius: 18px;
	background: var(--aht-navy);
	color: var(--aht-on-navy);
	box-shadow: 0 34px 60px -44px rgba(9, 18, 42, .8);
}
.ahc-end .ahc-quote__mark { color: var(--aht-gold); opacity: .85; }
[dir="rtl"] .ahc-end .ahc-quote__mark { scale: -1 1; }
.ahc-end .ahc-quote .ahc-quote__text { margin: 0; padding: 0; border: 0; font-style: normal; }
.ahc-end .ahc-quote .ahc-quote__text p { margin: 0; font-family: var(--aht-f-display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.7; color: var(--aht-on-navy); }
.ahc-end .ahc-quote__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding-top: 16px; border-top: 1px solid var(--aht-line-navy); }
.ahc-end .ahc-quote__logo { width: 44px; height: 44px; padding: 4px; border-radius: 12px; background: var(--aht-paper); object-fit: contain; }
.ahc-end .ahc-quote__name { font-weight: 700; color: var(--aht-on-navy); }
.ahc-end .ahc-quote__role { flex-basis: 100%; font-size: .88rem; color: var(--aht-on-navy-muted); }
.ahc-end .ahc-quote__logo + .ahc-quote__name + .ahc-quote__role { flex-basis: auto; }
.ahc-end .ahc-sources { margin: 0; padding-top: 14px; border-top: 1px dashed var(--aht-line); }
.ahc-end .ahc-sources__k { font-weight: 700; color: var(--aht-muted); }

/* ---------- case cards and grids ---------- */
.ahc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px 20px; }
.ahc-grid > .ahc-card { grid-column: span 6; }
.ahc-grid > .ahc-card:nth-child(6n + 1),
.ahc-grid > .ahc-card:nth-child(6n + 4) { grid-column: span 7; }
.ahc-grid > .ahc-card:nth-child(6n + 2),
.ahc-grid > .ahc-card:nth-child(6n + 3) { grid-column: span 5; }
.ahc-grid.ahc-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ahc-grid.ahc-grid--three > .ahc-card { grid-column: auto; }

.ahc-card {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r);
	background: var(--aht-card);
	color: var(--aht-ink);
	transition: transform .45s var(--aht-ease), box-shadow .45s var(--aht-ease), border-color .3s;
}
.ahc-card:hover,
.ahc-card:focus-within { transform: translateY(-4px); border-color: var(--aht-tint-line); box-shadow: var(--aht-shadow-hi); }
.ahc-card .ahc-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--aht-navy); }
/* in the 12-column grid, wide and narrow cards share one image height (as on the homepage) */
.ahc-grid:not(.ahc-grid--three) > .ahc-card .ahc-card__media { aspect-ratio: auto; height: clamp(220px, 22vw, 300px); }
.ahc-card .ahc-card__img.ahc-card__img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; transition: transform 1.2s var(--aht-ease); }
.ahc-card:hover .ahc-card__img { transform: scale(1.05); }
.ahc-card .ahc-card__ph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(80% 80% at 50% 40%, #1D2E5E, var(--aht-deep)); }
.ahc-card .ahc-card__ph span { font-family: var(--aht-f-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--aht-gold-hi); direction: ltr; }
.ahc-card .ahc-card__media:has(.ahc-card__big)::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to top, rgba(9, 18, 42, .82), rgba(9, 18, 42, 0)); pointer-events: none; }
.ahc-card .ahc-card__client {
	position: absolute;
	z-index: 1;
	top: 10px;
	inset-inline-start: 10px;
	max-width: calc(100% - 20px);
	overflow: hidden;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(9, 18, 42, .82);
	color: var(--aht-on-navy);
	font-family: var(--aht-f-body);
	font-size: .74rem;
	line-height: 1.6;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ahc-card .ahc-card__client[lang] { font-family: var(--ah-f-en, "IBM Plex Sans", system-ui, sans-serif); }
.ahc-card .ahc-card__big {
	position: absolute;
	z-index: 1;
	bottom: 10px;
	inset-inline-end: 14px;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: 2.3rem;
	line-height: 1;
	color: var(--aht-gold-hi);
	text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}
.ahc-card .ahc-card__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 20px 20px; }
.ahc-card .ahc-card__tag { margin: 0; line-height: 1.5; }
.ahc-card .ahc-card__title { margin: 0; font-family: var(--aht-f-display); font-weight: 800; font-size: 1.2rem; line-height: 1.45; letter-spacing: 0; color: var(--aht-ink); }
.ahc-card .ahc-card__lead { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--aht-text); }
.ahc-card .ahc-card__link { color: inherit; text-decoration: none; }
.ahc-card .ahc-card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.ahc-card .ahc-card__link:focus-visible { outline: none; }
.ahc-card .ahc-card__link:focus-visible::after { outline: 2px solid var(--aht-gold); outline-offset: -3px; border-radius: 12px; }
.ahc-card .ahc-card__k { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding-top: 10px; border-top: 1px solid var(--aht-line); }
.ahc-card .ahc-card__k > div { display: flex; flex-direction: column-reverse; min-width: 0; }
.ahc-card .ahc-card__k dt { margin: 0; font-weight: 400; font-size: .74rem; line-height: 1.5; color: var(--aht-soft); }
.ahc-card .ahc-card__k dd { margin: 0; font-family: var(--aht-f-display); font-weight: 600; font-size: .95rem; line-height: 1.5; color: var(--aht-ink); }
.ahc-card .ahc-card__more { margin-block-start: auto; padding-top: 4px; }
.ahc-card.ahc-card--soon { border-style: dashed; }
.ahc-list { padding-block-start: 44px; }

/* ---------- breakpoints ---------- */
@media (max-width: 1200px) {
	.ahc-hero .ahc-hero__in { gap: 32px 44px; }
	.ahc-nums .ahc-nums__in { gap: 32px 40px; }
	.ahc-did .ahc-did__in { gap: 20px 40px; }
}

@media (max-width: 1024px) {
	.ahc-hero .ahc-hero__in { grid-template-columns: minmax(0, 1fr); }
	.ahc-hero .ahc-hero__fig { justify-self: start; max-width: 520px; }
	.ahc-facts { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ahc-facts .ahc-facts__i { border-block-start: 1px solid var(--aht-line); }
	.ahc-facts .ahc-facts__i + .ahc-facts__i { border-inline-start: 0; }
	.ahc-facts .ahc-facts__i:nth-child(-n + 3) { border-block-start: 0; }
	.ahc-facts .ahc-facts__i:not(:nth-child(3n + 1)) { border-inline-start: 1px solid var(--aht-line); }
	.ahc-nums .ahc-nums__in { grid-template-columns: minmax(0, 1fr); }
	.ahc-did .ahc-did__in { grid-template-columns: minmax(0, 1fr); }
	.ahc-gal .ahc-gal__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ahc-grid > .ahc-card,
	.ahc-grid > .ahc-card:nth-child(n) { grid-column: span 6; }
	.ahc-grid:not(.ahc-grid--three) > .ahc-card .ahc-card__media { height: auto; aspect-ratio: 16 / 10; }
	.ahc-grid.ahc-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	:is(.ahc-hero, .ahc-nums, .ahc-compare, .ahc-did, .ahc-gal, .ahc-end, .ahc-card) { font-size: 16.5px; }
	.ahc-hero { padding-block-end: 36px; }
	.ahc-hero .ahc-hero__copy { gap: 12px; }
	.ahc-hero .ahc-hero__headline { font-size: clamp(1.6rem, 7vw, 2.1rem); }
	.ahc-hero .ahc-hero__summary { font-size: 1.02rem; }
	.ahc-hero .ahc-hero__frame { padding: 8px; rotate: none; }
	[dir="rtl"] .ahc-hero .ahc-hero__frame { rotate: none; }
	.ahc-hero .ahc-hero__cap { bottom: 18px; inset-inline-start: 18px; }
	.ahc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
	.ahc-facts .ahc-facts__i { padding: 10px 12px; }
	.ahc-facts .ahc-facts__i:nth-child(n) { border-inline-start: 0; border-block-start: 1px solid var(--aht-line); }
	.ahc-facts .ahc-facts__i:nth-child(-n + 2) { border-block-start: 0; }
	.ahc-facts .ahc-facts__i:nth-child(2n) { border-inline-start: 1px solid var(--aht-line); }
	.ahc-nums .ahc-kpis,
	.ahc-nums .ahc-kpis--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
	.ahc-nums .ahc-kpis--1 { grid-template-columns: minmax(0, 1fr); }
	/* phones: before and after stacked, no slider */
	.ahc-ba { display: grid; gap: 8px; height: auto; overflow: visible; box-shadow: none; }
	.ahc-ba .ahc-ba__pn { position: relative; inset: auto; padding: 18px 20px; border-radius: 8px; }
	.ahc-ba .ahc-ba__pn--after,
	[dir="rtl"] .ahc-ba .ahc-ba__pn--after { clip-path: none; }
	.ahc-ba .ahc-ba__pin,
	.ahc-ba .ahc-ba__pn--after .ahc-ba__pin { max-width: none; margin: 0; }
	.ahc-ba .ahc-ba__range.ahc-ba__range,
	.ahc-ba .ahc-ba__handle,
	.ahc-compare .ahc-compare__hint { display: none; }
	.ahc-did .ahc-did__list { grid-template-columns: minmax(0, 1fr); }
	.ahc-story .aht-prose .ahc-run { gap: 10px; }
	.ahc-story .aht-prose.aht-prose .ahc-run figure.wp-block-image { padding: 5px; }
	.ahc-story .aht-prose.aht-prose .ahc-run figure.wp-block-image img { max-height: 260px; }
	.ahc-gal .ahc-gal__grid,
	.ahc-gal .ahc-gal__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ahc-end .ahc-quote { border-radius: 14px; }
	.ahc-grid,
	.ahc-grid.ahc-grid--three { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.ahc-grid > .ahc-card:nth-child(n) { grid-column: auto; }
	.ahc-card .ahc-card__big { font-size: 2rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.ahc-card,
	.ahc-card .ahc-card__img,
	.ahc-gal .ahc-gal__img,
	.ahc-ba .ahc-ba__knob,
	.ahc-story .aht-prose.aht-prose a.ahc-social,
	.ahc-story .aht-prose.aht-prose p.ahc-linkbtn > a { transition: none; }
	.ahc-card:hover,
	.ahc-card:focus-within,
	.ahc-card:hover .ahc-card__img,
	.ahc-gal .ahc-gal__link:hover .ahc-gal__img,
	.ahc-story .aht-prose.aht-prose a.ahc-social:hover { transform: none; }
}
