/**
 * Page section blocks — shared styles + softlance/about-* (inc/section-blocks.php).
 * Built on the ds.css tokens; loads on the front end and in the editor.
 *
 * Contents: shared · hero · story · mission & vision · values · services ·
 * process · team · office · CTA · responsive
 */

/* ─── Shared ──────────────────────────────────────────────────────────── */
.ab-title strong,
.ab-title b {
	font-weight: inherit;
	color: var(--ds-blue);
}

.ab-section {
	padding-block: var(--ds-section-y);
	background: #fff;
	color: var(--ds-text);
}

.ab-section--soft {
	background: var(--ds-blue-50);
	border-block: 1px solid var(--ds-line);
}

.ab-head {
	max-width: 44rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ab-head--center {
	margin-inline: auto;
	text-align: center;
}

.ab-head--center .ds-lead { margin-inline: auto; }

.ab-head-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ab-head-row .ab-head { margin-bottom: 0; }

.ab-icon {
	width: 1.375rem;
	height: 1.375rem;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.ab-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 7vw, 6rem);
	background:
		radial-gradient(60rem 30rem at 85% -10%, rgba(37, 99, 235, 0.1), transparent 60%),
		linear-gradient(180deg, #fff 0%, var(--ds-blue-50) 100%);
	border-bottom: 1px solid var(--ds-line);
}

.ab-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(10, 22, 40, 0.045) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(10, 22, 40, 0.045) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
	pointer-events: none;
}

.ab-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: center;
	gap: clamp(2.5rem, 5vw, 4.5rem);
}

.ab-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--ds-muted);
}

.ab-crumbs li + li::before {
	content: "/";
	margin-right: 0.5rem;
	color: var(--ds-line-strong);
}

.ab-crumbs a,
body.sl-shadcn-ui .ab-crumbs a {
	color: var(--ds-muted);
	text-decoration: none;
}

.ab-crumbs a:hover { color: var(--ds-blue); }

.ab-hero__lead {
	margin: 1.5rem 0 0;
	max-width: 36rem;
	font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
	line-height: 1.65;
	color: var(--ds-muted);
}

.ab-hero .ab-hero__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem 1.5rem;
	margin-top: 2rem;
}

.ab-hero__checks li {
	font-size: 0.875rem;
	font-weight: 500;
}

.ab-hero__media { position: relative; }

.ab-glance {
	position: relative;
	overflow: hidden;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border-radius: var(--ds-r-xl);
	background:
		radial-gradient(28rem 18rem at 100% 0%, rgba(37, 99, 235, 0.45), transparent 60%),
		var(--ds-navy);
	box-shadow: var(--ds-shadow-lg);
	color: var(--ds-on-dark-muted);
}

.ab-glance__title {
	margin: 0 0 1.25rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ds-blue-300);
}

.ab-glance__list {
	display: grid;
	margin: 0;
}

.ab-glance__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ab-glance__row:first-child {
	padding-top: 0;
	border-top: 0;
}

.ab-glance__row:last-child { padding-bottom: 0; }

.ab-glance__label {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--ds-on-dark-muted);
}

.ab-glance__value {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-align: right;
	color: #fff;
}

.ab-hero__photo {
	overflow: hidden;
	margin: 0;
	aspect-ratio: 4 / 5;
	border-radius: var(--ds-r-xl);
	box-shadow: var(--ds-shadow-lg);
}

.ab-hero__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ab-hero__media.has-photo .ab-glance {
	position: absolute;
	bottom: -1.5rem;
	left: -2rem;
	width: min(20rem, 85%);
	padding: 1.25rem 1.5rem;
}

.ab-hero__media.has-photo .ab-glance__row { padding-block: 0.625rem; }
.ab-hero__media.has-photo .ab-glance__value { font-size: 1rem; }

/* ─── Story ───────────────────────────────────────────────────────────── */
.ab-story__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: clamp(2.5rem, 6vw, 5rem);
}

.ab-story__body {
	display: grid;
	gap: 1.125rem;
}

.ab-story__body p {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--ds-text);
}

.ab-story__body > :first-child,
.ab-story__body > :first-child p {
	font-size: 1.1875rem;
	font-weight: 500;
	color: var(--ds-ink);
}

.ab-story__aside { position: relative; }

.ab-story__photo {
	overflow: hidden;
	margin: 0;
	aspect-ratio: 4 / 3;
	border-radius: var(--ds-r-xl);
}

.ab-story__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ab-quote {
	position: relative;
	margin: 0;
	padding: clamp(2rem, 4vw, 3rem);
	border-radius: var(--ds-r-xl);
	background: linear-gradient(160deg, var(--ds-blue) 0%, var(--ds-navy-2) 100%);
	box-shadow: var(--ds-shadow-lg);
	color: #fff;
}

.ab-quote__mark {
	display: block;
	height: 2.5rem;
	font-size: 5rem;
	font-weight: 700;
	line-height: 0.9;
	color: rgba(255, 255, 255, 0.35);
}

.ab-quote__text {
	margin: 1rem 0 0;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.015em;
	color: #fff;
}

.ab-quote__cite {
	display: block;
	margin-top: 1.5rem;
	font-size: 0.9375rem;
	font-style: normal;
	color: rgba(255, 255, 255, 0.75);
}

.ab-story__aside.has-photo .ab-quote {
	margin: -4rem 1.5rem 0;
	padding: 1.75rem;
}

/* ─── Mission & vision ────────────────────────────────────────────────── */
.ab-pillars__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.ab-pillar {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 2rem;
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-r-lg);
	background: #fff;
	transition: border-color 0.25s var(--ds-ease), box-shadow 0.25s var(--ds-ease), transform 0.25s var(--ds-ease);
}

.ab-pillar::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 3px;
	background: var(--ds-blue);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--ds-ease);
}

.ab-pillar:hover {
	border-color: var(--ds-blue-200);
	box-shadow: var(--ds-shadow);
	transform: translateY(-2px);
}

.ab-pillar:hover::before { transform: scaleX(1); }

.ab-pillar__icon { margin-bottom: 0.5rem; }

.ab-pillar__text {
	margin: 0;
	line-height: 1.65;
	color: var(--ds-muted);
}

/* ─── Values ──────────────────────────────────────────────────────────── */
.ab-values__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
	align-items: start;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.ab-values .ab-head {
	position: sticky;
	top: 7rem;
	margin-bottom: 0;
}

.ab-values__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-value {
	display: grid;
	align-content: start;
	gap: 0.5rem;
	padding: 1.5rem 0 1.75rem;
	border-top: 1px solid var(--ds-line-strong);
}

.ab-value__num {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--ds-blue);
}

.ab-value__text {
	margin: 0;
	line-height: 1.65;
	color: var(--ds-muted);
}

/* ─── Services ────────────────────────────────────────────────────────── */
.ab-services__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-services__grid > li { display: flex; }

.ab-service,
body.sl-shadcn-ui a.ab-service {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	width: 100%;
	padding: 1.5rem;
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-r-lg);
	background: #fff;
	color: var(--ds-text);
	text-decoration: none;
	transition: border-color 0.25s var(--ds-ease), box-shadow 0.25s var(--ds-ease), transform 0.25s var(--ds-ease);
}

a.ab-service:hover {
	border-color: var(--ds-blue-200);
	box-shadow: var(--ds-shadow);
	transform: translateY(-2px);
	color: var(--ds-text);
}

a.ab-service:focus-visible {
	outline: 2px solid var(--ds-blue);
	outline-offset: 3px;
}

.ab-service .ds-iconbox { margin-bottom: 0.375rem; }

.ab-service__text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--ds-muted);
}

.ab-service__more {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	color: var(--ds-line-strong);
	transition: color 0.2s var(--ds-ease), transform 0.2s var(--ds-ease);
}

a.ab-service:hover .ab-service__more {
	color: var(--ds-blue);
	transform: translateX(3px);
}

.ab-help {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2rem;
	margin-top: 1.5rem;
	padding: 1.5rem 2rem;
	border-radius: var(--ds-r-lg);
	background:
		radial-gradient(30rem 12rem at 100% 50%, rgba(37, 99, 235, 0.35), transparent 70%),
		var(--ds-navy);
	color: var(--ds-on-dark-muted);
}

.ab-help .ds-h5 { color: #fff; }

.ab-help__text {
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
}

/* ─── Process ─────────────────────────────────────────────────────────── */
.ab-process {
	background:
		radial-gradient(40rem 24rem at 50% 0%, rgba(37, 99, 235, 0.3), transparent 60%),
		var(--ds-navy);
	color: var(--ds-on-dark-muted);
}

.ab-process .ds-h2 { color: #fff; }
.ab-process .ds-lead { color: var(--ds-on-dark-muted); }

.ab-process .ab-title strong,
.ds-cta .ab-title strong { color: var(--ds-blue-300); }

.ab-process__steps {
	position: relative;
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-process__steps::before {
	content: "";
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	left: 1.5rem;
	height: 1px;
	background: linear-gradient(90deg, rgba(157, 185, 246, 0.5), rgba(157, 185, 246, 0.12));
}

.ab-step {
	position: relative;
	display: grid;
	align-content: start;
	gap: 0.625rem;
}

.ab-step__num {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 0.75rem;
	border: 1px solid rgba(157, 185, 246, 0.45);
	border-radius: 50%;
	background: var(--ds-navy);
	box-shadow: 0 0 0 6px var(--ds-navy);
	font-size: 0.9375rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #fff;
}

.ab-step .ds-h5 { color: #fff; }

.ab-step__text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--ds-on-dark-muted);
}

/* ─── Team ────────────────────────────────────────────────────────────── */
.ab-team__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-member {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1rem 1.5rem;
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-r-lg);
	background: #fff;
	text-align: center;
}

.ab-member__photo {
	display: grid;
	place-items: center;
	overflow: hidden;
	margin-bottom: 1rem;
	aspect-ratio: 1;
	border-radius: var(--ds-r);
	background: var(--ds-blue-100);
}

.ab-member__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ab-member__initials {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--ds-blue);
}

.ab-member__role {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ds-blue);
}

.ab-member__bio {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--ds-muted);
}

.ab-member__social,
body.sl-shadcn-ui .ab-member__social {
	align-self: center;
	margin-top: 0.75rem;
	color: var(--ds-muted);
}

.ab-member__social:hover { color: var(--ds-blue); }

/* ─── Office ──────────────────────────────────────────────────────────── */
.ab-office__inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
}

.ab-office__list {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-office__row {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	font-weight: 500;
	color: var(--ds-ink);
}

.ab-office__row a,
body.sl-shadcn-ui .ab-office__row a {
	color: inherit;
	text-decoration: none;
}

.ab-office__row a:hover { color: var(--ds-blue); }

.ab-office__panel {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 20rem;
	padding: 2rem;
	border-radius: var(--ds-r-xl);
	background:
		linear-gradient(to right, rgba(157, 185, 246, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
		linear-gradient(to bottom, rgba(157, 185, 246, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
		radial-gradient(24rem 16rem at 50% 40%, rgba(37, 99, 235, 0.35), transparent 70%),
		var(--ds-navy);
	color: var(--ds-on-dark-muted);
}

.ab-office__pin {
	position: absolute;
	top: 42%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background: var(--ds-blue);
	box-shadow: 0 0 0 12px rgba(37, 99, 235, 0.25), 0 0 0 28px rgba(37, 99, 235, 0.1);
	color: #fff;
	transform: translate(-50%, -50%);
}

.ab-office__pin .ab-icon {
	width: 2rem;
	height: 2rem;
}

.ab-office__panel-title {
	position: relative;
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
}

.ab-office__panel-text {
	position: relative;
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
	.ab-services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
	.ab-hero__inner,
	.ab-story__inner,
	.ab-values__inner,
	.ab-office__inner { grid-template-columns: minmax(0, 1fr); }

	.ab-hero__media { max-width: 34rem; }
	.ab-values .ab-head { position: static; }
	.ab-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.ab-process__steps {
		grid-auto-flow: row;
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
		max-width: 36rem;
		margin-inline: auto;
	}

	.ab-process__steps::before {
		top: 1.5rem;
		bottom: 1.5rem;
		left: 1.5rem;
		right: auto;
		width: 1px;
		height: auto;
		background: linear-gradient(180deg, rgba(157, 185, 246, 0.5), rgba(157, 185, 246, 0.12));
	}

	.ab-step {
		grid-template-columns: 3rem minmax(0, 1fr);
		column-gap: 1.25rem;
		row-gap: 0.25rem;
	}

	.ab-step__num {
		grid-row: span 2;
		margin: 0;
	}
}

@media (max-width: 760px) {
	.ab-pillars__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
	.ab-services__grid,
	.ab-values__grid { grid-template-columns: minmax(0, 1fr); }

	.ab-hero__media.has-photo .ab-glance {
		position: relative;
		bottom: auto;
		left: auto;
		width: auto;
		margin: -3rem 1rem 0;
	}

	.ab-story__aside.has-photo .ab-quote { margin: -3rem 1rem 0; }
	.ab-help { padding: 1.5rem; }
	.ab-office__panel { min-height: 16rem; }
}

/* ─── Page ────────────────────────────────────────────────────────────── */
/* Sticky values heading needs a non-clipping main; the page has its own CTA. */
.sl-about-main,
.sl-about-main > .entry-content { overflow: visible; }

body.sl-about-page .softlance-floating-cta { display: none !important; }

.sl-about-main > .entry-content > * { margin-block: 0; }

/* theme.css zeroes padding-top on every post-content child (!important). */
.wp-block-post-content > .ab-hero { padding-top: clamp(2.5rem, 5vw, 4rem) !important; }

.wp-block-post-content > .ab-section,
.wp-block-post-content > .ab-cta { padding-top: var(--ds-section-y) !important; }
