/* Core layout: header, navigation, buttons, grids, footer.
   Loaded before the other theme stylesheets. Colours come from the inline :root variables in inc/colors.php. */

:root {
	--font-display: 'Barlow Condensed', 'DM Sans', system-ui, sans-serif;
	--font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.18);
	--shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.24);
	--header-h: 4.5rem;
	--vr-mobile-h: 4.25rem;
	--color-bg: #3F404A;
	--color-bg-alt: #26628A;
	--color-bg-deep: #353640;
	--color-surface: rgba(255, 255, 255, 0.06);
	--color-text: #D9F1FA;
	--color-text-muted: #6BC5D3;
	--color-border: rgba(148, 163, 184, 0.14);
	--color-accent: #6BC5D3;
	--color-accent-light: #D9F1FA;
	--color-highlight: #F15942;
	--color-highlight-soft: rgba(241, 89, 66, 0.15);
	--cta-grad-start: #F15942;
	--cta-grad-end: #d64d37;
	--cta-glow: rgba(241, 89, 66, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
	background-image: radial-gradient(ellipse at top, var(--color-highlight-soft), transparent 60%);
	background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-accent); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.skip-link:focus {
	position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000;
	width: auto; height: auto; clip: auto; padding: 0.5rem 1rem;
	background: var(--color-bg); color: var(--color-text);
}

.container {
	width: min(1180px, calc(100% - 2rem));
	margin-inline: auto;
}

.container--narrow { width: min(760px, calc(100% - 2rem)); margin-inline: auto; }

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--alt { background: var(--color-bg-alt); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-bg-deep);
	border-bottom: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--header-h);
	padding-block: 0.5rem;
}

.site-logo {
	display: inline-flex;
	align-items: center;
	color: var(--color-text);
	text-decoration: none;
	font-family: var(--font-display);
	font-weight: 800;
}

.site-logo__stack { display: inline-flex; align-items: center; gap: 0.5rem; }
.site-logo__img { width: auto; max-height: 3.25rem; }
.site-logo__text { font-size: 1.15rem; letter-spacing: 0.02em; }
.site-logo--footer .site-logo__img { max-height: 4rem; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.5rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--color-text);
	border-radius: 2px;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.site-nav > ul,
.site-nav__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	display: inline-block;
	padding: 0.4rem 0.2rem;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 600;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible { color: var(--color-highlight); }

.site-nav__cta { display: flex; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.8rem 1.25rem;
	border-radius: var(--radius-sm);
	border: 2px solid transparent;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
	background: linear-gradient(135deg, var(--cta-grad-start), var(--cta-grad-end));
	color: #fff;
	box-shadow: 0 8px 20px var(--cta-glow);
}

.btn--outline {
	background: transparent;
	color: var(--color-text);
	border-color: var(--color-accent);
}

.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.9rem; }

.vr-icon { flex: 0 0 auto; }

/* ---------- Typography and content ---------- */
.eyebrow {
	margin: 0 0 0.4rem;
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-highlight);
	font-size: 0.85rem;
}

.section-header { margin-bottom: 2rem; text-align: center; }

.section-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	line-height: 1.1;
	color: var(--color-text);
}

.section-lead { margin: 0 auto; max-width: 60ch; color: var(--color-text-muted); }

.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); line-height: 1.15; }
.prose h2 { font-size: 1.8rem; margin-top: 2rem; }
.prose p, .entry-content p { margin: 0 0 1rem; }

/* ---------- Cards ---------- */
.cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25rem;
}

.card {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.card__title {
	margin: 0 0 0.5rem;
	font-family: var(--font-display);
	font-size: 1.35rem;
	color: var(--color-text);
}

.card__text { margin: 0; color: var(--color-text-muted); }

.card--service .vr-service-card__body { flex: 1; }

.vr-service-card__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.vr-service-card__link { margin-left: auto; font-weight: 600; }

/* ---------- FAQ ---------- */
.vr-faq-accordion { max-width: 820px; margin: 0 auto; display: grid; gap: 0.75rem; }

.vr-faq-item {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

.vr-faq-item__summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	cursor: pointer;
	font-weight: 700;
	list-style: none;
}

.vr-faq-item__summary::-webkit-details-marker { display: none; }

.vr-faq-item__icon::before { content: '+'; font-size: 1.4rem; line-height: 1; }
.vr-faq-item[open] .vr-faq-item__icon::before { content: '\2212'; }

.vr-faq-item__panel { padding: 0 1.25rem 1rem; }
.vr-faq-item__answer { margin: 0; color: var(--color-text-muted); }

/* ---------- Closing call to action ---------- */
.cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: linear-gradient(90deg, var(--color-highlight-soft), var(--color-surface));
}

.cta__title { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: clamp(1.7rem, 3.5vw, 2.2rem); }
.cta__text { margin: 0; color: var(--color-text-muted); max-width: 60ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--color-bg-deep);
	border-top: 1px solid var(--color-border);
	padding: 3rem 0 2rem;
	margin-top: 3rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
}

.site-footer__desc,
.site-footer__address { color: var(--color-text-muted); }

.site-footer__heading {
	margin: 0 0 0.75rem;
	font-family: var(--font-display);
	font-size: 1.2rem;
	color: var(--color-text);
}

.site-footer__links,
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer__links a,
.site-footer__contact a { color: var(--color-text-muted); text-decoration: none; }
.site-footer__links a:hover,
.site-footer__contact a:hover { color: var(--color-highlight); }

.site-footer__bottom {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

/* ---------- Mobile bar and WhatsApp button ---------- */
.vr-mobile-bar { display: none; }

.vr-wa-fab {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 90;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: #25D366;
	box-shadow: var(--shadow-md);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
	.nav-toggle { display: inline-flex; }

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
		padding: 1rem;
		background: var(--color-bg-deep);
		border-bottom: 1px solid var(--color-border);
		box-shadow: var(--shadow-lg);
	}

	.site-nav.is-open { display: flex; }

	.site-nav > ul,
	.site-nav__list { flex-direction: column; align-items: stretch; }

	.site-header { position: sticky; }
	.site-header__inner { position: relative; }

	.vr-mobile-bar {
		display: flex;
		gap: 0.5rem;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 95;
		padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
		background: var(--color-bg-deep);
		border-top: 1px solid var(--color-border);
	}

	.vr-mobile-bar__quote,
	.vr-mobile-bar__wa { flex: 1; }

	.vr-wa-fab { display: none; }

	.vr-service-card__link { margin-left: 0; }
}

/* ---------- "Get a quote" WhatsApp form ---------- */
.vr-quote { margin-top: 1.5rem; }

.vr-quote[hidden] { display: none; }

.vr-quote__form {
	background: var(--color-bg-deep);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--shadow-sm);
}

.vr-quote__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.vr-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.vr-field--wide { grid-column: 1 / -1; }

.vr-field span {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--color-text);
}

.vr-field input,
.vr-field select,
.vr-field textarea {
	width: 100%;
	font: inherit;
	padding: 0.7rem 0.85rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
}

.vr-field textarea { resize: vertical; min-height: 5rem; }

.vr-field input:focus,
.vr-field select:focus,
.vr-field textarea:focus {
	outline: 3px solid var(--color-highlight-soft);
	border-color: var(--color-accent);
}

.vr-field input::placeholder,
.vr-field textarea::placeholder { color: var(--color-text-muted); opacity: 0.8; }

.vr-quote__hint {
	margin: 1rem 0 0;
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.vr-quote__error {
	margin: 1rem 0 0;
	font-weight: 600;
	color: #ffb4a8;
}

.vr-quote__error[hidden] { display: none; }

.vr-quote__submit {
	width: 100%;
	margin-top: 1rem;
}

/* Inside the white .form-embed box used by the old pages */
.form-embed .vr-quote {
	--color-text: #17202a;
	--color-text-muted: #4d5962;
	--color-border: #dde2ea;
	--color-bg-deep: #ffffff;
	--color-surface: #f8f9fb;
}

.form-embed .vr-quote__form {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

@media (max-width: 640px) {
	.vr-quote__grid { grid-template-columns: 1fr; }
}

/* ---------- Light content with a dark header (motorway palette and other light palettes) ---------- */
html body.vr-brand.vr-light-theme {
	background: var(--color-bg);
	background-image: none;
}

html body.vr-brand.vr-light-theme .section:not(.section--alt) {
	background: transparent;
}

html body.vr-brand.vr-light-theme .section--alt {
	background: var(--color-bg-alt);
}

body.vr-brand.vr-light-theme .card,
body.vr-brand.vr-light-theme .cta__inner {
	background: var(--color-bg-alt);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.vr-brand.vr-light-theme .section-title,
body.vr-brand.vr-light-theme .card__title,
body.vr-brand.vr-light-theme .cta__title { color: var(--color-accent); }

body.vr-brand.vr-light-theme .card__text,
body.vr-brand.vr-light-theme .section-lead { color: var(--color-text-muted); }

/* Dark header keeps light text, whatever the content colours are */
body.vr-brand.vr-light-theme .site-header,
body.vr-brand.vr-light-theme .site-header .site-logo,
body.vr-brand.vr-light-theme .site-header .site-nav__list a {
	color: #f8fafc;
}

body.vr-brand.vr-light-theme .site-header .site-nav__list a:hover { color: var(--color-highlight); }

body.vr-brand.vr-light-theme .site-header .nav-toggle__bar { background: #f8fafc; }

body.vr-brand.vr-light-theme .site-header .nav-toggle {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.25);
}

body.vr-brand.vr-light-theme .site-header .btn--primary { color: #ffffff; }

/* Mobile bar sits on the dark header colour */
body.vr-brand.vr-light-theme .vr-mobile-bar,
body.vr-brand.vr-light-theme .vr-mobile-bar { background: var(--color-bg-deep); }

body.vr-brand.vr-light-theme .vr-mobile-bar .btn--outline {
	color: #f8fafc;
	border-color: rgba(248, 250, 252, 0.45);
}

body.vr-brand.vr-light-theme .vr-mobile-bar .btn--primary { color: #ffffff; }
