/* Emailwish Case Studies — portfolio layout */

.ew-cs {
	--ew-cs-bg: #f3f3f1;
	--ew-cs-ink: #111111;
	--ew-cs-muted: #6b6b6b;
	--ew-cs-card: #ffffff;
	--ew-cs-line: #e6e6e3;
	--ew-cs-radius: 22px;
	--ew-cs-pill: 999px;
	font-family: Afacad, "Segoe UI", sans-serif;
	color: var(--ew-cs-ink);
	background: var(--ew-cs-bg);
}

.ew-cs *,
.ew-cs *::before,
.ew-cs *::after {
	box-sizing: border-box;
}

.ew-cs a {
	color: inherit;
}

.ew-cs-wrap {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

/* —— Archive hub —— */
.ew-cs-hub {
	padding: 72px 0 96px;
	background: var(--ew-cs-bg);
}

.ew-cs-hub__intro {
	max-width: 640px;
	margin: 0 0 48px;
}

.ew-cs-hub__eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ew-cs-muted);
	font-weight: 700;
}

.ew-cs-hub__title {
	margin: 0 0 14px;
	font-size: clamp(2rem, 4vw, 3.1rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	font-weight: 700;
}

.ew-cs-hub__lede {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--ew-cs-muted);
}

.ew-cs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.ew-cs-card {
	display: flex;
	flex-direction: column;
	background: var(--ew-cs-card);
	border-radius: var(--ew-cs-radius);
	overflow: hidden;
	text-decoration: none;
	border: 1px solid var(--ew-cs-line);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ew-cs-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.ew-cs-card__media {
	aspect-ratio: 16 / 10;
	background: #ecece8;
	overflow: hidden;
}

.ew-cs-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ew-cs-card__body {
	padding: 22px 22px 26px;
	display: grid;
	gap: 10px;
}

.ew-cs-card__client {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ew-cs-muted);
	font-weight: 700;
}

.ew-cs-card__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.ew-cs-card__result {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ew-cs-muted);
}

/* —— Single —— */
.ew-cs-single {
	background: var(--ew-cs-bg);
	padding: 56px 0 88px;
}

.ew-cs-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 48px;
	align-items: center;
	margin-bottom: 36px;
}

.ew-cs-hero__title {
	margin: 0 0 16px;
	font-size: clamp(2rem, 4.2vw, 3.25rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
	font-weight: 700;
}

.ew-cs-hero__summary {
	margin: 0 0 28px;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--ew-cs-muted);
	max-width: 36em;
}

.ew-cs-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 0 0 28px;
}

.ew-cs-meta__label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ew-cs-muted);
	font-weight: 700;
}

.ew-cs-meta__value {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.4;
	font-weight: 600;
}

.ew-cs-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.ew-cs-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: var(--ew-cs-pill);
	background: #111;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.95rem;
	font-weight: 600;
	border: none;
	transition: opacity 0.2s ease;
}

.ew-cs-cta:hover {
	opacity: 0.88;
}

.ew-cs-share {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border-radius: var(--ew-cs-pill);
	background: #fff;
	border: 1px solid var(--ew-cs-line);
}

.ew-cs-share a {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #222;
	text-decoration: none;
}

.ew-cs-share a:hover {
	background: #f0f0ee;
}

.ew-cs-share svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.ew-cs-hero__visual {
	background: var(--ew-cs-card);
	border-radius: var(--ew-cs-radius);
	padding: 18px;
	border: 1px solid var(--ew-cs-line);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
}

.ew-cs-hero__visual-inner {
	border-radius: 14px;
	overflow: hidden;
	background: #ecece8;
	aspect-ratio: 4 / 3;
}

.ew-cs-hero__visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ew-cs-panel {
	background: var(--ew-cs-card);
	border-radius: var(--ew-cs-radius);
	border: 1px solid var(--ew-cs-line);
	padding: clamp(28px, 4vw, 48px);
	margin-top: 22px;
}

.ew-cs-panel__top {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-bottom: 22px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ew-cs-muted);
	font-weight: 700;
}

.ew-cs-content {
	font-size: 1.05rem;
	line-height: 1.65;
	color: #222;
}

.ew-cs-content > *:first-child {
	margin-top: 0;
}

.ew-cs-content h2,
.ew-cs-content h3 {
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 1.6em 0 0.55em;
}

.ew-cs-content p {
	margin: 0 0 1em;
}

.ew-cs-content img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}

.ew-cs-content ul,
.ew-cs-content ol {
	padding-left: 1.2em;
	margin: 0 0 1em;
}

.ew-cs-back {
	display: inline-flex;
	margin-bottom: 28px;
	font-size: 0.95rem;
	color: var(--ew-cs-muted);
	text-decoration: none;
}

.ew-cs-back:hover {
	color: var(--ew-cs-ink);
	text-decoration: underline;
}

@media (max-width: 900px) {
	.ew-cs-hero {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.ew-cs-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.ew-cs-hub {
		padding: 48px 0 64px;
	}

	.ew-cs-grid {
		grid-template-columns: 1fr;
	}

	.ew-cs-meta {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.ew-cs-hero__visual {
		padding: 12px;
	}
}

/* Soften theme chrome on these pages */
body.ew-case-studies-archive .keydesign-page-title,
body.ew-case-study-single .keydesign-page-title,
body.ew-case-studies-archive .entry-header,
body.ew-case-study-single .entry-header {
	display: none !important;
}

body.ew-case-studies-archive #content,
body.ew-case-study-single #content,
body.ew-case-studies-archive .site-content,
body.ew-case-study-single .site-content {
	padding-top: 0;
}
