/**
 * HVACB — Base.
 *
 * Elements, buttons, columns, shared cards, block-style shims and the motion
 * preference. Consolidated from the BASE / BUTTONS / CARDS / MOTION blocks of
 * the old style.css plus the typography and layout strings that lived in
 * hvacb_base_styles() and hvacb_block_style_shims() in functions.php.
 */

/* ---------- Elements ---------- */

body,
button,
input,
select,
textarea,
.editor-styles-wrapper {
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
	color: var(--wp--preset--color--contrast);
	background: #FFFFFF;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
	font-family: inherit;
	font-weight: 700;
	letter-spacing: -0.022em;
	line-height: 1.15;
	text-wrap: balance;
}

h1 { font-size: var(--wp--preset--font-size--display); line-height: 1.12; }
h2 { font-size: var(--wp--preset--font-size--xx-large); }
h3 { font-size: var(--wp--preset--font-size--x-large); letter-spacing: -0.02em; line-height: 1.2; }
h4 { font-size: var(--wp--preset--font-size--large); line-height: 1.25; }

a {
	color: var(--wp--preset--color--accent-1);
}

img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* ---------- Buttons ---------- */

.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 48px;
	padding: 13px 26px;
	border: none;
	border-radius: 999px;
	background-color: var(--wp--preset--color--accent-1);
	color: #FFFFFF;
	font-family: inherit;
	font-weight: 700;
	font-size: clamp(15px, 1.2vw, 16px);
	line-height: 1;
	letter-spacing: -0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: var(--wp--preset--color--accent-2);
	color: #FFFFFF;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--accent-1);
	border: 2px solid var(--wp--preset--color--accent-4);
	padding: 11px 24px;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: #FFFFFF;
	border-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-2);
}

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------- Columns ---------- */

.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40);
}

.wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 781px) {
	.wp-block-columns {
		flex-direction: column;
	}
	.wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ---------- Site title ---------- */

.wp-block-site-title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}

.wp-block-site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

/* ---------- Shared cards ---------- */

.hvacb-card {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 14px;
	height: 100%;
}

.hvacb-card--soft {
	background: var(--wp--preset--color--accent-7);
	border-color: transparent;
}

.hvacb-rule {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--accent-6);
	margin: 0;
}

/* ---------- Block style variations ---------- */
/* Registered in inc/block-styles.php. */

.wp-block-group.is-style-hvacb-card {
	background: #FFFFFF;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 14px;
	height: 100%;
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-hvacb-card-soft {
	background: var(--wp--preset--color--accent-7);
	border: 1px solid transparent;
	border-radius: 14px;
	height: 100%;
	padding: var(--wp--preset--spacing--40);
}

.wp-block-paragraph.is-style-hvacb-eyebrow,
p.is-style-hvacb-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1);
	margin: 0;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}


/* ---------- Global primary CTA ---------- */
/* Canonical HVACB CTA treatment: use this for primary calls-to-action site-wide. */
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-element-button:not(.is-style-outline) {
	background: linear-gradient(105deg, #4B3B8F 0%, #B5573E 48%, #D96A2B 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-element-button:not(.is-style-outline):hover {
	background: linear-gradient(105deg, #372A6E 0%, #9F4C3A 48%, #B4541F 100%);
	color: #FFFFFF;
}


/* ---------- Context-aware CTA variants ---------- */
/* Use light CTA treatment when a section already has a dark/gradient background. */
.hvacb-cta-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.hvacb-cta-on-dark .wp-element-button:not(.is-style-outline){
	background:#FFFFFF;
	color:#4B3B8F;
	box-shadow:0 10px 24px rgba(36,16,71,.16),inset 0 1px 0 rgba(255,255,255,.7);
}

.hvacb-cta-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.hvacb-cta-on-dark .wp-element-button:not(.is-style-outline):hover{
	background:#F7F4FC;
	color:#372A6E;
}

/* Secondary CTA: preserve white text when it sits over a colored hero. */
.hvacb-cta-secondary-on-dark .wp-block-button.is-style-outline .wp-block-button__link{
	background:rgba(255,255,255,.08);
	color:#FFFFFF;
	border-color:rgba(255,255,255,.72);
	box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}

.hvacb-cta-secondary-on-dark .wp-block-button.is-style-outline .wp-block-button__link:hover{
	background:rgba(255,255,255,.16);
	border-color:#FFFFFF;
	color:#FFFFFF;
}
