/* Case Studies page (/case-studies/, D-37, D-79). Loaded only on this page by the lind-site page kit.
   Layout and copy: tools/build_case_studies.php; record: content/pages/case-studies.md.
   Cards (.lind-cs-card): photo, dark caption box over its bottom-left corner (the demo Projects card look), summary,
   result and link; the cut corner is on the card (lind-cut), so the photo can zoom inside it. */

/* Equal-height cards in each grid row; the result and the link sit at the bottom of every card. */
.lind-cs-grid > .lind-cs-card { height: 100%; }
.lind-cs-card .lind-cs-body { flex-grow: 1; }
.lind-cs-card .lind-cs-foot { margin-top: auto; border-top: 1px solid #dcdcdc; }
.lind-cs-card .lind-cs-caption { position: relative; z-index: 2; }

/* Photo: fills its box; slow zoom while the card is hovered (pointer devices only). */
.lind-cs-photo .elementor-widget-container { overflow: hidden; }
.lind-cs-photo img { display: block; width: 100%; transition: transform .7s ease; }
@media (hover: hover) {
	.lind-cs-card:hover .lind-cs-photo img { transform: scale(1.04); }
}

/* Summary text: lead, then "The Challenge" / "What Lind Delivered" (H4, Title Case, D-46). */
.lind-cs-text p { margin: 0 0 4px; }
.lind-cs-text .lind-cs-lead { color: #1f1f1f; margin-bottom: 18px; }
.lind-cs-text h4,
.lind-cs-result-label .elementor-heading-title {
	font-family: "Raleway", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #1f1f1f;
	text-transform: none;
	margin: 18px 0 4px;
}
.lind-cs-result-label .elementor-heading-title { margin: 0; }

/* Result counter: number, prefix and suffix on one line, left-aligned. */
.lind-cs-counter .rs-counter-list .count-number { display: flex; align-items: baseline; justify-content: flex-start; flex-wrap: nowrap; }
.lind-cs-counter .count-text .title { display: block; max-width: 30em; }
.lind-cs-counter .count-text .title sub { font-size: .75em; }

/* Link to the full case study: text link with an arrow, not a filled button. In the darker Lind Blue (the site's
   hover colour): #118cc9 on the #F5F5F5 card is 3.4:1, under WCAG AA's 4.5:1 for 15px text; #0d6fa1 is 5.1:1. */
.lind-cs-link .rs-btn,
.lind-cs-link a {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	color: #0d6fa1 !important;
	font-size: 15px;
	letter-spacing: .02em;
}
.lind-cs-link a:hover,
.lind-cs-link a:focus-visible { color: #1f1f1f !important; text-decoration: underline; text-underline-offset: 4px; }
.lind-cs-link a::before,
.lind-cs-link a::after { display: none !important; }
.lind-cs-link i,
.lind-cs-link svg { color: inherit !important; fill: currentColor; }

/* Reduced motion: no photo zoom, and the odometers jump straight to their numbers (theme JS has no such check). */
@media (prefers-reduced-motion: reduce) {
	.lind-cs-photo img { transition: none; }
	.lind-cs-card:hover .lind-cs-photo img { transform: none; }
	.lind-cs-counter .odometer,
	.lind-cs-counter .odometer * { transition: none !important; animation: none !important; }
}

/* Entrance motion: Elementor's fadeInUp slides an element up by its own height, which is a long move for a tall card;
   on this page it rises 40px instead (same timing). Elementor skips it for prefers-reduced-motion. */
@keyframes lind-cs-rise {
	from { opacity: 0; transform: translate3d(0, 40px, 0); }
	to { opacity: 1; transform: none; }
}
[data-elementor-type="wp-page"] .animated.fadeInUp { animation-name: lind-cs-rise; }
