/*
 * BnR Home Solutions — supplemental styles (Apple-clean direction).
 * theme.json owns the design system. This file carries what global styles
 * cannot express: frosted sticky nav, nav link tone, skip link, small
 * button variant, sticky mobile tap-to-call bar, and motion prefs.
 */

/* ---- Frosted, sticky top nav (Apple-style) ---- */
.bnrhs-header {
	position: sticky;
	top: 0;
	z-index: 9995;
	background: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Logo lockup (SVG mark + wordmark). Swap for a real logo anytime. */
.bnrhs-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
}
.bnrhs-logo__mark { display: block; flex: 0 0 auto; }
.bnrhs-logo__text {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--contrast);
	line-height: 1.05;
	white-space: nowrap;
}
.bnrhs-logo__hl { color: var(--wp--preset--color--primary); }

/* Mobile header: drop the two CTA buttons (the sticky bottom bar already gives
   Call + Free Estimate), so the logo + menu don't get squished and wrap. */
@media (max-width: 781px) {
	.bnrhs-header .wp-block-buttons { display: none; }
	.bnrhs-header .bnrhs-nav { flex: 0 0 auto; }
}

/* Service hero: keep white text legible over any project photo */
.bnrhs-svc-hero h1,
.bnrhs-svc-hero p { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4); }

/* Homepage hero: quick-view service links row along the bottom */
.bnrhs-hero-services {
	max-width: 780px;
	margin: 1.6rem auto 0;
	line-height: 2.1;
	opacity: 0.94;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.bnrhs-hero-services a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
	padding-bottom: 1px;
	white-space: nowrap;
	transition: border-color 0.15s ease;
}
.bnrhs-hero-services a:hover { border-bottom-color: rgba(255, 255, 255, 0.95); }
.bnrhs-hero-services span { opacity: 0.45; margin: 0 0.2rem; }
.bnrhs-logo:hover .bnrhs-logo__text { color: var(--wp--preset--color--contrast); }

/* Header nav links: quiet gray, ink on hover — not link-blue */
.bnrhs-header .bnrhs-nav a,
.bnrhs-header .wp-block-navigation a {
	color: var(--wp--preset--color--contrast);
	font-weight: 400;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.15s ease;
}
.bnrhs-header .bnrhs-nav a:hover,
.bnrhs-header .wp-block-navigation a:hover {
	opacity: 1;
	text-decoration: none;
}

/* Footer nav links inherit the quiet gray too */
.bnrhs-footer-nav a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}
.bnrhs-footer-nav a:hover {
	color: var(--wp--preset--color--primary);
}

/* ---- Compact header buttons ---- */
.bnrhs-btn-sm .wp-block-button__link {
	padding: 0.5rem 1.1rem;
	font-size: 0.9rem;
}
/* Outline (secondary) button: Apple's quiet blue-on-transparent pill */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--primary);
	background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--subtle);
	border-color: var(--wp--preset--color--line);
	color: var(--wp--preset--color--primary-dark);
}

/* ---- Skip to content (accessibility) ---- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 8px 0;
}
.skip-link:focus {
	left: 0;
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---- Visible focus everywhere (WCAG 2.1 AA) ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---- Sticky mobile "tap to call" bar ---- */
.bnrhs-callbar {
	display: none;
}
@media (max-width: 781px) {
	.bnrhs-callbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1px;
		background: var(--wp--preset--color--line);
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
	}
	.bnrhs-callbar a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.4rem;
		padding: 0.9rem 1rem;
		font-weight: 500;
		font-size: 1rem;
		text-decoration: none;
		min-height: 44px; /* touch target */
	}
	.bnrhs-callbar a.is-call {
		background: var(--wp--preset--color--base);
		color: var(--wp--preset--color--primary);
	}
	.bnrhs-callbar a.is-quote {
		background: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--base);
	}
	body {
		padding-bottom: 56px;
	}
}

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