/**
 * The Marketing Mosaic: front-end and editor styles.
 *
 * Design tokens live in theme.json; this file covers block style variations,
 * component classes used by the patterns, and a few layout details that
 * theme.json can't express.
 */

:root {
	--tmm-line-on-dark: rgba(255, 255, 255, 0.18);
	--tmm-header-offset: calc(var(--wp-admin--admin-bar--height, 0px) + 72px);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--tmm-header-offset);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Header, main and footer sit flush against each other. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Headings are ink on light backgrounds and inherit inside coloured sections. */
:where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--ink);
}

.has-text-color :is(h1, h2, h3, h4, h5, h6):not(.has-text-color) {
	color: inherit;
}

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

.tmm-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--line-soft);
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   trap the fixed-position mobile menu overlay inside the header. */
.tmm-site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

@media (max-width: 600px) {
	.admin-bar .tmm-site-header {
		top: 0;
	}
}

.tmm-brand .wp-block-image,
.tmm-brand .wp-block-image img {
	margin: 0;
	display: block;
}

.tmm-brand .wp-block-site-title a {
	color: var(--wp--preset--color--ink);
}

.tmm-brand .wp-block-site-title a:hover {
	color: var(--wp--preset--color--ink);
}

.tmm-primary-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	padding: 4px 0;
	border-bottom: 2px solid transparent;
}

.tmm-primary-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--coral);
}

.tmm-primary-nav .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--coral);
}

.tmm-primary-nav .tmm-nav-cta > .wp-block-navigation-item__content {
	padding: 10px 18px;
	border: 1.5px solid var(--wp--preset--color--purple);
	border-radius: var(--wp--custom--radius--button);
	color: var(--wp--preset--color--purple);
}

.tmm-primary-nav .tmm-nav-cta > .wp-block-navigation-item__content:hover,
.tmm-primary-nav .tmm-nav-cta.current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white);
}

.tmm-primary-nav .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--ink);
}

/* Use the burger menu until there's room for the full nav. */
@media (min-width: 600px) and (max-width: 959px) {
	.tmm-primary-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.tmm-primary-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.tmm-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px clamp(20px, 4vw, 48px);
}

.tmm-primary-nav .is-menu-open .wp-block-navigation__container {
	gap: 22px;
}

.tmm-primary-nav .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container) {
	align-items: flex-start;
}

.tmm-primary-nav .is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--white);
	font-size: 22px;
}

.tmm-primary-nav .wp-block-navigation__responsive-container.is-menu-open .tmm-nav-cta > .wp-block-navigation-item__content {
	padding: 10px 18px;
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
	margin-top: 8px;
}

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

.tmm-footer .wp-block-image,
.tmm-footer .wp-block-image img {
	margin: 0;
	display: block;
}

.tmm-footer__bar {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- Type helpers ---------- */

:where(.is-style-eyebrow) {
	font-size: 13px;
}

.is-style-eyebrow {
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.4;
}

.tmm-hero .is-style-eyebrow,
.tmm-page-hero .is-style-eyebrow {
	font-weight: 600;
}

.tmm-label {
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--wp--preset--color--purple);
}

.tmm-measure {
	max-width: 540px;
}

.tmm-page-hero .tmm-measure {
	max-width: 680px;
}

.tmm-measure-sm {
	max-width: 460px;
}

.tmm-measure-title {
	max-width: 860px;
}

.tmm-statement {
	max-width: 1000px;
}

.tmm-section-head {
	max-width: 760px;
}

.tmm-cta-title {
	max-width: 640px;
	line-height: 1.1;
}

.is-style-arrow-link a {
	display: flex;
	flex-direction: column;
	gap: 14px;
	color: var(--wp--preset--color--ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}

.is-style-arrow-link a::before {
	content: "→";
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	font-size: 14px;
}

.is-style-arrow-link a:hover {
	color: var(--wp--preset--color--coral);
}

/* ---------- Home hero ---------- */

.wp-block-group.tmm-hero__grid {
	align-items: center;
}

.tmm-hero__copy {
	max-width: 620px;
}

.wp-block-group.tmm-mosaic {
	display: grid;
	grid-template-columns: repeat(3, clamp(72px, 9vw, 120px));
	gap: clamp(8px, 1vw, 14px);
	justify-content: center;
	padding-block: clamp(24px, 4vw, 56px);
}

.wp-block-group.tmm-mosaic > .tmm-mosaic__tile {
	aspect-ratio: 1;
	margin: 0;
	border-radius: 14px;
}

.tmm-mosaic__tile--slot {
	display: grid;
	place-items: center;
	padding: 8px;
	border: 1.5px dashed rgba(255, 255, 255, 0.35);
	color: var(--wp--preset--color--lilac);
	font-size: 12px;
	letter-spacing: 0.1em;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

.tmm-mosaic__tile--slot p {
	margin: 0;
}

.tmm-hero__tabs {
	border-top: 1px solid var(--tmm-line-on-dark);
}

.tmm-hero__tabs > p {
	margin: 0;
}

.tmm-hero__tabs > p + p {
	border-left: 1px solid var(--tmm-line-on-dark);
}

.tmm-hero__tabs a {
	display: block;
	padding: 22px 20px;
	color: var(--wp--preset--color--haze);
	font-size: 15px;
	line-height: 1.4;
}

.tmm-hero__tabs a:hover,
.tmm-hero__tabs > p:first-child a {
	color: var(--wp--preset--color--white);
}

.tmm-hero__tabs > p:first-child a {
	padding-left: 0;
	border-bottom: 4px solid var(--wp--preset--color--coral);
}

/* ---------- Stats ---------- */

.tmm-stat__value {
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
}

/* ---------- Tiles and cards ---------- */

.is-style-tile {
	border-radius: var(--wp--custom--radius--tile);
	padding: 28px;
}

.is-style-tile-lg {
	border-radius: var(--wp--custom--radius--tile-lg);
	padding: clamp(28px, 4vw, 48px);
}

.tmm-tile-roomy {
	padding: 32px;
}

.tmm-outlined {
	border: 1px solid var(--wp--preset--color--line);
}

.tmm-panel {
	padding: 24px;
	border-radius: 6px;
}

.tmm-panel--sm {
	margin-top: 8px;
	padding: 16px 18px;
	line-height: 1.5;
}

.tmm-panel--sm strong {
	color: var(--wp--preset--color--ink);
}

/* Whole-card links: the link inside .tmm-stretch covers its .tmm-card-link parent. */
.tmm-card-link {
	position: relative;
}

.tmm-stretch a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.tmm-stretch a {
	color: inherit;
}

.tmm-card-link:hover :is(h3, .tmm-stretch a) {
	color: var(--wp--preset--color--coral);
}

.has-aubergine-background-color .tmm-card-link:hover :is(h3, .tmm-stretch a) {
	color: var(--wp--preset--color--lilac);
}

.tmm-stretch a:focus-visible {
	outline: none;
}

.tmm-stretch a:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--coral);
	outline-offset: 4px;
}

.wp-block-group.tmm-card-link > .tmm-push {
	margin-top: auto;
	padding-top: 8px;
}

.tmm-placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	padding: 16px;
	border-radius: 6px 6px 6px 40px;
	background: repeating-linear-gradient(135deg, var(--wp--preset--color--mist) 0 10px, var(--wp--preset--color--line-soft) 10px 20px);
	color: var(--wp--preset--color--muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	text-align: center;
}

.tmm-placeholder p {
	margin: 0;
}

.tmm-placeholder--dark {
	background: repeating-linear-gradient(135deg, #3b1368 0 10px, #43177a 10px 20px);
	color: var(--wp--preset--color--lilac);
}

.tmm-placeholder--square {
	aspect-ratio: 1;
}

/* Brand tile artwork (assets/images/tiles): square, corners baked into the SVG. */
.wp-block-image.tmm-tile-img {
	margin: 0;
}

.wp-block-image.tmm-tile-img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	/* Hairline matching the SVG's 28/400 corner radius, so tiles close in tone to the background keep their edge. */
	border-radius: 7%;
	box-shadow: 0 0 0 1px var(--wp--preset--color--line-soft);
	transition: transform 0.25s ease;
}

.has-aubergine-background-color .wp-block-image.tmm-tile-img img {
	box-shadow: 0 0 0 1px rgba(205, 176, 255, 0.28);
}

.tmm-card-link:hover .tmm-tile-img img {
	transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-image.tmm-tile-img img {
		transition: none;
	}
}

/* ---------- Split layouts ---------- */

.wp-block-group.tmm-split {
	align-items: center;
}

.wp-block-group.tmm-split--top {
	align-items: start;
}

.tmm-portrait {
	width: 100%;
	max-width: 440px;
}

.wp-block-image.tmm-portrait.aligncenter {
	display: block;
	margin-inline: auto;
}

.tmm-portrait--fill {
	max-width: none;
}

.tmm-portrait img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px 8px 8px 120px;
	object-position: 50% 15%;
}

/* ---------- Lists ---------- */

:is(.is-style-plus, .is-style-check, .is-style-plain, .is-style-pills, .is-style-pills-outline, .is-style-pills-violet) {
	margin: 0;
	padding: 0;
	list-style: none;
}

:is(.is-style-plus, .is-style-check) li {
	position: relative;
	padding-left: 22px;
	line-height: 1.5;
}

:is(.is-style-plus, .is-style-check) li + li {
	margin-top: 8px;
}

:is(.is-style-plus, .is-style-check) li::before {
	position: absolute;
	left: 0;
	font-weight: 700;
}

.is-style-plus li::before {
	content: "+";
	color: var(--wp--preset--color--coral);
}

.is-style-check li::before {
	content: "✓";
	color: var(--wp--preset--color--purple);
}

.tmm-list-sm {
	font-size: 15px;
}

.tmm-list-sm li {
	line-height: 1.45;
}

.tmm-divided li {
	padding-bottom: 10px;
	border-bottom: 1px solid var(--wp--preset--color--line-soft);
}

.tmm-divided li + li {
	margin-top: 12px;
}

:is(.is-style-pills, .is-style-pills-outline, .is-style-pills-violet) {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.is-style-pills li {
	padding: 7px 14px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.tmm-pills-mist li {
	background: var(--wp--preset--color--mist);
}

.is-style-pills-outline li {
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.3;
}

.is-style-pills-violet li a {
	display: block;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--wp--preset--color--violet);
	color: var(--wp--preset--color--white);
	font-size: 13px;
	line-height: 1.3;
}

.is-style-pills-violet li a:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--purple);
}

/* ---------- Key / value table rows ---------- */

.wp-block-table.is-style-rows {
	margin-inline: 0;
	margin-bottom: 0;
}

.wp-block-table.is-style-rows table {
	width: 100%;
	border-collapse: collapse;
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: 16px;
}

.wp-block-table.is-style-rows td {
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
}

.wp-block-table.is-style-rows td:first-child {
	padding-right: 16px;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.wp-block-table.is-style-rows td:last-child {
	color: #4d4058;
	text-align: right;
}

.wp-block-table.tmm-rows-soft table,
.wp-block-table.tmm-rows-soft td {
	border-color: var(--wp--preset--color--line-soft);
}

.wp-block-table.tmm-rows-soft td:first-child {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.wp-block-table.tmm-rows-soft td:last-child {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* ---------- Buttons ---------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 13.5px 24.5px;
	border: 1.5px solid var(--wp--preset--color--purple);
	background: transparent;
	color: var(--wp--preset--color--purple);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline-light > .wp-block-button__link {
	padding: 13.5px 24.5px;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline-light > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-light > .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--purple);
}

.wp-block-button.is-style-light > .wp-block-button__link:hover {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-text > .wp-block-button__link {
	padding-left: 4px;
	padding-right: 4px;
	background: transparent;
	color: var(--wp--preset--color--purple);
}

.wp-block-button.is-style-text > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--coral);
}

.wp-block-button.tmm-btn-sm > .wp-block-button__link {
	padding-top: 13px;
	padding-bottom: 13px;
	font-size: 15px;
}

.wp-block-button.tmm-btn-sm:not(.is-style-text) > .wp-block-button__link {
	padding-left: 22px;
	padding-right: 22px;
}

.wp-block-button.tmm-btn-lg > .wp-block-button__link {
	padding: 16px 28px;
}

/* ---------- Services explorer (tabs) ---------- */

.wp-block-group.tmm-explorer {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) 2fr;
	gap: 24px;
	align-items: start;
}

.wp-block-group.tmm-explorer > * {
	margin-block: 0;
	min-width: 0;
}

@media (max-width: 900px) {
	.wp-block-group.tmm-explorer {
		grid-template-columns: 1fr;
	}
}

.tmm-explorer__nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
	counter-reset: tmm-service;
}

@media (min-width: 901px) {
	.tmm-explorer__nav {
		position: sticky;
		top: calc(var(--tmm-header-offset) + 16px);
	}
}

.tmm-explorer__nav li {
	counter-increment: tmm-service;
}

.tmm-explorer__nav a {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 18px 20px;
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

.tmm-explorer__nav a::before {
	content: counter(tmm-service, decimal-leading-zero);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	opacity: 0.7;
}

.tmm-explorer__nav a::after {
	content: "→";
	margin-left: auto;
}

.tmm-explorer__nav a[aria-current="true"] {
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white);
}

.tmm-service {
	scroll-margin-top: calc(var(--tmm-header-offset) + 16px);
}

.js .tmm-explorer:not(.is-ready) .tmm-service + .tmm-service,
.js .tmm-explorer.is-ready .tmm-service:not(.is-active) {
	display: none;
}

/* ---------- FAQs ---------- */

.tmm-faqs {
	border-top: 1px solid var(--wp--preset--color--line);
}

.wp-block-details.is-style-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 0;
	list-style: none;
	cursor: pointer;
	color: var(--wp--preset--color--ink);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
}

.wp-block-details.is-style-faq summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-faq summary::after {
	content: "+";
	flex-shrink: 0;
	color: var(--wp--preset--color--purple);
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
}

.wp-block-details.is-style-faq[open] summary::after {
	content: "−";
}

.wp-block-details.is-style-faq > :not(summary) {
	max-width: 820px;
	margin-top: 0;
	padding-bottom: 24px;
	font-size: 17px;
	line-height: 1.65;
}

/* ---------- Work filters ---------- */

.tmm-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

html:not(.js) .tmm-filters {
	display: none;
}

.tmm-filters a {
	display: block;
	padding: 9px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.tmm-filters a[aria-pressed="true"] {
	border-color: var(--wp--preset--color--purple);
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white);
}

.tmm-work-card[hidden] {
	display: none !important;
}

/* ---------- Sectors ---------- */

.tmm-sectors {
	border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.wp-block-group.tmm-sectors > * {
	padding: 32px 32px 32px 0;
}

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

.tmm-form-card {
	padding: clamp(24px, 4vw, 40px);
}

.tmm-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.tmm-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}

.tmm-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	font-weight: 600;
}

.tmm-form :is(input, select, textarea) {
	width: 100%;
	padding: 13px 14px;
	border: 1px solid #d7cde0;
	border-radius: 4px;
	background: var(--wp--preset--color--white);
	color: #1d1328;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
}

.tmm-form textarea {
	resize: vertical;
}

.tmm-form :is(input, select, textarea):focus {
	border-color: var(--wp--preset--color--purple);
	outline: none;
	box-shadow: 0 0 0 3px rgba(74, 21, 128, 0.15);
}

.tmm-form .wp-element-button {
	align-self: flex-start;
	border: 0;
	cursor: pointer;
}

.tmm-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tmm-form__notice {
	margin: 0 0 8px;
	padding: 12px 14px;
	border-radius: 4px;
	background: #fdecea;
	color: #8a2418;
	font-size: 15px;
}

.tmm-form-sent {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px 0;
}

.tmm-form-sent h2 {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: 30px;
}

.tmm-form-sent p {
	margin: 0;
	font-size: 17px;
}

/* ---------- Posts and plain pages ---------- */

.tmm-prose a:where(:not(.wp-element-button)) {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.tmm-prose :is(h2, h3) {
	margin-top: 1.6em;
}

.tmm-prose h2 {
	font-size: var(--wp--preset--font-size--title-sm);
}

.tmm-card__media img {
	border-radius: 6px 6px 6px 40px;
}

.tmm-card__title a {
	color: var(--wp--preset--color--ink);
}

.tmm-card__title a:hover {
	color: var(--wp--preset--color--coral);
}

.tmm-search .wp-block-search__input {
	padding: 13px 14px;
	border: 1px solid #d7cde0;
	border-radius: 4px;
}
