/*
 * Cut Above — site chrome: skip link, header, desktop dropdowns, the mobile
 * drawer (Calgary City Roofing standard, designs/_reference/mobile-menu-pattern.md)
 * and the footer. Ported from the mockup's cut-above.css. Front end only.
 *
 * The header sits ABSOLUTE over the hero photo, as in the design. A page that
 * does not open with the hero block (404, privacy policy) gets
 * .ca-header--solid from header.php, which puts the bar on its own black band.
 */

.ca-skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 90;
	padding: 8px 14px;
	border-radius: 6px;
	background: #fff;
	color: var(--ca-ink);
}
.ca-skip:focus {
	left: 8px;
}

/* ---------- header ---------- */
.ca-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 40;
	padding-top: 14px;
}
.admin-bar .ca-header {
	top: 32px;
}
@media (max-width: 782px) {
	.admin-bar .ca-header {
		top: 46px;
	}
}
.ca-header--solid {
	position: relative;
	padding-bottom: 14px;
	background: var(--ca-ink);
}
.admin-bar .ca-header--solid {
	top: 0;
}
.ca-header__bar {
	display: flex;
	align-items: center;
	gap: 20px;
}

.ca-brand {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	gap: 12px;
	padding: 6px 18px 6px 6px;
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	text-decoration: none;
}
.ca-brand img {
	width: 50px;
	height: 50px;
	padding: 3px;
	border-radius: 50%;
	background: #1b1918;
}
.ca-brand__name {
	display: grid;
	line-height: 1.15;
}
.ca-brand__name b {
	font-size: 0.875rem;
	font-weight: 900;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.ca-brand__name span {
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	white-space: nowrap;
	opacity: 0.9;
}

.ca-nav {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-left: auto;
}
.ca-nav ul {
	display: flex;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ca-nav a {
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
	white-space: nowrap;
}
.ca-nav ul a:hover,
.ca-nav ul a[aria-current="page"],
.ca-nav .ca-nav__group.is-current > a {
	text-decoration: underline;
	text-decoration-color: var(--ca-copper);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}
.ca-nav .ca-btn {
	text-shadow: none;
}
.ca-nav .ca-btn--light {
	color: var(--ca-ink);
}

/* dropdowns: plain text on black, same face as the nav (Mark's call, 2026-11-06) */
.ca-nav__group {
	position: relative;
	display: flex;
	align-items: center;
	gap: 2px;
}
.ca-nav__toggle {
	display: grid;
	place-items: center;
	width: 22px;
	height: 44px;
	margin: -12px -6px -12px 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}
.ca-nav__toggle svg {
	width: 15px;
	height: 15px;
	transition: transform 0.2s ease;
}
.ca-nav__group.is-open .ca-nav__toggle svg {
	transform: rotate(180deg);
}
.ca-nav ul.ca-nav__sub {
	position: absolute;
	top: 100%;
	left: -18px;
	z-index: 5;
	display: block;
	min-width: 190px;
	margin-top: 12px;
	padding: 8px 0;
	border-radius: var(--ca-btn-radius);
	background: var(--ca-ink);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}
/* hover bridge across the gap */
.ca-nav ul.ca-nav__sub::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 14px;
}
.ca-nav__sub a {
	display: block;
	padding: 11px 18px;
	line-height: 1.4;
	text-shadow: none;
}
.ca-nav__group.is-open > .ca-nav__sub {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.15s ease, visibility 0s;
}
@media (hover: hover) {
	.ca-nav__group:hover > .ca-nav__sub {
		visibility: visible;
		opacity: 1;
		transition: opacity 0.15s ease, visibility 0s;
	}
	.ca-nav__group:hover .ca-nav__toggle svg {
		transform: rotate(180deg);
	}
}

/* tablet: tel + quote + Menu; phone: logo + phone icon + Menu */
.ca-header__actions {
	display: none;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}
.ca-header__tel,
.ca-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font: 700 0.9375rem/1 var(--ca-font);
	text-decoration: none;
	cursor: pointer;
}
.ca-header__tel svg,
.ca-burger svg {
	width: 20px;
	height: 20px;
	flex: none;
}
.ca-header__actions .ca-btn {
	min-height: 44px;
}

/* ---------- mobile drawer: the studio standard, in black and copper ---------- */
.ca-no-scroll,
.ca-no-scroll body {
	overflow: hidden;
	overscroll-behavior: none;
}
.ca-no-scroll #derek-chat {
	display: none; /* Derek's launcher would sit on the drawer's phone number */
}
.ca-scrim {
	position: fixed;
	inset: 0;
	z-index: 70;
	background: rgba(16, 14, 12, 0.6);
	opacity: 0;
	transition: opacity 0.3s var(--ca-ease);
}
.ca-scrim.is-open {
	opacity: 1;
}
.ca-mobile {
	position: fixed;
	inset: 0 0 0 auto;
	z-index: 80;
	display: flex;
	flex-direction: column;
	width: min(88vw, 380px);
	background: var(--ca-ink);
	color: #fff;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.35s var(--ca-ease), visibility 0s linear 0.35s;
}
.ca-mobile.is-open {
	transform: none;
	visibility: visible;
	transition: transform 0.35s var(--ca-ease), visibility 0s;
}
.ca-mobile__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 8px 12px 20px;
}
.ca-mobile__head .ca-brand {
	padding: 0;
	background: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.ca-mobile__head .ca-brand img {
	width: 44px;
	height: 44px;
}
.ca-mobile__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}
.ca-mobile__close svg {
	width: 24px;
	height: 24px;
}
.ca-mobile__nav {
	flex: 1;
	min-height: 0;
	padding: 4px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.ca-mobile__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}
.ca-mobile__link[aria-current="page"],
.ca-mobile__sublink[aria-current="page"] {
	color: var(--ca-copper-soft);
}
.ca-mobile__group > summary {
	list-style: none;
	cursor: pointer;
}
.ca-mobile__group > summary::-webkit-details-marker {
	display: none;
}
.ca-mobile__group > summary svg {
	width: 20px;
	height: 20px;
	color: var(--ca-copper-soft);
	transition: transform 0.2s ease;
}
.ca-mobile__group[open] > summary svg {
	transform: rotate(180deg);
}
.ca-mobile__sublink {
	display: block;
	padding: 12px 0 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.78);
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}
.ca-mobile__foot {
	display: grid;
	gap: 14px;
	padding: 18px 20px calc(22px + env(safe-area-inset-bottom));
}
.ca-mobile__tel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}
.ca-mobile__tel svg {
	width: 20px;
	height: 20px;
	color: var(--ca-copper-soft);
}
.ca-mobile__form {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: -8px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9375rem;
	text-underline-offset: 4px;
}

/* ---------- footer: light, so the page ends the way it starts ---------- */
.ca-footer {
	padding: 56px 0 28px;
	border-top: 1px solid var(--ca-rule);
	background: var(--ca-band);
	color: var(--ca-body);
	font-size: 0.9375rem;
}
.ca-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 40px;
}
.ca-footer__logo {
	width: 96px;
	height: 96px;
	padding: 6px;
	border-radius: 50%;
	background: #1b1918;
}
.ca-footer__blurb {
	max-width: 34ch;
	margin-top: 16px;
}
.ca-footer h2 {
	margin-bottom: 12px;
	color: var(--ca-ink);
	font-size: 1rem;
}
.ca-footer ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ca-footer a {
	color: var(--ca-body);
	text-decoration: none;
}
.ca-footer a:hover {
	color: var(--ca-ink);
	text-decoration: underline;
	text-decoration-color: var(--ca-copper);
	text-underline-offset: 4px;
}
.ca-footer a.ca-btn,
.ca-footer a.ca-btn:hover {
	color: #fff;
	text-decoration: none;
}
.ca-footer__cta {
	margin-top: 10px;
}
.ca-social {
	display: flex;
	gap: 10px;
	margin-top: 8px;
}
.ca-social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid #d3cbc2;
	border-radius: 50%;
	color: var(--ca-body);
}
.ca-social a:hover {
	border-color: var(--ca-copper);
	color: var(--ca-ink);
}
.ca-social svg {
	width: 17px;
	height: 17px;
}
.ca-footer__base {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 44px;
	padding-top: 20px;
	border-top: 1px solid var(--ca-rule);
	color: var(--ca-muted);
	font-size: 0.8125rem;
}
.ca-footer__base a {
	color: var(--ca-muted);
}

/* ---------- responsive ---------- */
@media (max-width: 1299px) {
	.ca-nav {
		display: none;
	}
	.ca-header__actions {
		display: flex;
	}
}
@media (max-width: 960px) {
	.ca-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 640px) {
	.ca-header__actions {
		gap: 8px;
	}
	.ca-header__actions .ca-btn,
	.ca-header__tel span {
		display: none;
	}
	.ca-header__tel {
		width: 44px;
		padding: 0;
	}
	.ca-burger {
		padding: 0 14px 0 12px;
	}
}
@media (max-width: 560px) {
	.ca-brand {
		padding-right: 14px;
	}
	.ca-brand img {
		width: 42px;
		height: 42px;
	}
	.ca-brand__name b {
		font-size: 0.8125rem;
	}
	.ca-brand__name span {
		font-size: 0.625rem;
	}
	.ca-footer__grid {
		grid-template-columns: 1fr;
	}
}
/* three things on the phone bar; the badge carries the name */
@media (max-width: 419px) {
	.ca-header__bar .ca-brand__name {
		display: none;
	}
	.ca-header__bar .ca-brand {
		padding: 4px;
	}
}
