/* Base layer shared by every client theme. Uses tokens only. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: var(--lh-body);
	text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--c-primary); text-underline-offset: 0.18em; }
a:hover { color: var(--c-primary-hover); }

h1, h2, h3, h4 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p, ul, ol { margin: 0 0 var(--space-4); }
p { text-wrap: pretty; }

/* Layout helpers */
.container { width: min(100% - 2 * var(--space-5), var(--container)); margin-inline: auto; }
.sec { padding-block: var(--space-8); }
.prose { max-width: var(--measure); }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Accessibility */
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 100; padding: var(--space-2) var(--space-4); background: var(--c-text); color: var(--c-bg); }
.skip-link:focus { top: var(--space-4); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
	min-height: 48px; padding: var(--space-3) var(--space-5);
	border: 2px solid transparent; border-radius: var(--radius-s);
	font: inherit; font-weight: var(--fw-bold); text-decoration: none; cursor: pointer;
	transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn--primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn--primary:hover { background: var(--c-primary-hover); color: var(--c-on-primary); }
.btn--secondary { border-color: currentColor; color: var(--c-text); background: transparent; }
.btn--secondary:hover { background: var(--c-surface); color: var(--c-text); }

/* Header and navigation */
.site-header { border-bottom: 1px solid var(--c-line); background: var(--c-bg); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: 72px; }
.site-header__brand { display: inline-flex; align-items: center; color: var(--c-text); text-decoration: none; font-weight: var(--fw-bold); }
.site-header__brand img { max-height: 48px; width: auto; }
.site-nav__list, .site-footer__list { display: flex; flex-wrap: wrap; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.site-nav__list a { color: var(--c-text); text-decoration: none; }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 48px; height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer;
	}
	.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
		display: block; width: 24px; height: 2px; background: var(--c-text); content: ""; position: relative;
	}
	.nav-toggle__bar::before { position: absolute; top: -7px; }
	.nav-toggle__bar::after { position: absolute; top: 7px; }
	.site-header__inner { flex-wrap: wrap; }
	.site-nav { display: none; width: 100%; padding-bottom: var(--space-4); }
	.site-nav.is-open { display: block; }
	.site-nav__list { flex-direction: column; gap: var(--space-3); }
}

/* Footer */
.site-footer { margin-top: var(--space-8); padding-block: var(--space-7); background: var(--c-surface); color: var(--c-muted); font-size: var(--step--1); }
.site-footer__inner { display: grid; gap: var(--space-4); }
.site-footer__name { color: var(--c-text); font-weight: var(--fw-bold); }
.site-footer a { color: var(--c-text); }

/* Forms */
.enquiry__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); }
.field--full, .enquiry__form .btn { grid-column: 1 / -1; }
.field--hp { position: absolute; left: -9999px; }
label { font-weight: var(--fw-bold); font-size: var(--step--1); }
input, textarea, select {
	width: 100%; min-height: 48px; padding: var(--space-3);
	border: 1px solid var(--c-muted); border-radius: var(--radius-s);
	background: var(--c-bg); color: var(--c-text); font: inherit;
}
.enquiry__notice { padding: var(--space-3) var(--space-4); border-radius: var(--radius-s); border-left: 4px solid; }
.enquiry__notice--ok { border-color: var(--c-success); background: var(--c-surface); }
.enquiry__notice--error { border-color: var(--c-error); background: var(--c-surface); }

/* Client placeholders: deliberately visible on staging */
.ve-placeholder {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-2);
	min-height: 6rem; padding: var(--space-5);
	border: 2px dashed var(--c-placeholder-line); border-radius: var(--radius-m);
	background: var(--c-placeholder-bg); color: var(--c-placeholder-text);
	font-size: var(--step--1); text-align: center;
}
.ve-placeholder__tag { font-weight: var(--fw-bold); }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
