/* ===========================================================================
   About us page, design canvas "QMS - Om oss" (Oda, 2026-11-11)
   ===========================================================================
   Loaded only on pages whose content uses the `cq-om-` sections (see
   inc/page-om-oss.php). Values follow the canvas and the Certain QMS Web
   Design System: hero with photo, values band, team grid (a swipe carousel
   on phones), company facts, product family tree, and a navy contact card.

   Spacing comes from flex/grid `gap`, so block margins inside the sections
   are reset, as on the partnership page. */

.cq-main {
	/* Same gutter as the header/footer, so the column lines up with them. */
	--cq-om-gutter: var(--wp--style--root--padding-left, clamp(24px, 5.56vw, 80px));
	--cq-om-muted: #3f4947;
	--cq-om-peach: #fff3eb;
	--cq-om-peach-tile: #fedec8;
	--cq-om-rust: #b8471a;
	--cq-om-deep: #001c3a;
	--cq-om-line: #9fb3f6;
}

.wp-block-post-content > .cq-om-s {
	margin-block: 0 !important;
}

.cq-main .cq-om-s :where(h1, h2, h3, p, ul, li, dl, dt, dd, figure, .wp-block-buttons, .wp-block-group) {
	margin: 0 !important;
}

.cq-main .cq-om-s {
	background-color: #ffffff;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	padding-block: var(--cq-section, clamp(64px, 8vw, 112px));
}

.cq-main .cq-om-wrap {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin-inline: auto !important;
	/* 1200px of content, like the header and footer (contentSize). */
	max-width: calc(1200px + 2 * var(--cq-om-gutter));
	padding-inline: var(--cq-om-gutter);
}

.cq-main .cq-om-head {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 760px;
}

.cq-main .cq-om-title {
	color: var(--cq-ink);
	font-size: clamp(34px, 4.4vw, 56px);
	font-weight: 500;
	letter-spacing: -0.022em;
	line-height: 1.08;
	text-wrap: balance;
}

.cq-main .cq-om-h2 {
	color: var(--cq-ink);
	font-size: clamp(28px, 3.2vw, 40px);
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.15;
	text-wrap: balance;
}

.cq-main .cq-om-lead {
	color: var(--cq-om-muted);
	font-size: var(--wp--preset--font-size--medium, 17px);
	line-height: 1.65;
	max-width: 68ch;
}

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

.cq-main .cq-om-hero {
	padding-block-start: var(--cq-crumb-top);
}

.cq-main .cq-om-hero .cq-om-wrap {
	gap: var(--cq-crumb-gap);
}

.cq-main .cq-om-hero .cq-breadcrumb ol {
	margin: 0;
}

.cq-main .cq-om-hero__grid {
	align-items: center;
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr);
}

.cq-main .cq-om-hero__copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.cq-main .cq-om-hero__copy .wp-block-buttons {
	padding-block-start: 8px;
}

.cq-main .cq-om-hero__media img {
	aspect-ratio: 4 / 3;
	border-radius: var(--cq-radius-lg, 14px);
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

/* --- Values ---------------------------------------------------------------- */

.cq-main .cq-om-values {
	background-color: var(--cq-om-peach);
}

.cq-main .cq-om-values__grid {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr);
}

.cq-main .cq-om-value {
	background-color: #ffffff;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-radius-lg, 14px);
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
}

.cq-main .cq-om-value__icon {
	align-items: center;
	background-color: var(--cq-om-peach-tile);
	border-radius: var(--cq-radius-sm, 8px);
	color: var(--cq-om-rust);
	display: flex;
	height: 48px;
	justify-content: center;
	width: 48px;
}

.cq-main .cq-om-value__title {
	color: var(--cq-ink);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
}

.cq-main .cq-om-value p {
	color: var(--cq-om-muted);
	font-size: 16px;
	line-height: 1.6;
}

/* --- Team ------------------------------------------------------------------ */

.cq-main .cq-om-carousel {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cq-main .cq-om-carousel__bar {
	display: none;
}

.cq-main .cq-om-people {
	display: grid;
	gap: 40px 24px;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	list-style: none;
	padding: 0;
}

.cq-main .cq-om-person {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.cq-main .cq-om-person__photo {
	aspect-ratio: 1 / 1;
	background-color: var(--cq-ink);
	border-radius: var(--cq-radius-lg, 14px);
	box-sizing: border-box;
	display: block;
	height: auto;
	margin-block-end: 4px;
	object-fit: cover;
	object-position: 50% 20%;
	width: 100%;
}

.cq-main .cq-om-person__placeholder {
	align-items: center;
	background-color: var(--cq-mist);
	border: 1px dashed var(--cq-blue);
	color: var(--cq-blue);
	display: flex;
	justify-content: center;
}

.cq-main .cq-om-person__name {
	color: var(--cq-ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}

.cq-main .cq-om-person__bio {
	color: var(--cq-om-muted);
	font-size: 14px;
	line-height: 1.45;
}

.cq-main .cq-om-person__link {
	align-items: center;
	align-self: flex-start;
	background-color: var(--cq-om-deep);
	border-radius: var(--cq-radius-sm, 8px);
	color: #ffffff;
	display: inline-flex;
	font-size: 14px;
	font-weight: 600;
	margin-block-start: 4px;
	min-height: 44px;
	padding: 0 16px;
	text-decoration: none;
}

.cq-main .cq-om-person__link:hover {
	background-color: var(--cq-blue);
	color: #ffffff;
}

.cq-main .cq-om-person__link:focus-visible,
.cq-main .cq-om-carousel__btn:focus-visible,
.cq-main .cq-om-tree__link:focus-visible {
	outline: 2px solid var(--cq-blue);
	outline-offset: 2px;
}

/* --- Company facts --------------------------------------------------------- */

.cq-main .cq-om-company {
	border-top: 1px solid var(--cq-border);
}

.cq-main .cq-om-facts {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr);
}

.cq-main .cq-om-fact {
	background-color: #f5f5f5;
	border-radius: var(--cq-radius-lg, 14px);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
}

.cq-main .cq-om-fact dt {
	color: var(--cq-om-muted);
	font-size: 14px;
	line-height: 1.4;
}

.cq-main .cq-om-fact dd {
	color: var(--cq-ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.cq-main .cq-om-fact a {
	color: var(--cq-blue);
}

.cq-main .cq-om-fact a:hover {
	color: var(--cq-navy);
}

/* --- Product family -------------------------------------------------------- */

.cq-main .cq-om-family {
	background-color: var(--cq-mist);
	padding-block: clamp(48px, 6vw, 80px);
}

.cq-main .cq-om-family .cq-om-wrap {
	align-items: center;
	gap: 24px;
}

.cq-main .cq-om-family__title {
	color: var(--cq-ink);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
}

.cq-main .cq-om-tree {
	align-items: center;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.cq-main .cq-om-tree__root {
	align-items: center;
	background-color: var(--cq-navy);
	border-radius: var(--cq-radius-sm, 8px);
	box-sizing: border-box;
	color: #ffffff;
	display: inline-flex;
	font-size: 16px;
	font-weight: 600;
	min-height: 56px;
	padding: 0 24px;
	text-align: center;
}

/* Phone: a vertical chain, one connector above each card. */
.cq-main .cq-om-tree__list {
	display: grid;
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
	list-style: none;
	padding: 0;
	width: 100%;
}

.cq-main .cq-om-tree__item {
	align-items: center;
	display: flex;
	flex-direction: column;
	position: relative;
}

.cq-main .cq-om-tree__item::before {
	background-color: var(--cq-om-line);
	content: "";
	height: 20px;
	width: 2px;
}

.cq-main .cq-om-tree__link {
	align-items: center;
	background-color: #ffffff;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-radius-lg, 14px);
	box-sizing: border-box;
	display: flex;
	height: 88px;
	justify-content: center;
	text-decoration: none;
	transition: background-color .12s var(--cq-ease), border-color .12s var(--cq-ease), box-shadow .12s var(--cq-ease);
	width: 100%;
}

.cq-main .cq-om-tree__link:hover {
	background-color: #f5f8ff;
	border-color: var(--cq-blue);
	box-shadow: 0 4px 12px rgba(6, 12, 49, .10);
}

.cq-main .cq-om-tree__link img {
	display: block;
	height: auto;
	max-height: 34px;
	max-width: 70%;
	width: auto;
}

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

.cq-main .cq-om-cta__box {
	background-color: var(--cq-om-deep);
	border-radius: 20px;
	display: flex;
	flex-wrap: wrap;
	overflow: hidden;
}

.cq-main .cq-om-cta__text {
	box-sizing: border-box;
	display: flex;
	flex: 1 1 100%;
	flex-direction: column;
	gap: 20px;
	justify-content: center;
	min-width: 0;
	padding: 32px 24px;
}

.cq-main .cq-om-cta .cq-om-h2,
.cq-main .cq-om-cta .cq-om-lead {
	color: #ffffff;
}

.cq-main .cq-om-cta .cq-om-lead {
	max-width: 480px;
}

.cq-main .cq-om-cta__actions {
	padding-block-start: 8px;
}

.cq-main .cq-om-cta__actions .wp-block-button__link {
	background-color: #ffffff !important;
	border: 0;
	border-radius: var(--cq-radius-sm, 8px);
	color: var(--cq-om-deep) !important;
	font-size: 17px;
	font-weight: 600;
	padding: 14px 24px;
}

.cq-main .cq-om-cta__actions .wp-block-button__link:hover,
.cq-main .cq-om-cta__actions .wp-block-button__link:focus-visible {
	background-color: var(--cq-mist) !important;
	color: var(--cq-om-deep) !important;
}

.cq-main .cq-om-cta__actions .wp-block-button__link:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.cq-main .cq-om-cta__media {
	flex: 1 1 100%;
	min-height: 240px;
	min-width: 0;
	position: relative;
}

.cq-main .cq-om-cta__media img {
	display: block;
	height: 100%;
	inset: 0;
	object-fit: cover;
	object-position: 40% 40%;
	position: absolute;
	width: 100%;
}

/* --- Phone (< 600px): the team becomes a swipe carousel -------------------- */

@media (max-width: 599px) {
	.cq-main .cq-om-carousel__bar {
		align-items: center;
		display: flex;
		gap: 12px;
		justify-content: space-between;
	}

	.cq-main .cq-om-carousel__hint {
		color: var(--cq-om-muted);
		font-size: 14px;
		line-height: 1.4;
	}

	.cq-main .cq-om-carousel__nav {
		display: flex;
		gap: 8px;
	}

	.cq-main .cq-om-carousel__btn {
		align-items: center;
		background-color: #ffffff;
		border: 1px solid var(--cq-border-strong);
		border-radius: var(--cq-radius-pill, 999px);
		color: var(--cq-ink);
		cursor: pointer;
		display: flex;
		height: 44px;
		justify-content: center;
		padding: 0;
		width: 44px;
	}

	.cq-main .cq-om-carousel__btn:disabled {
		cursor: default;
		opacity: .35;
	}

	.cq-main .cq-om-people {
		display: flex;
		gap: 12px;
		/* !important: beats the section's margin reset, so the list bleeds to the screen edge. */
		margin-inline: calc(-1 * var(--cq-om-gutter)) !important;
		overflow-x: auto;
		padding: 4px var(--cq-om-gutter) 8px;
		scroll-padding-inline-start: var(--cq-om-gutter);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.cq-main .cq-om-people::-webkit-scrollbar {
		display: none;
	}

	.cq-main .cq-om-person {
		flex: 0 0 220px;
		scroll-snap-align: start;
	}

	.cq-main .cq-om-person__bio {
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.cq-main .cq-om-people {
		scroll-behavior: smooth;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cq-main .cq-om-tree__link {
		transition: none;
	}
}

/* --- From 600px ------------------------------------------------------------ */

@media (min-width: 600px) {
	.cq-main .cq-om-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cq-main .cq-om-cta__text {
		padding: 48px 40px;
	}

	.cq-main .cq-om-cta__media {
		min-height: 320px;
	}
}

/* --- Tablet (600–1023px) --------------------------------------------------- */
/* Stacked like the phone, but tighter: a wider hero crop, value cards with
   the icon beside the text, four team columns from 720px, and the contact
   card side by side from 768px. */

@media (min-width: 600px) and (max-width: 1023px) {
	.cq-main .cq-om-hero__media img {
		aspect-ratio: 16 / 9;
	}

	.cq-main .cq-om-values__grid {
		gap: 16px;
	}

	.cq-main .cq-om-value {
		column-gap: 20px;
		display: grid;
		grid-template-columns: 48px minmax(0, 1fr);
		row-gap: 8px;
	}

	.cq-main .cq-om-value__icon {
		grid-row: span 2;
	}

	.cq-main .cq-om-people {
		gap: 32px 20px;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 720px) and (max-width: 1023px) {
	.cq-main .cq-om-people {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.cq-main .cq-om-cta__text {
		flex: 1 1 0;
		padding: 48px 32px;
	}

	.cq-main .cq-om-cta__media {
		flex: 1 1 0;
		min-height: 360px;
	}
}

/* Phone and tablet: the e-mail link gets a full-height tap target. */
@media (max-width: 1023px) {
	.cq-main .cq-om-fact a {
		align-items: center;
		display: inline-flex;
		min-height: 44px;
	}

	.cq-main .cq-om-fact {
		gap: 4px;
	}
}

/* --- From 768px: the product tree branches out ----------------------------- */

@media (min-width: 768px) {
	.cq-main .cq-om-tree__list {
		gap: 24px;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		padding-block-start: 32px;
		position: relative;
	}

	/* Stem from the root down to the rail. */
	.cq-main .cq-om-tree__list::before {
		background-color: var(--cq-om-line);
		content: "";
		height: 32px;
		left: calc(50% - 1px);
		position: absolute;
		top: 0;
		width: 2px;
	}

	.cq-main .cq-om-tree__item {
		padding-block-start: 32px;
	}

	/* Rail: each item draws its share, from its own centre on the ends. */
	.cq-main .cq-om-tree__item::after {
		background-color: var(--cq-om-line);
		content: "";
		height: 2px;
		left: -12px;
		position: absolute;
		right: -12px;
		top: 0;
	}

	.cq-main .cq-om-tree__item:first-child::after {
		left: calc(50% - 1px);
	}

	.cq-main .cq-om-tree__item:last-child::after {
		right: calc(50% - 1px);
	}

	.cq-main .cq-om-tree__item::before {
		height: 32px;
		left: calc(50% - 1px);
		position: absolute;
		top: 0;
	}

	.cq-main .cq-om-tree__link {
		height: 104px;
	}

	.cq-main .cq-om-tree__link img {
		max-height: 40px;
		max-width: 80%;
	}
}

/* --- Desktop (from 1024px) ------------------------------------------------- */

@media (min-width: 1024px) {
	.cq-main .cq-om-hero__grid {
		gap: 64px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cq-main .cq-om-values__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.cq-main .cq-om-value {
		padding: 32px;
	}

	.cq-main .cq-om-cta__text {
		flex: 1 1 480px;
		padding: 80px 64px;
	}

	.cq-main .cq-om-cta__media {
		flex: 1.3 1 520px;
		min-height: 400px;
	}
}
