/**
 * Custom theme CSS overrides and semantic component styles.
 *
 * This file is intentionally plain CSS (no Tailwind/PostCSS build required).
 */

:root {
	--site-content-max: 72rem;
	--site-content-wide: 90rem;
	--link-color: var(--color-brand, #bc6f30);
	--link-color-hover: var(--color-brand-dark, #8f4f1a);
	--link-on-strong: #ffffff;
	--link-on-strong-hover: #f4ece8;
}

/* Front-page guardrail: prevent accidental production-only page scaling. */
html,
body {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.home,
body.home #page,
body.home main,
body.home .site-main,
body.blog,
body.blog #page,
body.blog main,
body.blog .site-main {
	zoom: 1 !important;
	transform: none !important;
	transform-origin: top center !important;
}

/* Front-page edge trim: remove tiny top/bottom visual gaps. */
body.home .header-wrapper,
body.blog .header-wrapper,
body.home #content,
body.blog #content,
body.home .site-main,
body.blog .site-main,
body.home footer,
body.blog footer {
	margin-top: 0 !important;
	padding-top: 0 !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body.home .site-main > *:first-child,
body.blog .site-main > *:first-child {
	margin-top: 0 !important;
}

body.home .site-main > *:last-child,
body.blog .site-main > *:last-child {
	margin-bottom: 0 !important;
}

/* Shared semantic layout hooks */
.site-header,
.site-footer,
.site-main,
.tpl-front-page,
.tpl-home,
.tpl-category,
.tpl-services,
.tpl-about,
.tpl-faq,
.tpl-testimonials,
.tpl-maintenance-guide,
.tpl-plumbing-glossary,
.tpl-useful-downloads,
.tpl-video-tutorials,
.tpl-financing,
.tpl-service-areas,
.tpl-privacy-policy,
.tpl-roi-septic-reminders,
.tpl-roi-status-tracker,
.tpl-roi-live-availability,
.tpl-landing-contact-priority,
.tpl-landing-engineered-septic,
.tpl-landing-failed-septic,
.tpl-landing-water-main-sewer,
.tpl-landing-core-plumbing,
.tpl-landing-emergency,
.tpl-landing,
.tpl-landing-hero,
.tpl-landing-content {
	/* Semantic anchors for future utility-class removals. */
}

/* Keep content links legible on light backgrounds. */
.site-main a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]),
.entry-content a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]) {
	color: var(--link-color);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.site-main a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]):hover,
.site-main a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]):focus,
.entry-content a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]):hover,
.entry-content a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):not([class*="hover:text-"]):focus {
	color: var(--link-color-hover);
}

/* Ensure links remain readable inside strong-color surfaces. */
.site-main :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]),
.entry-content :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]) {
	color: var(--link-on-strong);
}

.site-main :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):hover,
.site-main :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):focus,
.entry-content :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):hover,
.entry-content :is(.bg-primary, .bg-nav, .bg-black, .text-white) a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="text-"]):focus {
	color: var(--link-on-strong-hover);
}

/* Prevent white-on-white hover regressions in light sections. */
.site-main :is(.bg-white, .bg-accent, .bg-gray-50) a[class*="hover:text-white"]:hover,
.site-main :is(.bg-white, .bg-accent, .bg-gray-50) a[class*="hover:text-white"]:focus,
.entry-content :is(.bg-white, .bg-accent, .bg-gray-50) a[class*="hover:text-white"]:hover,
.entry-content :is(.bg-white, .bg-accent, .bg-gray-50) a[class*="hover:text-white"]:focus {
	color: var(--link-color-hover) !important;
}

