/*
 * Captrit homepage sections.
 * Blocks carry content and colours; this file carries layout details
 * blocks can't express (photo placement, hairlines, sticky column, process track).
 * Breakpoints: 640px (sm), 1024px (lg), 1280px (xl). Mobile first.
 */

/* ---------- Shared ---------- */

.c-section { padding-block: 80px; }
@media (min-width: 640px) { .c-section { padding-block: 112px; } }
@media (min-width: 1024px) { .c-section { padding-block: 144px; } }
/* React section-specific padding */
.c-approach { padding-bottom: 96px; }
@media (min-width: 640px) { .c-approach { padding-bottom: 112px; } }
@media (min-width: 1024px) { .c-approach { padding-bottom: 144px; } .c-catalogue { padding-block: 128px; } }
.c-section > * { margin-block-start: 0; }

.c-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.01em;
	line-height: 1.4;
	display: flex;
	width: fit-content;
	align-items: center;
	gap: 10px;
}
/* React labels are inline-flex in a 24px line box: text sits 5px down, 2px space below */
.c-section .c-label.has-dot,
.c-contact .c-label.has-dot,
.cb-masthead .c-label.has-dot { margin-top: 5px; margin-bottom: 2px; }
.c-label.has-dot::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	flex: none;
}

.c-display,
.c-h2 {
	font-weight: 500;
	text-wrap: balance;
}
.c-display {
	font-size: clamp(38px, 10.5vw, 46px);
	letter-spacing: -0.04em;
	line-height: 0.98;
}
.c-h2 {
	font-size: 40px;
	letter-spacing: -0.035em;
	line-height: 1.04;
}
@media (min-width: 640px) {
	.c-display { font-size: 64px; }
	.c-h2 { font-size: 52px; }
}
@media (min-width: 1024px) {
	.c-display { font-size: 60px; }
	.c-h2 { font-size: 56px; }
}
@media (min-width: 1280px) {
	.c-display { font-size: 76px; }
}

/* Blue full stop from the logo */
.has-point::after {
	content: "";
	display: inline-block;
	width: 0.15em;
	height: 0.15em;
	margin-left: 0.05em;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
}

.c-lede {
	font-size: 17px;
	line-height: 1.6;
	text-wrap: pretty;
}
@media (min-width: 640px) { .c-lede { font-size: 18px; } }

.c-photo { margin: 0; overflow: hidden; }
.c-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.c-photo.is-4x3 img { aspect-ratio: 4 / 3; }
.c-photo.is-16x10 img { aspect-ratio: 16 / 10; }
.c-photo.is-21x9 img { aspect-ratio: 4 / 3; }
@media (min-width: 640px) { .c-photo.is-21x9 img { aspect-ratio: 21 / 9; } }
.c-photo.is-grey img { filter: grayscale(1); }

/* Two-column intro: heading left, lede bottom-right */
.c-intro {
	display: grid;
	gap: 32px;
}
@media (min-width: 1024px) {
	.c-intro { grid-template-columns: 7fr 1fr 4fr; align-items: end; column-gap: 40px; }
	.c-intro > :last-child { grid-column: 3; }
}
.c-intro > * { margin: 0; }

/* Text-only button */
.wp-block-button.is-style-text .wp-block-button__link {
	background: transparent;
	color: inherit;
	padding-inline: 4px;
}
.wp-block-button.is-style-text .wp-block-button__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Outline button on paper */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--on-paper);
	border: 1px solid var(--wp--preset--color--on-paper);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--on-paper);
	color: var(--wp--preset--color--paper);
}

/* ---------- Hero ---------- */

.c-hero {
	position: relative;
	overflow: hidden;
	padding-block: 0;
}
.c-hero > * { margin-block: 0; }
.c-contact > * { margin-block: 0; }
.c-hero__media {
	position: absolute !important;
	inset: 0 0 auto 0;
	height: 68%;
	margin: 0 !important;
	max-width: none !important;
}
.c-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgb(10 12 15 / 0.35), rgb(10 12 15 / 0.7) 45%, #0A0C0F 80%);
}
.c-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.c-hero__copy {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: max(560px, calc(100vh - 72px));
	min-height: max(560px, calc(100dvh - 72px));
	padding-block: 96px 40px;
}
.c-hero__copy > * { margin-block: 0; }
.c-hero__copy .c-display { margin-top: 20px; }
.c-hero__copy .c-lede { margin-top: 20px; max-width: 480px; font-size: 15px; }
.c-hero__copy .wp-block-buttons { margin-top: 32px; flex-direction: column; align-items: stretch; gap: 4px; }
.c-hero__copy .wp-block-button__link { width: 100%; text-align: center; }

@media (min-width: 640px) {
	.c-hero__copy { padding-bottom: 64px; }
	.c-hero__copy .c-display { margin-top: 32px; }
	.c-hero__copy .c-lede { margin-top: 32px; font-size: 18px; }
	.c-hero__copy .wp-block-buttons { margin-top: 40px; flex-direction: row; align-items: center; gap: 16px; }
	.c-hero__copy .wp-block-button__link { width: auto; }
}
@media (min-width: 1024px) {
	.c-hero__media { inset: 0 0 0 auto; width: 42%; height: 100%; }
	.c-hero__media::after { background: rgb(10 12 15 / 0.1); }
	.c-hero__media img { object-position: center; }
	.c-hero__copy {
		justify-content: center;
		min-height: max(640px, calc(100vh - 72px));
		min-height: max(640px, calc(100dvh - 72px));
		padding-block: 96px;
		container-type: inline-size;
	}
	/* Text column = 7 of 12 columns, like the React grid; photo sits beyond it */
	.c-hero__copy > * { max-width: calc(58.333cqw - 40px); }
}

/* ---------- Problem ---------- */

.c-problem .c-h2 mark { white-space: nowrap; }

.c-problem .c-h2 { max-width: 820px; margin-top: 32px; }
.c-problem__body { display: grid; gap: 40px; margin-top: 64px; }
.c-problem__body > * { margin: 0; }
@media (min-width: 1024px) {
	.c-problem__body { grid-template-columns: 7fr 1fr 4fr; column-gap: 40px; margin-top: 96px; }
	.c-problem__body > :last-child { grid-column: 3; align-self: end; }
}
.c-problem__text .c-lede { font-size: 20px; line-height: 1.5; letter-spacing: -0.01em; }
@media (min-width: 640px) { .c-problem__text .c-lede { font-size: 22px; } }

/* ---------- Practices ---------- */

.c-practices__grid { display: grid; gap: 80px; margin-top: 80px; }
@media (min-width: 1024px) { .c-practices__grid { grid-template-columns: 1fr 1fr; column-gap: 64px; margin-top: 112px; } }
.c-practices__grid > * { margin: 0; }
.c-practice > * { margin-block: 0; }
.c-practice h3 { margin-top: 40px; font-size: clamp(32px, 4vw, 40px); letter-spacing: -0.035em; line-height: 1.04; scroll-margin-top: 104px; }
.c-practice > p { margin-top: 16px; max-width: 46ch; }
.c-practice__services { margin-top: 40px; border-top: 1px solid rgb(255 255 255 / 0.1); }
.c-practice__services > * { margin: 0; }

.c-practice .wp-block-details { border-bottom: 1px solid rgb(255 255 255 / 0.1); }
.c-practice .wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 20px;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.015em;
	cursor: pointer;
	list-style: none;
}
.c-practice .wp-block-details summary::-webkit-details-marker { display: none; }
.c-practice .wp-block-details summary::after {
	content: "+";
	font-weight: 300;
	font-size: 22px;
	color: var(--wp--preset--color--on-ink-faint);
	transition: transform 0.3s;
}
.c-practice .wp-block-details[open] summary::after { transform: rotate(45deg); }
.c-practice .wp-block-details > :not(summary) { margin-block: 0 12px; }
.c-practice .wp-block-details > :last-child { margin-bottom: 28px; }
.c-practice .wp-block-details p { color: var(--wp--preset--color--on-ink-muted); font-size: 15px; line-height: 1.65; }
.c-practice .wp-block-details ul {
	padding: 0;
	list-style: none;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	line-height: 1.9;
	color: var(--wp--preset--color--on-ink-muted);
}

/* ---------- Attack surface ---------- */

.c-surface__grid { display: grid; gap: 56px; }
.c-surface__grid > * { margin: 0; }
@media (min-width: 1024px) {
	.c-surface__grid { grid-template-columns: 5fr 7fr; column-gap: 40px; }
	.c-surface__aside { position: sticky; top: 112px; align-self: start; }
}
.c-surface__aside > * { margin-block: 0; }
.c-surface__aside .c-h2 { margin-top: 32px; }
.c-surface__aside .c-lede { margin-top: 24px; max-width: 42ch; }
.c-surface__aside .c-photo { margin-top: 48px; display: none; }
@media (min-width: 1024px) { .c-surface__aside .c-photo { display: block; } }

.c-layers { counter-reset: layer; border-top: 1px solid var(--wp--preset--color--paper-line); }
.c-layers > * { margin: 0; }
.c-layer {
	counter-increment: layer;
	position: relative;
	padding: 28px 0 28px 56px;
	border-bottom: 1px solid var(--wp--preset--color--paper-line);
}
.c-layer::before {
	content: counter(layer, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 34px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--wp--preset--color--on-paper-faint);
}
.c-layer > * { margin: 0; }
.c-layer h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.3; }
.c-layer p { margin-top: 8px; font-size: 15px; }
.c-layer p + p { font-size: 14px; color: var(--wp--preset--color--on-paper-muted); }
@media (min-width: 640px) {
	.c-layer { display: grid; grid-template-columns: 4fr 7fr; column-gap: 16px; padding-block: 32px; }
	.c-layer::before { top: 38px; }
	.c-layer h3 { grid-row: span 2; }
	.c-layer p:first-of-type { margin-top: 0; }
}

/* ---------- Approach / process ---------- */

.c-approach .c-photo { margin-top: 64px; }
@media (min-width: 1024px) { .c-approach .c-photo { margin-top: 96px; } }

.c-steps {
	position: relative;
	display: grid;
	margin-top: 64px;
	padding: 0;
	list-style: none;
}
.c-steps::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 8px;
	bottom: 8px;
	width: 1px;
	background: rgb(255 255 255 / 0.18);
}
.c-steps > * { margin: 0; }
.c-step { position: relative; padding: 0 0 36px 36px; }
.c-step:last-child { padding-bottom: 0; }
.c-step::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
}
.c-step > * { margin: 0; }
.c-step h3 { margin-top: 12px; font-size: 20px; letter-spacing: -0.015em; }
.c-step .c-step__tag { margin-top: 4px; font-size: 14px; color: var(--wp--preset--color--on-ink-faint); }
.c-step .c-step__desc { margin-top: 20px; max-width: 34ch; font-size: 15px; color: var(--wp--preset--color--on-ink-muted); }
@media (min-width: 1024px) {
	.c-steps { grid-template-columns: repeat(5, 1fr); column-gap: 32px; margin-top: 80px; }
	.c-steps::before { left: 0; right: 0; top: 3px; bottom: auto; width: auto; height: 1px; }
	.c-step { padding: 43px 0 0; }
	.c-step::before { top: 0; }
}
.c-approach__foot {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid rgb(255 255 255 / 0.1);
	font-size: 14px;
}
@media (min-width: 1024px) { .c-approach__foot { margin-top: 80px; } }

/* ---------- Clients ---------- */

.c-clients__grid { display: grid; gap: 56px; }
.c-clients__grid > * { margin: 0; }
@media (min-width: 1024px) {
	.c-clients__grid { grid-template-columns: 7fr 1fr 4fr; column-gap: 40px; }
	.c-clients__grid > :last-child { grid-column: 3; }
	.c-clients__grid .c-photo,
	.c-clients__grid .c-photo img { height: 100%; min-height: 560px; }
}
.c-clients__main > * { margin-block: 0; }
.c-clients__main .c-h2 { margin-top: 32px; }
.c-clients__main .c-lede { margin-top: 24px; max-width: 44ch; }
.c-clients__list { display: grid; margin-top: 56px; border-top: 1px solid var(--wp--preset--color--paper-line); }
@media (min-width: 640px) { .c-clients__list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.c-clients__list > * { margin: 0; }
.c-client { padding-block: 24px; border-bottom: 1px solid var(--wp--preset--color--paper-line); }
.c-client > * { margin: 0; }
.c-client__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.c-client__head > * { margin: 0; }
.c-client h3 { font-size: 20px; letter-spacing: -0.02em; }
.c-client > p:last-child { margin-top: 8px; font-size: 15px; color: var(--wp--preset--color--on-paper-muted); }

/* ---------- Catalogue ---------- */

.c-catalogue { border-top: 1px solid var(--wp--preset--color--paper-line); }
.c-catalogue__grid { display: grid; gap: 64px; align-items: center; }
.c-catalogue__grid > * { margin: 0; }
@media (min-width: 1024px) {
	.c-catalogue__grid { grid-template-columns: 7fr 1fr 4fr; column-gap: 40px; }
	.c-catalogue__grid > :last-child { grid-column: 3; }
}
.c-cover { position: relative; margin: 0 16px 16px 0; }
.c-cover::before,
.c-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.c-cover::before { background: #1A2440; transform: translate(16px, 16px); }
.c-cover::after { background: #25335A; transform: translate(8px, 8px); }
.c-cover img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	aspect-ratio: 842 / 595;
	box-shadow: 0 2px 4px rgb(14 17 22 / 0.08), 0 24px 48px -12px rgb(14 17 22 / 0.35);
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.c-cover:hover img { transform: translateY(-4px); }
.c-catalogue__text > * { margin-block: 0; }
.c-catalogue__text .c-h2 { margin-top: 32px; }
.c-catalogue__text .c-lede { margin-top: 24px; max-width: 40ch; font-size: 16px; }
.c-catalogue__text .wp-block-buttons { margin-top: 40px; align-items: center; gap: 20px; }

/* ---------- Insights ---------- */

.c-insights { border-top: 1px solid var(--wp--preset--color--paper-line); }
.c-insights__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.c-insights__head > * { margin: 0; }
.c-insights__head .c-h2 { margin-top: 32px; }
.c-insights__grid {
	display: grid;
	gap: 48px;
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--wp--preset--color--paper-line);
}
.c-insights__grid > * { margin: 0; }
@media (min-width: 1024px) { .c-insights__grid { grid-template-columns: 7fr 5fr; column-gap: 40px; } }
.c-insights .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.c-insights .wp-block-post-featured-image { margin: 0; overflow: hidden; background: var(--wp--preset--color--paper-2); }
.c-insights .wp-block-post-featured-image img { transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.c-insights li:hover .wp-block-post-featured-image img { transform: scale(1.02); }
.c-insights .wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.c-insights .wp-block-post-terms,
.c-insights .wp-block-post-date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--wp--preset--color--on-paper-faint);
}

.c-insights__lead .wp-block-post-terms { margin-top: 24px; }
.c-insights__lead .wp-block-post-title { margin-top: 12px; max-width: 30ch; font-size: clamp(26px, 3vw, 30px); line-height: 1.2; letter-spacing: -0.025em; }
.c-insights__lead .wp-block-post-excerpt { margin-top: 16px; color: var(--wp--preset--color--on-paper-muted); }
.c-insights__lead .wp-block-post-excerpt__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }

.c-insights__side li { padding-block: 24px; border-bottom: 1px solid var(--wp--preset--color--paper-line); }
.c-insights__side li:first-child { padding-top: 0; }
.c-insights__side li:last-child { padding-bottom: 0; border-bottom: 0; }
.c-insights__side .c-row { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; }
.c-insights__side .c-row > * { margin: 0; }
.c-insights__side .c-row > :last-child > * { margin: 0; }
.c-insights__side .wp-block-post-title { margin-top: 8px !important; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-insights__side .wp-block-post-date { margin-top: 12px !important; }

/* ---------- Contact ---------- */

.c-contact { position: relative; overflow: hidden; }
.c-contact__bg {
	position: absolute !important;
	inset: 0;
	margin: 0 !important;
	max-width: none !important;
}
.c-contact__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; opacity: 0.55; }
.c-contact__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, #0A0C0F, rgb(10 12 15 / 0.85), rgb(10 12 15 / 0.2));
}
.c-contact__copy { position: relative; padding-block: 80px; }
@media (min-width: 640px) { .c-contact__copy { padding-block: 128px; } }
@media (min-width: 1024px) { .c-contact__copy { padding-block: 176px; } }
.c-contact__copy > * { margin-block: 0; max-width: 640px; }
.c-contact__copy .c-h2 { margin-top: 32px; }
.c-contact__copy .c-lede { margin-top: 24px; max-width: 44ch; }
.c-contact__copy .wp-block-buttons { margin-top: 40px; gap: 16px 32px; align-items: center; }
.c-contact__copy .c-label:last-child { margin-top: 56px; }

/* ---------- Header ---------- */

.c-header { position: sticky; top: 0; z-index: 50; min-height: 72px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.c-header > * { width: 100%; }
.c-header .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
@media (max-width: 639px) {
	.c-header .wp-block-buttons { display: none; }
	.c-header .wp-block-image img { width: 118px !important; }
}
.c-catalogue__text .c-label { margin-top: 16px; }

/* ---------- Footer ---------- */

.cf { padding-block: 80px 40px; border-top: 1px solid rgb(255 255 255 / 0.1); }
.cf > * { margin-block: 0; }
.cf a { color: inherit; text-decoration: none; transition: color 0.2s; }
.cf a:hover { color: #fff; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 32px; }
.cf-grid > * { margin: 0; }
.cf-brand { grid-column: span 2; }
.cf-brand > * { margin-block: 0; }
.cf-logo img { height: 20px !important; width: auto !important; }
.cf-about { margin-top: 24px !important; max-width: 34ch; font-size: 15px; line-height: 1.6; }
.cf-email { display: flex; align-items: center; gap: 12px; margin-top: 32px !important; }
.cf-email > * { margin: 0; }
.cf-email a { font-size: 15px; color: var(--wp--preset--color--on-ink); }
.cf-email .cb-copy { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--on-ink-faint); }
.cf-email .cb-copy:hover { color: var(--wp--preset--color--on-ink); text-decoration: none; }
@media (min-width: 1024px) {
	.cf-grid { grid-template-columns: repeat(12, 1fr); column-gap: 32px; }
	.cf-brand { grid-column: span 4; }
	.cf-col:nth-child(2) { grid-column: 6 / span 2; }
	.cf-col:nth-child(3) { grid-column: span 3; }
	.cf-col:nth-child(4) { grid-column: span 2; }
}
.cf-col > * { margin: 0; }
.cf-title { font-family: var(--wp--preset--font-family--mono); font-size: 12px !important; font-weight: 400; letter-spacing: 0.01em; line-height: 1.4; color: var(--wp--preset--color--on-ink-faint); }
.cf-links { margin-top: 20px !important; padding: 0; list-style: none; font-size: 14px; }
.cf-links li + li { margin-top: 12px; }
.cf-bottom {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-top: 80px !important;
	padding-top: 32px;
	border-top: 1px solid rgb(255 255 255 / 0.1);
}
@media (min-width: 640px) { .cf-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.cf-bottom > * { margin: 0; }
.cf-copy { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--on-ink-faint); }
.cf-social { gap: 20px !important; }
.cf-social .wp-social-link { color: var(--wp--preset--color--on-ink-faint) !important; }
.cf-social .wp-social-link:hover { color: #fff !important; transform: none; }
.cf-social .wp-social-link svg { width: 16px; height: 16px; }

/* ---------- Per-section heading and lede sizes, copied from the React site ---------- */
/* Label sits 32px above every section heading */
.c-section .c-label + .c-h2 { margin-top: 32px !important; }

.c-problem .c-h2 { font-size: clamp(34px, 10vw, 40px); }
.c-practices .c-h2,
.c-approach .c-h2 { font-size: 40px; }
.c-catalogue .c-h2,
.c-catalogue__text .c-h2 { font-size: 36px; }
.c-contact .c-h2 { font-size: 40px; }
@media (min-width: 640px) {
	.c-problem .c-h2 { font-size: 60px; }
	.c-practices .c-h2,
	.c-approach .c-h2,
	.c-contact .c-h2 { font-size: 56px; }
	.c-catalogue .c-h2,
	.c-catalogue__text .c-h2 { font-size: 44px; }
}
@media (min-width: 1024px) {
	.c-problem .c-h2 { font-size: 80px; }
	.c-practices .c-h2,
	.c-approach .c-h2 { font-size: 64px; }
	.c-catalogue .c-h2,
	.c-catalogue__text .c-h2 { font-size: 48px; }
	.c-contact .c-h2,
	.c-contact__copy .c-h2 { font-size: 68px; }
	.c-insights .c-h2 { font-size: 52px; }
}

/* Ledes */
.c-practices .c-lede,
.c-approach .c-lede,
.c-contact .c-lede { font-size: 18px; line-height: 1.6; }
.c-surface .c-lede,
.c-clients .c-lede { font-size: 17px; line-height: 1.65; }
.c-catalogue .c-lede { font-size: 16px; line-height: 1.65; }

/* ---------- 12-column grid, same spans as the React site ---------- */
/* React: grid-cols-12 with 40px column gap from lg (1024px) */
@media (min-width: 1024px) {
	.c-intro,
	.c-problem__body,
	.c-surface__grid,
	.c-clients__grid,
	.c-catalogue__grid,
	.c-insights__grid,
	.cb-masthead .c-intro {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: 40px;
	}
	/* heading 7 cols, lede cols 9-12 */
	.c-intro > :first-child { grid-column: 1 / span 7; }
	.c-intro > :last-child { grid-column: 9 / span 4; align-self: end; }
	.c-practices .c-intro > :first-child { grid-column: 1 / span 6; }
	.cb-masthead .c-intro > :first-child { grid-column: 1 / span 8; }
	.cb-masthead .c-intro > :last-child { grid-column: 9 / span 4; }

	.c-problem__body > :first-child { grid-column: 1 / span 7; }
	.c-problem__body > :last-child { grid-column: 9 / span 4; align-self: end; }

	.c-surface__grid > :first-child { grid-column: 1 / span 5; }
	.c-surface__grid > :last-child { grid-column: 6 / span 7; }

	.c-clients__grid > :first-child { grid-column: 1 / span 7; }
	.c-clients__grid > :last-child { grid-column: 9 / span 4; }

	.c-catalogue__grid > :first-child { grid-column: 1 / span 7; }
	.c-catalogue__grid > :last-child { grid-column: 9 / span 4; }

	.c-insights__grid > :first-child { grid-column: 1 / span 7; }
	.c-insights__grid > :last-child { grid-column: 8 / span 5; }
}
/* React vertical gaps between stacked columns */
.c-intro { row-gap: 32px; }
.c-problem__body { row-gap: 40px; }
.c-surface__grid,
.c-clients__grid { row-gap: 56px; }
.c-catalogue__grid { row-gap: 64px; }
.c-insights__grid { row-gap: 48px; }

/* Catalogue cover: React pads it (px-2, sm:px-8, lg:pr-6) and lets the sheets overflow */
.c-cover { margin: 0 !important; padding: 0 8px; }
.c-cover::before,
.c-cover::after { inset: 0 8px; }
@media (min-width: 640px) {
	.c-cover { padding: 0 32px; }
	.c-cover::before,
	.c-cover::after { inset: 0 32px; }
}
@media (min-width: 1024px) {
	.c-cover { padding: 0 24px 0 0; }
	.c-cover::before,
	.c-cover::after { inset: 0 24px 0 0; }
}
.c-cover a { display: block; position: relative; z-index: 1; }

/* Query loops: no stray block gap after the post list */
.c-insights .wp-block-query > * + * { margin-top: 0; }

/* Line heights that Tailwind sets with its text-* sizes on the React site */
.c-practice .wp-block-details summary { line-height: 28px; }
.c-client h3 { line-height: 28px; }
.c-layer h3 { line-height: 1.5; }
.c-step h3 { line-height: 28px; }
.c-step .c-step__tag { line-height: 20px; }
.c-approach__foot { line-height: 20px; }

/* ---------- Root side padding: React px-5 / sm:px-8 / lg:px-10 ---------- */
body {
	--wp--style--root--padding-left: 20px;
	--wp--style--root--padding-right: 20px;
}
@media (min-width: 640px) { body { --wp--style--root--padding-left: 32px; --wp--style--root--padding-right: 32px; } }
@media (min-width: 1024px) { body { --wp--style--root--padding-left: 40px; --wp--style--root--padding-right: 40px; } }

/* ---------- Attack surface rows: React grid-cols-12 gap-x-4, title 4/11, text 7/11 ---------- */
.c-layer {
	padding: 28px 0 28px calc((100% - 176px) / 12 + 16px);
}
.c-layer::before { top: 34px; }
.c-layer h3 { font-size: 22px; line-height: 1.5; }
.c-layer p { margin-top: 8px; font-size: 15px; line-height: 1.6; }
.c-layer p + p { font-size: 14px; line-height: 1.6; }
@media (min-width: 640px) {
	.c-layer {
		display: grid;
		grid-template-columns: repeat(11, minmax(0, 1fr));
		column-gap: 16px;
		align-items: start;
		padding-block: 32px;
	}
	.c-layer::before { top: 38px; }
	.c-layer h3 { grid-column: 1 / span 4; grid-row: 1 / span 2; }
	.c-layer p { grid-column: 5 / span 7; }
	.c-layer p:first-of-type { margin-top: 0; }
}

.c-step .c-step__desc { line-height: 1.6; }
.c-client__head .c-label { flex: none; }
.c-section .c-label.has-dot,
.c-contact .c-label.has-dot,
.cb-masthead .c-label.has-dot { margin-bottom: 4px; }
/* Clients photo: React aspect-[16/10] sm:aspect-[4/3] lg:full height */
.c-clients__grid .c-photo img { aspect-ratio: 16 / 10; }
@media (min-width: 640px) { .c-clients__grid .c-photo img { aspect-ratio: 4 / 3; } }
@media (min-width: 1024px) { .c-clients__grid .c-photo img { aspect-ratio: auto; } }
.c-clients__grid .c-photo img { object-position: 45% 50%; }

/* Text-link buttons: plain 15px links like React */
.wp-block-button.is-style-text .wp-block-button__link {
	padding: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}
.c-hero__copy .wp-block-button.is-style-text .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; height: 48px; }
@media (min-width: 640px) { .c-hero__copy .wp-block-button.is-style-text .wp-block-button__link { padding: 0 4px; } }
.c-contact__copy .wp-block-buttons { flex-direction: column; align-items: flex-start; gap: 16px; }
@media (min-width: 640px) { .c-contact__copy .wp-block-buttons { flex-direction: row; align-items: center; gap: 32px; } }
.c-contact__copy .is-style-text .wp-block-button__link { font-weight: 400; }

/* Recent writing head: stacked on phones, side by side from sm */
.c-insights__head { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
@media (min-width: 640px) { .c-insights__head { flex-direction: row; align-items: flex-end; } }
.c-insights__lead .wp-block-post-excerpt { font-size: 15px; line-height: 1.65; }
/* Side items: React grid-cols-5 gap-5, image 2 cols */
.c-insights__side .c-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.c-insights__side .c-row > :first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
.c-insights__side .c-row > :last-child { grid-column: span 3; }

/* Attack surface number column: span 2 of 12 on phones, 1 from sm */
@media (max-width: 639px) {
	.c-layer { padding-left: calc(2 * (100% - 176px) / 12 + 32px); }
	.c-layer h3 { line-height: 28px; }
}
.c-insights .wp-block-post-template li > * { margin-bottom: 0 !important; }
.c-insights .c-row > * > * { margin-bottom: 0 !important; }
.c-insights .wp-block-post-template > li + li { margin-top: 0; }
.c-insights__head > :first-child { width: 100%; }
@media (min-width: 640px) { .c-insights__head > :first-child { width: auto; } }
.c-section .c-label.has-dot,
.c-contact .c-label.has-dot,
.cb-masthead .c-label.has-dot { margin-top: 7px; }

/* ---------- Buttons: React h-12, px-6, 15px, arrow icon ---------- */
.wp-block-button:not(.is-style-text) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 48px;
	padding: 0 24px;
	box-sizing: border-box;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.005em;
	line-height: 1;
}
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid rgb(14 17 22 / 0.2);
	background: transparent;
	color: var(--wp--preset--color--on-paper);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: rgb(14 17 22 / 0.5); background: transparent; color: var(--wp--preset--color--on-paper); }
.wp-block-button.is-style-outline .wp-block-button__link::after {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h11M8 3l4 4-4 4' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h11M8 3l4 4-4 4' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Catalogue: button and "PDF · 11 pages" on one row */
.c-catalogue__text { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; }
.c-catalogue__text > * { flex-basis: 100%; }
.c-catalogue__text > .wp-block-buttons { flex-basis: auto; margin-top: 40px; }
.c-catalogue__text > .c-label:last-child { flex-basis: auto; margin-top: 40px !important; }

/* ---------- Practices details: React sizes ---------- */
.c-practice h3 { font-size: 32px; }
@media (min-width: 640px) { .c-practice h3 { font-size: 40px; } }
.c-practice > p { line-height: 1.65; }
.c-practice .wp-block-details[open] { display: grid; gap: 24px; padding: 0 24px 28px 0; }
.c-practice .wp-block-details[open] > summary { grid-column: 1 / -1; }
.c-practice .wp-block-details > :not(summary) { margin: 0 !important; }
@media (min-width: 640px) {
	.c-practice .wp-block-details[open] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.c-practice .wp-block-details[open] > p { grid-column: span 3; }
	.c-practice .wp-block-details[open] > ul { grid-column: span 2; }
}
.c-practice .wp-block-details ul { line-height: 1.4; }
.c-practice .wp-block-details li + li { margin-top: 6px; }
/* Chrome 131+, Safari 18.4+ and Firefox 138+ put everything after <summary> in a ::details-content box, so the
   paragraph and list are no longer grid items of <details>. Make that box span the row and be the grid itself;
   the span rules on > p and > ul above still apply inside it. Older browsers keep the outer grid as before. */
.c-practice .wp-block-details[open]::details-content { grid-column: 1 / -1; display: grid; gap: 24px; }
@media (min-width: 640px) {
	.c-practice .wp-block-details[open]::details-content { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* Site Editor: the Details block additionally wraps its inner blocks in a div. Let that wrapper span the row
   and repeat the text/list grid inside it. (No div on the front end.) */
.c-practice .wp-block-details[open] > div { grid-column: 1 / -1; display: grid; gap: 24px; }
@media (min-width: 640px) {
	.c-practice .wp-block-details[open] > div { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.c-practice .wp-block-details[open] > div > p { grid-column: span 3; }
	.c-practice .wp-block-details[open] > div > ul { grid-column: span 2; }
}

.c-problem__text p:last-child { line-height: 1.65; }
.c-layer h3 { line-height: 1.5 !important; }
.c-insights__side .wp-block-post-title { display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden !important; }

/* ---------- Scroll reveal, same as React ---------- */
.reveal-ready .c-reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-ready .c-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-ready .c-reveal { opacity: 1; transform: none; } }
.c-insights .c-insights__side .c-row h3.wp-block-post-title { display: -webkit-box !important; }
.c-catalogue__text > .c-label:last-child { margin-top: 12px !important; }
@media (min-width: 640px) and (max-width: 1023px) { .c-catalogue__text > .c-label:last-child { margin-top: 40px !important; } }
.c-insights .c-insights__side .c-row h3.wp-block-post-title { line-clamp: 3; max-height: 3.9em; }
@media (min-width: 1024px) {
	.c-clients__grid .c-photo { position: relative; min-height: 560px; height: 100%; }
	.c-clients__grid .c-photo img { position: absolute; inset: 0; width: 100%; height: 100% !important; min-height: 0; }
}

/* Section labels: short blue dash instead of a dot */
.c-label.has-dot::before {
	width: 14px;
	height: 2px;
	border-radius: 0;
}

/* Practices: both columns share row heights (photo, title, intro, list), so the service lists start level */
@media (min-width: 1024px) {
	.c-practices__grid { grid-template-rows: auto auto auto 1fr; }
	.c-practice {
		display: grid;
		grid-row: span 4;
		grid-template-rows: subgrid;
		align-content: start;
	}
	.c-practice > * { align-self: start; }
}
@media (min-width: 1024px) {
	.c-practices__grid { row-gap: 0; }
	.c-practice { row-gap: 0; }
}
