/*
 * Madson: styles theme.json cannot express.
 * Tokens only: every colour, size and space comes from a --wp--preset or --wp--custom variable.
 */

/* ---------- Base ---------- */

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
}

img {
	max-width: 100%;
}

/* Sections meet edge to edge: no gap between header, main and footer. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

.eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

/* Orange phrases: core's text colour format on a <mark>. WordPress's content
 * filter drops the inline transparent background, so the browser's yellow
 * highlight would show; the colour alone is the design. */
mark.has-inline-color {
	background-color: transparent;
}

/* Visually hidden, still read by screen readers. */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Icons, drawn with CSS masks so link and button text stays plain, editable text. */
:root {
	--madson-icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
	--madson-icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
	--madson-icon-arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M19 12l-7 7-7-7'/%3E%3C/svg%3E");
	--madson-icon-arrow-up-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M7 7h10v10'/%3E%3C/svg%3E");
	--madson-icon-check-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--madson-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
	--madson-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

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

/* Every button carries the small chamfer from the design. */
.wp-block-button__link {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	clip-path: var(--wp--custom--chamfer--small);
	transition: background-color 0.2s, color 0.2s;
}

/* The chamfer would clip the focus outline, so drop it while focused. */
.wp-block-button__link:focus-visible {
	clip-path: none;
}

.has-arrow .wp-block-button__link::after {
	content: "";
	width: 16px;
	height: 16px;
	flex: none;
	background: currentColor;
	-webkit-mask: var(--madson-icon-arrow-right) center / contain no-repeat;
	mask: var(--madson-icon-arrow-right) center / contain no-repeat;
	animation: madson-nudge 1.6s ease-in-out infinite;
}

@keyframes madson-nudge {
	0%,
	100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(4px);
	}
}

/* ---------- Header (ionyx/header) ---------- */

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.site-header {
	height: var(--wp--custom--header-height);
	background: color-mix(in oklab, var(--wp--preset--color--background) 95%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--border);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* The blur would trap the fixed menu overlay inside the 72px header, so drop it while the menu is open. */
.site-header:has(.is-menu-open) {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: var(--wp--preset--color--background);
}

.site-header > .header-inner {
	height: 100%;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

.brand-logo,
.footer-logo {
	margin: 0;
	flex-shrink: 0;
}

.brand-logo img,
.footer-logo img {
	display: block;
	width: auto !important;
	height: 38px !important;
}

/* Main navigation, desktop. */
.main-nav .wp-block-navigation__container {
	gap: 2rem;
}

.main-nav .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--foreground);
	transition: color 0.2s;
}

.main-nav .wp-block-navigation-item__content:hover,
.main-nav .wp-block-navigation-item__content:focus-visible,
.main-nav .current-menu-item > .wp-block-navigation-item__content,
.main-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
}

/* The Contact link is for the mobile menu; the header button covers it on desktop. */
.main-nav .is-mobile-only {
	display: none;
}

/* Services dropdown. */
.main-nav .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	padding-block: var(--wp--preset--spacing--30);
}

/* The chevron is drawn at 12px inside a 24px button, the minimum target size. */
.site-header .main-nav .wp-block-navigation__submenu-icon {
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	margin-left: 0;
	padding: 6px;
	color: var(--wp--preset--color--foreground);
}

.site-header .main-nav .wp-block-navigation__submenu-icon svg {
	width: 12px;
	height: 12px;
}

.site-header .main-nav .wp-block-navigation__submenu-container {
	left: 50%;
	transform: translateX(-50%);
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--foreground);
}

/* 18rem, as in the design. Hidden menus stay zero height, so the width is harmless when closed. */
.site-header .main-nav .has-child .wp-block-navigation__submenu-container,
.site-header .main-nav .wp-block-navigation-submenu__toggle[aria-expanded="true"] + .wp-block-navigation__submenu-container {
	min-width: 18rem;
}

.site-header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.site-header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child {
	border-bottom: 0;
}

.site-header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 0.75rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--foreground);
	transition: background-color 0.2s, color 0.2s;
}

.site-header .main-nav .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
}

.site-header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.site-header .main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
}

/* Actions: phone and primary button. */
.header-actions {
	gap: var(--wp--preset--spacing--20);
	align-items: center;
	flex-shrink: 0;
	white-space: nowrap;
}

.header-call {
	margin: 0;
}

.header-call a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	transition: color 0.2s;
}

.header-call a::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: none;
	background: var(--wp--preset--color--primary);
	-webkit-mask: var(--madson-icon-phone) center / contain no-repeat;
	mask: var(--madson-icon-phone) center / contain no-repeat;
}

.header-call a:hover {
	color: var(--wp--preset--color--primary);
}

.header-cta {
	margin: 0;
}

/* Mobile menu button and panel. */
.main-nav .wp-block-navigation__responsive-container-open,
.main-nav .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	place-items: center;
	color: var(--wp--preset--color--foreground);
}

.main-nav .wp-block-navigation__responsive-container-close {
	display: grid;
	top: 14px;
	right: 0;
}

.site-header .main-nav:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	padding: 0 var(--wp--style--root--padding-right) var(--wp--preset--spacing--20) var(--wp--style--root--padding-left);
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
	--navigation-layout-align: flex-start;
}

.site-header .main-nav:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: calc(var(--wp--custom--header-height) + var(--wp--preset--spacing--20));
	align-items: stretch;
}

.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0;
	width: 100%;
	align-items: stretch;
}

.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	align-items: flex-start;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.is-mobile-only {
	display: flex;
}

.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	width: 100%;
	padding: var(--wp--preset--spacing--20) 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	font-weight: 800;
	letter-spacing: 0;
	color: var(--wp--preset--color--foreground);
}

/* The design's mobile menu lists the top-level pages only. */
.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container,
.site-header .main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
	display: none !important;
}

/* ---------- Footer (ionyx/footer) ---------- */

.site-footer {
	margin-top: 0;
}

.footer-grid {
	gap: 3rem;
	margin-block: 0;
	padding-block: var(--wp--preset--spacing--60);
}

.footer-grid .wp-block-column > * {
	margin-block: 0;
}

.footer-grid .eyebrow {
	color: var(--wp--preset--color--primary);
}

.footer-tagline {
	margin-top: var(--wp--preset--spacing--20) !important;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
}

.footer-abn {
	margin-top: var(--wp--preset--spacing--30) !important;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted-foreground);
}

.footer-abn strong {
	font-weight: 700;
}

.footer-list {
	display: grid;
	gap: 0.5rem;
	margin-top: var(--wp--preset--spacing--20) !important;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.footer-list li {
	margin: 0;
}

.footer-list .is-muted {
	color: var(--wp--preset--color--muted-foreground);
}

/* Core repeats the class on the inner list, so only the nav element gets the margin. */
nav.footer-nav {
	margin-top: var(--wp--preset--spacing--20) !important;
}

ul.footer-nav {
	margin-top: 0 !important;
}

.footer-nav .wp-block-navigation__container {
	gap: 0.5rem;
}

.footer-nav .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--small);
}

.footer-list a,
.footer-nav .wp-block-navigation-item__content {
	transition: color 0.2s;
}

.footer-list a:hover,
.footer-list a:focus-visible,
.footer-nav .wp-block-navigation-item__content:hover,
.footer-nav .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--primary);
}

@media (min-width: 768px) {
	.footer-grid.wp-block-columns {
		display: grid !important;
		grid-template-columns: repeat(4, 1fr);
	}

	.footer-grid > .wp-block-column {
		flex-basis: auto !important;
	}
}

/* Wordmark band: decorative, the images carry empty alt text. */
.name-marquee {
	overflow: hidden;
	margin-block: 0;
	padding-block: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--border);
}

.name-marquee__track {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	width: max-content;
	margin: 0;
	animation: madson-marquee 40s linear infinite;
}

.name-marquee__item {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	flex: none;
	margin: 0 !important;
}

.name-marquee__item img {
	width: auto;
	max-width: none;
	height: 13vw;
}

/* The orange ring between each wordmark. */
.name-marquee__item::after {
	content: "";
	box-sizing: border-box;
	width: 2rem;
	height: 2rem;
	flex: none;
	border: 6px solid var(--wp--preset--color--primary);
	border-radius: 50%;
}

@media (min-width: 768px) {
	.name-marquee__item img {
		height: 8.5vw;
	}

	.name-marquee__item::after {
		width: 3.5rem;
		height: 3.5rem;
	}
}

@keyframes madson-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

.footer-base {
	gap: 0.75rem;
	margin-block: 0;
	padding-block: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted-foreground);
}

.footer-base p {
	margin: 0;
	font-size: var(--wp--preset--font-size--eyebrow);
}

.footer-credit {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	transition: color 0.2s;
}

.footer-credit:hover,
.footer-credit:focus-visible {
	color: var(--wp--preset--color--primary);
}

/* ---------- 404 ---------- */

.not-found {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: var(--wp--preset--spacing--60);
}

.not-found > * {
	margin-block: 0;
}

.not-found .not-found__code {
	font-size: var(--wp--preset--font-size--title);
}

.not-found .not-found__title {
	margin-top: var(--wp--preset--spacing--20);
	font-size: 1.25rem;
}

.not-found .not-found__text {
	margin-top: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted-foreground);
}

.not-found .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--30);
}

/* ---------- Below 1200px: the links move into the menu ---------- */

@media (max-width: 1199px) {
	/* Core collapses the menu at 600px. The design collapses at 1024px, but its
	 * logo, links, phone and button need about 1165px, so collapse at 1200px. */
	.main-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: grid;
	}

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

	/* Menu button sits at the far right, after the phone, as in the design. */
	.site-header .main-nav {
		order: 3;
	}

	.site-header .header-actions {
		order: 2;
		margin-left: auto;
	}

	.site-header > .header-inner {
		gap: var(--wp--preset--spacing--10);
	}
}

/* ---------- Below 768px ---------- */

/* Phones keep the primary action beside the menu button; the header phone link
 * gives way to it (client decision, 7 October 2026). The number stays in the
 * engagement band and footer. */
@media (max-width: 767px) {
	.brand-logo img {
		height: 33px !important;
	}

	.header-call {
		display: none;
	}

	/* Home page only: the hero's "Contact Our Team" panel is the action, so
	 * the header button is dropped and the tap-to-call icon takes its place
	 * (client decisions, 7 October 2026). The number stays readable to screen
	 * readers through the link's label. */
	.home .header-cta {
		display: none;
	}

	.home .header-call {
		display: block;
	}

	.home .header-call a {
		justify-content: center;
		width: 44px;
		height: 44px;
	}

	.home .header-call__number {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

/* ---------- Below 480px: logo, button and menu share one row ---------- */

@media (max-width: 479px) {
	.brand-logo img {
		height: 26px !important;
	}

	.header-cta .wp-block-button__link {
		gap: 0;
		padding-inline: 0.875rem;
		letter-spacing: 0.1em;
	}

	.header-cta.wp-block-buttons .has-arrow .wp-block-button__link::after {
		display: none;
	}
}

@media (max-width: 359px) {
	.brand-logo img {
		height: 20px !important;
	}
}

/* ---------- Below 640px ---------- */

@media (max-width: 639px) {
	.footer-base {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------- Reduced motion ---------- */

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

	.has-arrow .wp-block-button__link::after,
	.name-marquee__track {
		animation: none;
	}

	.wp-block-button__link,
	.main-nav .wp-block-navigation-item__content,
	.footer-list a,
	.footer-credit {
		transition: none;
	}
}
