/* Case study archive — [codingcafe_case_study_archive]. Builds on service-landing.css (.ccsl-*) and services-archive.css (.ccsa-*). */

.cccs-hero .ccsl-wrap {
	padding-bottom: clamp(40px, 5vw, 64px);
}

/* Mockup images: whole composite visible, centred on the soft gradient */
.cccs-shot,
.cccs-spot__shot {
	padding: 18px 18px 0;
}

.cccs-shot img,
.cccs-spot__shot img {
	aspect-ratio: 16 / 10;
	object-fit: contain;
	object-position: center bottom;
}

/* Spotlight */
.cccs-spot {
	background: var(--ccsl-surface);
}

.cccs-spot .ccsl-wrap {
	padding-bottom: 0;
}

.cccs-spot__card {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--ccsl-line);
	border-radius: 24px;
	background: var(--ccsl-surface);
	box-shadow: 0 24px 60px rgba(61, 44, 95, .12);
}

.ccsl .cccs-spot__shot {
	display: flex;
	align-items: center;
	padding: clamp(20px, 3vw, 40px);
}

.cccs-spot__shot img {
	display: block;
	width: 100%;
	height: auto;
	object-position: center;
	filter: drop-shadow(0 18px 30px rgba(61, 44, 95, .18));
	transition: transform .5s ease;
}

.cccs-spot__shot:hover img {
	transform: scale(1.03);
}

.cccs-spot__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: clamp(24px, 3.4vw, 44px);
}

.cccs-spot__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

/* Client logos are drawn for white backgrounds, so they keep a white chip in dark mode too. */
.cccs-logo {
	display: inline-flex;
	align-items: center;
	height: 56px;
	padding: 4px 12px;
	border: 1px solid #E6DCEB;
	border-radius: 12px;
	background: #FFFFFF;
}

.cccs-logo img {
	display: block;
	width: auto;
	max-width: 140px;
	height: 100%;
	object-fit: contain;
}

.ccsl .cccs-spot__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(22px, 2.6vw, 30px);
	font-weight: 700;
	line-height: 1.25;
}

.ccsl .cccs-spot__title a {
	color: var(--ccsl-ink);
	text-decoration: none;
}

.ccsl .cccs-spot__title a:hover,
.ccsl .cccs-spot__title a:focus-visible {
	color: var(--ccsl-primary);
}

.cccs-spot__text {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.65;
}

.cccs-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 28px;
	margin: 4px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--ccsl-line);
}

.cccs-facts div {
	display: contents;
}

.cccs-facts dt {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ccsl-primary);
}

.cccs-facts dd {
	margin: 0 0 10px;
	font-size: 14.5px;
	color: var(--ccsl-ink);
}

.cccs-spot__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: auto 0 0;
}

/* Filter chips */
.cccs-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	/* A fieldset defaults to min-width:min-content, which stops the phone chip row from scrolling inside itself. */
	min-width: 0;
	margin: -8px 0 36px;
	padding: 0;
	border: 0;
}

.cccs-filter input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cccs-filter span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1.5px solid var(--ccsl-line);
	border-radius: 999px;
	background: var(--ccsl-surface);
	color: var(--ccsl-ink);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s;
}

.cccs-filter em {
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--ccsl-soft);
	color: var(--ccsl-primary);
	font-size: 12px;
	font-style: normal;
	text-align: center;
}

.cccs-filter label:hover span {
	border-color: var(--ccsl-primary);
}

.cccs-filter input:focus-visible + span {
	outline: 2px solid var(--ccsl-primary);
	outline-offset: 2px;
}

.cccs-filter input:checked + span {
	border-color: var(--ccsl-primary);
	background: var(--ccsl-primary);
	color: var(--ccsl-on-primary);
}

.cccs-filter input:checked + span em {
	background: rgba(255, 255, 255, .2);
	color: inherit;
}

.cccs-work:has(input[value=web]:checked) .cccs-item:not([data-groups~=web]),
.cccs-work:has(input[value=store]:checked) .cccs-item:not([data-groups~=store]),
.cccs-work:has(input[value=software]:checked) .cccs-item:not([data-groups~=software]),
.cccs-work:has(input[value=app]:checked) .cccs-item:not([data-groups~=app]) {
	display: none;
}

/* Service pills on grid cards */
.cccs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cccs-tags span {
	padding: 3px 9px;
	border: 1px solid var(--ccsl-line);
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--ccsl-text);
}

.cccs-work .ccsl-work__title {
	-webkit-line-clamp: 2;
}

@media (max-width: 900px) {
	.cccs-spot__card {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.cccs-filter {
		flex-wrap: nowrap;
		justify-content: flex-start;
		margin-inline: -20px;
		padding: 2px 20px 6px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.cccs-filter::-webkit-scrollbar {
		display: none;
	}

	.cccs-filter span {
		white-space: nowrap;
		font-size: 13.5px;
		padding: 9px 14px;
	}

	.cccs-spot__actions .ccsl-btn,
	.cccs-spot__actions .ccsa-btn-ghost {
		flex: 1 1 100%;
		justify-content: center;
	}
}

html[data-theme=dark] .cccs-spot__card {
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

html[data-theme=dark] .cccs-logo {
	border-color: transparent;
}

html[data-theme=dark] .cccs-filter input:checked + span em {
	background: rgba(23, 18, 29, .15);
}

/* Nov 16 2026: fewer boxes. Cards lose their border, fill and footer rule; the mockup panel is the only shape.
   Industry and services read as plain text, the whole card stays one link. Scoped to .cccs-* so the
   service landing pages keep their own cards. */
.cccs-grid {
	gap: clamp(40px, 4.5vw, 56px) clamp(20px, 2.6vw, 32px);
}

.ccsl .cccs-grid .ccsl-work__card,
.ccsl .cccs-grid .ccsl-work__card:hover,
.ccsl .cccs-grid .ccsl-work__card:focus-visible {
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	transform: none;
}

.ccsl .cccs-grid .ccsl-work__card:focus-visible {
	outline: 2px solid var(--ccsl-primary);
	outline-offset: 6px;
	border-radius: 18px;
}

.cccs-grid .cccs-shot {
	border-radius: 18px;
	transition: box-shadow .3s ease;
}

.cccs-grid .ccsl-work__card:hover .cccs-shot {
	box-shadow: 0 18px 40px rgba(61, 44, 95, .16);
}

.cccs-grid .ccsl-work__body {
	gap: 6px;
	padding: 18px 2px 0;
}

.cccs-grid .ccsl-work__tag {
	padding: 0;
	border-radius: 0;
	background: none;
	color: var(--ccsl-primary);
	font-size: 13px;
	font-weight: 600;
}

.ccsl .cccs-grid .ccsl-work__title {
	font-size: 18px;
	line-height: 1.35;
	transition: color .2s;
}

.ccsl .cccs-grid .ccsl-work__card:hover .ccsl-work__title {
	color: var(--ccsl-primary);
}

.cccs-grid .cccs-tags {
	display: block;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--ccsl-text);
}

.cccs-grid .cccs-tags span {
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: inherit;
}

.cccs-grid .cccs-tags span + span::before {
	content: " · ";
}

.cccs-grid .ccsl-work__meta {
	margin-top: 4px;
	padding-top: 0;
	border-top: 0;
	opacity: .85;
}

.cccs-grid .ccsl-work__more {
	display: none;
}

/* Spotlight: no outer card, the mockup panel and the text sit straight on the page. */
.cccs-spot__card,
html[data-theme=dark] .cccs-spot__card {
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.ccsl .cccs-spot__shot {
	border-radius: 24px;
}

.cccs-spot__body {
	padding: 0;
}

/* Filter: only the chosen chip is filled. */
.cccs-filter span {
	border-color: transparent;
	background: none;
}

.cccs-filter label:hover span {
	border-color: transparent;
	background: var(--ccsl-soft);
}

@media (max-width: 767px) {
	.cccs-spot__body {
		padding: 4px 0 0;
	}
}

html[data-theme=dark] .cccs-grid .ccsl-work__tag {
	background: none;
}
