/* De Graaf Development: styling that theme.json cannot express. Colours come from the theme.json palette. */

:root {
	--dgd-navy: var(--wp--preset--color--navy-900, #0b1b3a);
	--dgd-blue: var(--wp--preset--color--blue-600, #2457f5);
	--dgd-orange: var(--wp--preset--color--orange-500, #ff7a2f);
	--dgd-muted: var(--wp--preset--color--slate-600, #5f6a84);
	--dgd-border: var(--wp--preset--color--slate-300, #aeb9d3);
	--dgd-radius: var(--wp--custom--radius, 12px);
	--dgd-radius-sm: var(--wp--custom--radius-small, 8px);
	--dgd-shadow: var(--wp--custom--shadow, 0 4px 16px rgba(11, 27, 58, 0.06));
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	overflow-wrap: break-word;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--dgd-blue);
	outline-offset: 2px;
}

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

.dgd-header {
	border-bottom: 1px solid rgba(174, 185, 211, 0.5);
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	position: sticky;
	top: 0;
	z-index: 20;
}

.admin-bar .dgd-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .dgd-header {
		top: 0;
		position: relative;
	}
}

.dgd-header-inner {
	gap: 1rem;
	min-height: 3.5rem;
}

/* Clear space around the logo = the height of the cursor square. */
.dgd-logo {
	display: inline-flex;
	padding: 0.4rem 0;
	line-height: 0;
	flex-shrink: 0;
}

.dgd-logo img {
	width: 168px;
	height: auto;
}

@media (max-width: 380px) {
	.dgd-logo img {
		width: 140px;
	}
}

.dgd-header .wp-block-navigation a {
	text-decoration: none;
	padding: 0.5rem 0.25rem;
}

.dgd-header .wp-block-navigation a:hover,
.dgd-header .wp-block-navigation .current-menu-item > a,
.dgd-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--dgd-orange);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.45em;
}

.dgd-header .wp-block-navigation__responsive-container-open,
.dgd-header .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	gap: 0.5rem;
	font-size: var(--wp--preset--font-size--large);
}

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

.dgd-footer {
	margin-top: 0;
	color: var(--wp--preset--color--slate-300, #aeb9d3);
}

.dgd-footer a {
	color: var(--wp--preset--color--white, #fff);
}

.dgd-footer a:hover {
	color: var(--wp--preset--color--white, #fff);
	text-decoration-color: var(--dgd-orange);
}

.dgd-footer .dgd-footer-heading {
	color: var(--wp--preset--color--white, #fff);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dgd-footer .dgd-logo img {
	width: 190px;
}

.dgd-footer-tagline {
	margin-top: 1rem;
}

.dgd-footer-bottom {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgba(174, 185, 211, 0.25);
	font-size: var(--wp--preset--font-size--small);
}

.dgd-footer-bottom p {
	margin: 0;
}

/* Business details ---------------------------------------------------- */

.dgd-business {
	margin: 0;
	display: grid;
	gap: 0.5rem;
}

.dgd-business > div {
	display: grid;
	grid-template-columns: minmax(8rem, auto) 1fr;
	gap: 0.75rem;
}

.dgd-business dt {
	font-weight: 600;
}

.dgd-business dd {
	margin: 0;
}

@media (max-width: 420px) {
	.dgd-business > div {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

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

.dgd-hero {
	position: relative;
	overflow: hidden;
}

.dgd-hero h1 {
	max-width: 18ch;
}

.dgd-hero .dgd-lead {
	max-width: 46ch;
}

.dgd-cursor::after {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-left: 0.12em;
	border-radius: 0.08em;
	background: var(--dgd-orange);
	vertical-align: baseline;
}

.dgd-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.dgd-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dgd-muted);
}

.has-navy-900-background-color .dgd-eyebrow {
	color: var(--wp--preset--color--slate-300, #aeb9d3);
}

/* Cards ---------------------------------------------------------------- */

.dgd-card {
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid rgba(174, 185, 211, 0.6);
	border-radius: var(--dgd-radius);
	box-shadow: var(--dgd-shadow);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	box-sizing: border-box;
}

.dgd-card > :first-child {
	margin-top: 0;
}

.dgd-card .wp-block-post-featured-image {
	margin: calc(-1 * var(--wp--preset--spacing--40)) calc(-1 * var(--wp--preset--spacing--40)) 1rem;
	border-radius: var(--dgd-radius) var(--dgd-radius) 0 0;
	overflow: hidden;
}

.dgd-card .wp-block-post-title a {
	text-decoration: none;
	color: inherit;
}

.dgd-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

.dgd-card--accent {
	border-top: 4px solid var(--dgd-orange);
}

/* Project status badge (text, never colour only) */
.dgd-project-badge {
	display: inline-block;
	margin: 0;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	background: var(--wp--preset--color--blue-50, #e8eefe);
	color: var(--dgd-navy);
}

.dgd-project-badge:empty {
	display: none;
}

.dgd-backlink {
	font-size: var(--wp--preset--font-size--small);
}

/* Forms (contact form; the transport plugin brings its own copy) -------- */

.dgd-form {
	display: grid;
	gap: 1rem;
	max-width: 36rem;
}

.dgd-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.dgd-field input,
.dgd-field textarea,
.dgd-field select {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 0.65rem 0.8rem;
	font: inherit;
	color: var(--dgd-navy);
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--slate-500, #6b7690);
	border-radius: var(--dgd-radius-sm);
}

.dgd-field.has-error input,
.dgd-field.has-error textarea {
	border-color: var(--wp--custom--danger, #b42318);
	border-width: 2px;
}

.dgd-field-error {
	color: var(--wp--custom--danger, #b42318);
	font-size: var(--wp--preset--font-size--small);
	margin: 0.3rem 0 0;
}

.dgd-field-error::before {
	content: "⚠ ";
}

.dgd-form-note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--dgd-muted);
	margin: 0;
}

.dgd-form button {
	justify-self: start;
	min-height: 48px;
	cursor: pointer;
	border: 0;
}

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

.dgd-notice {
	box-sizing: border-box;
	padding: 0.85rem 1rem;
	border-radius: var(--dgd-radius-sm);
	border-left: 4px solid;
}

.dgd-notice--success {
	background: var(--wp--custom--success-tint, #e6f4ea);
	border-color: var(--wp--custom--success, #176e30);
}

.dgd-notice--error {
	background: var(--wp--custom--danger-tint, #fdecea);
	border-color: var(--wp--custom--danger, #b42318);
}

/* Utility ---------------------------------------------------------------- */

.dgd-placeholder {
	box-sizing: border-box;
	border: 2px dashed var(--dgd-orange);
	border-radius: var(--dgd-radius-sm);
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--white, #fff);
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

.dgd-card :where(h2, h3) {
	hyphens: auto;
}

/* Footer columns are narrow: label above value, so the email address fits. */
.dgd-footer .dgd-business > div {
	grid-template-columns: 1fr;
	gap: 0;
}

.dgd-footer .dgd-business dt {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--slate-300, #aeb9d3);
}

.dgd-footer .dgd-business dd {
	color: var(--wp--preset--color--white, #fff);
}

/* Review fixes (27 Oct 2026) ------------------------------------------- */

/* Keep the orange cursor square on the same line as the last word. */
.dgd-cursor {
	white-space: nowrap;
}

/* Section headings inside page text: a bit smaller, with room above. */
.wp-block-post-content > h2.wp-block-heading {
	font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.wp-block-post-content > :is(h2, h3).wp-block-heading:not(:first-child) {
	margin-top: var(--wp--preset--spacing--50);
}

/* Card titles look the same whatever their heading level. */
.dgd-card :is(h2, h3).wp-block-heading {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	margin-top: 0;
}

/* Project badge in a constrained (centred) column: line up with the text. */
.wp-block-group-is-layout-constrained > .dgd-project-badge,
.is-layout-constrained > .dgd-project-badge {
	display: block;
	width: fit-content;
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 720px)) / 2)) !important;
}

/* Contact card: label above value, so the email address fits the column. */
.dgd-contact-card .dgd-business > div {
	grid-template-columns: 1fr;
	gap: 0;
}

.dgd-contact-card .dgd-business dt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--dgd-muted);
	font-weight: 500;
}

.dgd-contact-card .dgd-business dd {
	font-size: var(--wp--preset--font-size--small);
	overflow-wrap: anywhere;
}

.dgd-contact-card {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}
