/*
 * Site chrome: header, mobile drawer, footer.
 *
 * Consumes the --cr-* tokens from design-system.css, which is enqueued first.
 * Element IDs/classes are wired to header.php, footer.php and assets/js/theme.js.
 *
 * NOT LOADED IN THE EDITOR — only design-system.css is added via
 * add_editor_style(). Scroll-reveal lives in design-system.css behind `.cr-js`
 * (a class only theme.js adds), so the editor canvas never hides blocks.
 */

/* ---------------------------------------------------------------- header --- */

/* Solid, sticky, always dark (the design's .site-head). theme.js adds
   .is-stuck past 30px, which only deepens the hairline. */
.cr-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--cr-ink);
	color: var(--cr-on-dark);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cr-header.is-stuck {
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

.cr-header__row {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: var(--cr-header-h);
	max-width: var(--cr-max);
	margin-inline: auto;
	padding-inline: var(--cr-gutter);
}

.cr-brand {
	display: block;
	flex: none;
}

.cr-brand img {
	height: 58px;
	width: auto;
}

.cr-nav {
	display: flex;
	gap: 24px;
}

.cr-nav__link {
	padding: 10px 0;
	font: 600 1rem/1 var(--cr-sans);
	color: var(--cr-on-dark-soft);
	text-decoration: none;
}

.cr-nav__link:hover,
.cr-nav__link[aria-current="page"] {
	color: #fff;
}

.cr-header__actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 20px;
}

.cr-header__tel {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 700 1.125rem/1 var(--cr-sans);
	text-decoration: none;
	white-space: nowrap;
}

.cr-header__tel svg {
	width: 18px;
	height: 18px;
	color: var(--cr-red);
}

.cr-header__actions .cr-btn {
	min-height: 46px;
}

.cr-burger {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: 700 1rem var(--cr-sans);
	cursor: pointer;
}

.cr-burger svg {
	width: 24px;
	height: 24px;
}

@media ( max-width: 1100px ) {
	.cr-nav {
		display: none;
	}

	.cr-burger {
		display: flex;
	}
}

@media ( max-width: 640px ) {
	.cr-header__row {
		gap: 12px;
	}

	.cr-brand img {
		height: 48px;
	}

	/* Mobile header = logo + phone + menu only (SETUP §8). The quote button
	   and the number text live in the drawer. */
	.cr-header__actions .cr-btn,
	.cr-header__tel span {
		display: none;
	}
}

/* --------------------------------------------------------- mobile drawer --- */

.cr-scrim {
	position: fixed;
	inset: 0;
	z-index: 70;
	background: rgba(22, 25, 28, 0.6);
	opacity: 0;
	transition: opacity 0.3s var(--cr-ease);
}

.cr-scrim.is-open {
	opacity: 1;
}

.cr-mobile {
	position: fixed;
	inset: 0 0 0 auto;
	z-index: 80;
	width: min(88vw, 380px);
	display: flex;
	flex-direction: column;
	background: var(--cr-ink-2);
	color: #fff;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.35s var(--cr-ease), visibility 0s linear 0.35s;
}

.cr-mobile.is-open {
	transform: none;
	visibility: visible;
	transition: transform 0.35s var(--cr-ease), visibility 0s;
}

.cr-mobile__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px var(--cr-gutter);
}

.cr-mobile__head img {
	height: 44px;
	width: auto;
}

.cr-mobile__close {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.cr-mobile__close svg {
	width: 24px;
	height: 24px;
}

.cr-mobile__nav {
	flex: 1;
	overflow-y: auto;
	padding: 6px var(--cr-gutter);
}

.cr-mobile__link {
	display: block;
	padding: 15px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font: 600 1.125rem var(--cr-sans);
	text-decoration: none;
}

.cr-mobile__foot {
	display: grid;
	gap: 14px;
	padding: 20px var(--cr-gutter) 28px;
}

.cr-mobile__tel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: 700 1.25rem var(--cr-sans);
	text-decoration: none;
}

.cr-mobile__tel svg {
	width: 20px;
	height: 20px;
	color: var(--cr-red);
}

/* ---------------------------------------------------------------- footer --- */

.cr-footer {
	padding: 64px 0 28px;
	background: var(--cr-ink);
	color: var(--cr-on-dark);
}

.cr-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.5fr));
	gap: 32px;
}

.cr-footer__logo {
	width: 170px;
}

.cr-footer__head {
	margin-bottom: 14px;
	font: 700 0.9375rem var(--cr-sans);
	letter-spacing: 0;
	color: var(--cr-on-dark-soft);
}

.cr-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cr-footer__list li {
	padding: 5px 0;
}

.cr-footer a {
	text-decoration: none;
}

.cr-footer a:hover {
	text-decoration: underline;
}

.cr-footer__addr {
	margin-top: 18px;
	font-style: normal;
	line-height: 1.6;
	color: var(--cr-on-dark-soft);
}

.cr-footer__addr a {
	color: #fff;
	font-weight: 700;
}

.cr-footer__base {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-top: 44px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.8125rem;
	color: var(--cr-on-dark-soft);
}

.cr-footer__credits {
	max-width: 70ch;
}

@media ( max-width: 900px ) {
	.cr-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media ( max-width: 520px ) {
	.cr-footer__grid {
		grid-template-columns: 1fr;
	}
}

/* Long-form text pages (privacy policy): readable measure, modest headings. */
.cr-prose .cr-container {
	max-width: 760px;
}

.cr-prose h2 {
	font-size: 1.6em;
	margin: 2em 0 0.5em;
}

.cr-prose ul {
	padding-left: 1.25rem;
}
