/* Homeline Care: layout and component styles. Colours, fonts and sizes live in theme.json (Site Editor > Styles). */

:root {
	--hl-crimson: var(--wp--preset--color--crimson, #9a1238);
	--hl-crimson-dark: var(--wp--preset--color--crimson-dark, #5e0a24);
	--hl-teal: var(--wp--preset--color--teal, #0f8379);
	--hl-ink: var(--wp--preset--color--ink, #1b2230);
	--hl-slate: var(--wp--preset--color--slate, #4b5465);
	--hl-line: var(--wp--preset--color--line, #dde1e8);
	--hl-paper: var(--wp--preset--color--paper, #f4f6f9);
	--hl-mono: var(--wp--preset--font-family--mono, ui-monospace, Consolas, monospace);
}

body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.hl-main, .hl-main .wp-block-post-content { --wp--style--block-gap: 0; }
.hl-main > *, .wp-block-post-content > .alignfull { margin-block: 0 !important; }

/* Mono micro-labels: the "form field" voice used across the site */
.hl-label, .hl-code, .hl-tag, .hl-crumb {
	font-family: var(--hl-mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
}
.hl-label { color: var(--hl-slate); }
.hl-code { color: var(--hl-teal); }
.hl-value { font-size: 1.2rem; font-weight: 600; margin: 0.15rem 0 0; }
.hl-value a { text-decoration: none; }

/* Top bar and header */
.hl-topbar { background: var(--hl-ink); color: #fff; padding-block: 0.45rem; }
.hl-topbar p { margin: 0; color: #d5d9e1; }
.hl-topbar a { color: #fff; text-decoration: none; }
.hl-topbar a:hover { text-decoration: underline; }
.hl-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .hl-site-header { top: 32px; }
.hl-header { background: #fff; border-bottom: 1px solid var(--hl-line); padding-block: 0.7rem; }
.hl-header .wp-block-navigation { font-weight: 600; gap: 1.6rem; }
.hl-header .wp-block-navigation a { text-decoration: none; color: var(--hl-ink); }
.hl-header .wp-block-navigation a:hover,
.hl-header .current-menu-item > a { color: var(--hl-crimson); }
.hl-nav-cta .wp-block-button__link { padding: 0.65em 1.1em; font-size: 0.95rem; }
@media (max-width: 781px) {
	.hl-topbar .alignwide > p:first-child { display: none; }
	.hl-topbar .alignwide { justify-content: center; }
}

/* Buttons */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: inherit; border: 1.5px solid currentColor;
}
.hl-hero .is-style-outline .wp-block-button__link, .hl-cta .is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.7); }
.hl-hero .is-style-outline .wp-block-button__link:hover, .hl-cta .is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); color: #fff; }
.hl-btn-light .wp-block-button__link { background: #fff; color: var(--hl-crimson-dark); }
.hl-btn-light .wp-block-button__link:hover { background: var(--hl-paper); color: var(--hl-crimson-dark); }

/* Sections */
.hl-section { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.hl-bg-paper { background: var(--hl-paper); }
.hl-bg-ink { background: var(--hl-ink); color: #fff; }
.hl-bg-ink h2, .hl-bg-ink h3 { color: #fff; }
.hl-bg-ink p { color: #cfd5df; }
.hl-sec-head { gap: 2rem; margin-bottom: 2rem; align-items: end; }
.hl-sec-head h2 { margin: 0; max-width: 20ch; }
.hl-sec-head p { margin: 0; color: var(--hl-slate); }
.hl-bg-ink .hl-sec-head p { color: #cfd5df; }
@media (max-width: 781px) { .hl-sec-head { gap: 0.75rem; margin-bottom: 1.25rem; } }

/* Hero */
.hl-hero { background: var(--hl-crimson-dark); color: #fff; padding-block: clamp(2rem, 1.5rem + 3vw, 4rem); }
.hl-hero h1 { color: #fff; max-width: 14ch; margin-top: 0.4rem; }
.hl-hero p { color: #f1dfe5; }
.hl-hero .hl-tag { color: #8fe3da; }
.hl-hero .wp-block-columns { gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hl-hero-img img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; border-radius: 4px; display: block; }
.hl-checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.25); }
.hl-checks li { padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.hl-bg-paper .hl-checks, .hl-section .hl-checks { border-top-color: var(--hl-line); }
.hl-bg-paper .hl-checks li, .hl-section .hl-checks li { border-bottom-color: var(--hl-line); }
.hl-hero .hl-checks { border-top-color: rgba(255,255,255,.25); }
.hl-hero .hl-checks li { border-bottom-color: rgba(255,255,255,.25); }
.hl-checks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; margin-block: 1.25rem; }
@media (max-width: 600px) { .hl-checks-2 { grid-template-columns: 1fr; } }

/* Quick contact bar: a card that overlaps the hero */
.hl-quickbar { background: #fff; padding: 0; border: 0; }
.hl-quickbar .wp-block-columns {
	position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.3fr 1.3fr auto; gap: 0; transform: translateY(-2.4rem);
	background: #fff; border: 1px solid var(--hl-line); border-radius: 4px; box-shadow: 0 10px 28px rgba(27, 34, 48, .14); overflow: hidden;
}
.hl-quickbar .wp-block-column { flex-basis: auto !important; position: relative; padding: 1.15rem 1.5rem 1.15rem 4.25rem; border-left: 1px solid var(--hl-line); min-width: 0; }
.hl-quickbar .wp-block-column:first-child { border-left: 0; }
.hl-quickbar .wp-block-column::before {
	content: ""; position: absolute; left: 1.5rem; top: 50%; width: 2.1rem; height: 2.1rem; transform: translateY(-50%); border-radius: 50%; background: var(--wp--preset--color--teal-light, #e3f4f2);
}
.hl-quickbar .wp-block-column::after {
	content: ""; position: absolute; left: calc(1.5rem + 0.55rem); top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%);
	background: var(--hl-teal); -webkit-mask: var(--hl-ico) center / contain no-repeat; mask: var(--hl-ico) center / contain no-repeat;
}
.hl-quickbar .wp-block-column:nth-child(1) { --hl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 006.6 6.6l2.2-2.2a1 1 0 011-.25 11.4 11.4 0 003.6.6 1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1c0 1.25.2 2.45.6 3.6a1 1 0 01-.25 1z'/%3E%3C/svg%3E"); }
.hl-quickbar .wp-block-column:nth-child(2) { --hl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V6a1 1 0 011-1zm9 7.2L4.5 7v.1L12 12.4 19.5 7.1V7L12 12.2z'/%3E%3C/svg%3E"); }
.hl-quickbar .wp-block-column:nth-child(3) { --hl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 00-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 00-7-7zm0 9.5A2.5 2.5 0 1112 6.5a2.5 2.5 0 010 5z'/%3E%3C/svg%3E"); }
.hl-quickbar .wp-block-column:nth-child(4) { --hl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2V2h-2v2H9V2zm-2 8h14v10H5z'/%3E%3C/svg%3E"); }
.hl-quickbar .hl-label { font-size: 0.75rem; }
.hl-quickbar .hl-value { font-size: 1.02rem; line-height: 1.3; margin: 0.15rem 0 0; }
.hl-quickbar .wp-block-column:last-child { background: var(--hl-crimson); border-left: 0; padding-right: 2rem; }
.hl-quickbar .wp-block-column:last-child::before { background: rgba(255, 255, 255, .18); }
.hl-quickbar .wp-block-column:last-child::after { background: #fff; }
.hl-quickbar .wp-block-column:last-child .hl-label { color: #f6d3dd; }
.hl-quickbar .wp-block-column:last-child .hl-value a { color: #fff; }
@media (max-width: 960px) {
	.hl-quickbar .wp-block-columns { grid-template-columns: 1fr 1fr; transform: translateY(-1.5rem); }
	.hl-quickbar .wp-block-column:nth-child(3) { border-left: 0; }
	.hl-quickbar .wp-block-column:nth-child(n+3) { border-top: 1px solid var(--hl-line); }
	.hl-quickbar .wp-block-column:last-child { border-top: 0; }
}
@media (max-width: 600px) {
	.hl-quickbar .wp-block-columns { grid-template-columns: 1fr; }
	.hl-quickbar .wp-block-column { border-left: 0; border-top: 1px solid var(--hl-line); padding-block: 0.9rem; }
	.hl-quickbar .wp-block-column:first-child { border-top: 0; }
}

/* Services: photo mosaic */
.hl-tiles .wp-block-post-template { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 0.75rem; }
.hl-tiles .wp-block-post-template > li { position: relative; margin: 0; border-radius: 4px; overflow: hidden; background: var(--hl-ink); }
.hl-tiles .wp-block-post-template > li:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.hl-tiles .wp-block-post-template > li:nth-child(6), .hl-tiles .wp-block-post-template > li:nth-child(7) { grid-column: span 2; }
.hl-tiles .wp-block-post-featured-image { position: absolute; inset: 0; margin: 0; }
.hl-tiles .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hl-tiles li:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.hl-tiles li::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(27,34,48,.88), rgba(27,34,48,0) 58%); pointer-events: none; }
.hl-tiles .wp-block-post-title { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 0.9rem 1rem; z-index: 1; font-size: 1.1rem; color: #fff; }
.hl-tiles .wp-block-post-title a { color: #fff; text-decoration: none; }
.hl-tiles .wp-block-post-title a::before { content: ""; position: absolute; inset: -9999px; }
.hl-tiles li:nth-child(1) .wp-block-post-title { font-size: 1.5rem; padding: 1.25rem; }
.hl-tiles .wp-block-post-title a:focus-visible { outline: 3px solid #8fe3da; outline-offset: -3px; }
@media (max-width: 900px) {
	.hl-tiles .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; }
	.hl-tiles .wp-block-post-template > li:nth-child(1) { grid-row: span 2; grid-column: span 2; }
	.hl-tiles .wp-block-post-template > li:nth-child(6), .hl-tiles .wp-block-post-template > li:nth-child(7) { grid-column: span 1; }
}

/* Hero C: light, photo anchored to a crimson block */
.hl-hero-light { background: #fff; color: var(--hl-ink); padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }
.hl-hero-light .wp-block-columns { gap: clamp(1.5rem, 4vw, 3.5rem); }
.hl-hero-light .wp-block-column:first-child { padding-bottom: clamp(3.5rem, 3rem + 2vw, 5rem); }
.hl-hero-light h1 { color: var(--hl-ink); max-width: 14ch; margin-top: 0.4rem; }
.hl-hero-light p { color: var(--hl-slate); }
.hl-hero-light .hl-tag { color: var(--hl-teal); }
.hl-hero-light .is-style-outline .wp-block-button__link { color: var(--hl-ink); border-color: var(--hl-ink); }
.hl-hero-light .is-style-outline .wp-block-button__link:hover { background: var(--hl-ink); color: #fff; }
.hl-hero-photo { position: relative; margin: 0; }
.hl-hero-photo::before { content: ""; position: absolute; left: -1.25rem; bottom: 0; width: 62%; height: 72%; background: var(--hl-crimson-dark); border-radius: 4px 0 0 0; }
.hl-hero-photo img { position: relative; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 25%; border-radius: 4px 4px 0 0; display: block; }
@media (max-width: 781px) { .hl-hero-photo::before { left: 0; } }

/* Settings cells */
.hl-cells { gap: 0; border-top: 1px solid rgba(255,255,255,.25); }
.hl-cells .wp-block-column { padding: 1.1rem 1rem 1.3rem 0; border-right: 1px solid rgba(255,255,255,.18); padding-left: 1rem; }
.hl-cells .wp-block-column:first-child { padding-left: 0; }
.hl-cells .wp-block-column:last-child { border-right: 0; }
.hl-cells .hl-code { color: #8fe3da; }
.hl-cell-title { font-size: 1.1rem; font-weight: 600; margin: 0.4rem 0 0; color: #fff; }
@media (max-width: 781px) {
	.hl-cells .wp-block-column { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding: 0.8rem 0; flex-basis: 100% !important; }
}

/* Steps */
.hl-steps { gap: 0; border-top: 2px solid var(--hl-ink); }
.hl-steps .wp-block-column { padding: 1.1rem 1.4rem 0.5rem 0; }
.hl-steps h3 { margin: 0.4rem 0 0.5rem; }
.hl-steps p { margin: 0; color: var(--hl-slate); }
.hl-steps .hl-code { margin-top: 0.1rem; }
@media (max-width: 781px) { .hl-steps .wp-block-column { flex-basis: 100% !important; border-bottom: 1px solid var(--hl-line); padding-bottom: 1rem; } }

/* Spec rows */
.hl-spec { display: grid; grid-template-columns: minmax(0, 14rem) 1fr; gap: 1.25rem; padding: 1rem 0; border-top: 1px solid var(--hl-line); align-items: baseline; }
.hl-spec:last-child { border-bottom: 1px solid var(--hl-line); }
.hl-spec h3, .hl-spec p { margin: 0; }
.hl-spec p { color: var(--hl-slate); }
.hl-spec .hl-value { color: var(--hl-ink); }
@media (max-width: 781px) { .hl-spec { grid-template-columns: 1fr; gap: 0.25rem; } }
.wp-block-column > .hl-spec + .hl-spec { margin-top: 0; }

/* Quotes */
.hl-quotes { gap: 2rem; margin-top: 1.5rem; }
.hl-quotes .wp-block-column { border-left: 3px solid var(--hl-crimson); padding-left: 1.25rem; }
.hl-quotes h3 { font-size: 1.15rem; }
.hl-quotes p { color: var(--hl-slate); }
.hl-quotes .hl-label { margin-top: 0.5rem; }

/* Page banner */
.hl-banner { background: var(--hl-crimson-dark); color: #fff; padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.hl-banner h1 { color: #fff; margin: 0.35rem 0 0; }
.hl-banner .hl-crumb, .hl-banner .hl-crumb a { color: #8fe3da; text-decoration: none; }
.hl-banner-lead, .hl-banner .wp-block-post-excerpt { color: #f1dfe5; margin: 0.6rem 0 0; max-width: 60ch; }

/* Call to action */
.hl-cta { background: var(--hl-crimson); color: #fff; padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.hl-cta h2 { color: #fff; margin: 0 0 0.5rem; }
.hl-cta p { color: #fbe9ef; margin: 0; }
.hl-cta a:not(.wp-element-button) { color: #fff; }
.hl-cta .wp-block-columns { gap: 2rem; }

/* Panels and forms */
.hl-panel { border: 1px solid var(--hl-line); border-top: 3px solid var(--hl-teal); border-radius: 4px; padding: clamp(1.1rem, 3vw, 1.75rem); background: #fff; }
.hl-panel h3 { margin-top: 0; }
.hl-sticky { position: sticky; top: 7rem; }
.hl-form .hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 600px) { .hl-form .hl-grid { grid-template-columns: 1fr; } }
.hl-form p { margin: 0 0 1rem; }
.hl-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.hl-form input[type="text"], .hl-form input[type="email"], .hl-form input[type="tel"], .hl-form select, .hl-form textarea {
	width: 100%; padding: 0.7rem 0.8rem; border: 1px solid #b8bfcb; border-radius: 4px; font: inherit; background: #fff; color: var(--hl-ink);
}
.hl-form input:focus, .hl-form select:focus, .hl-form textarea:focus { outline: 2px solid var(--hl-teal); outline-offset: 1px; border-color: var(--hl-teal); }
.hl-hp { position: absolute !important; left: -9999px; height: 0; overflow: hidden; }
.hl-fine { font-size: 0.8rem; color: var(--hl-slate); }
.hl-form button { cursor: pointer; border: 0; }
.hl-notice { padding: 0.8rem 1rem; border-radius: 4px; margin: 0 0 1rem; font-weight: 500; }
.hl-notice-ok { background: var(--wp--preset--color--teal-light, #e3f4f2); border-left: 3px solid var(--hl-teal); }
.hl-notice-err { background: #fdecef; border-left: 3px solid var(--hl-crimson); }

/* Footer */
.hl-footer { background: var(--hl-ink); color: #cfd5df; padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem) 1rem; }
.hl-footer h4 { color: #fff; font-size: 0.8rem; font-family: var(--hl-mono); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.8rem; font-weight: 500; }
.hl-footer a { color: #cfd5df; text-decoration: none; }
.hl-footer a:hover { color: #fff; text-decoration: underline; }
.hl-footer p { margin: 0 0 0.7rem; }
.hl-footer-cols { gap: 2rem; }
.hl-plain-list, .hl-footer-services .wp-block-post-template { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.hl-footer-services .wp-block-post-title { margin: 0; font-weight: 400; font-size: 1rem; }
.hl-footer-bar { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; }
.hl-footer-bar p { margin: 0; color: #9aa3b2; }
@media (max-width: 781px) { .hl-footer-cols .wp-block-column { flex-basis: 100% !important; } }

/* Posts */
.hl-posts { display: grid; gap: 0; }
.hl-post { padding: 1.25rem 0; border-bottom: 1px solid var(--hl-line); }
.hl-post h2 { margin: 0 0 0.3rem; font-size: 1.4rem; }
.hl-post h2 a { text-decoration: none; }

/* Fixes after first review */
.hl-stack { grid-template-columns: 1fr; gap: 0.1rem; }
.hl-form input, .hl-form select, .hl-form textarea { box-sizing: border-box; }
.hl-row-body h3 { font-size: 1.25rem; }
.hl-banner .wp-block-post-excerpt, .hl-banner .hl-banner-lead { margin-left: 0 !important; margin-right: 0 !important; }

/* Why-us: balance the photo column against the four points */
.wp-block-columns:has(.hl-spec:not(.hl-stack)) { align-items: stretch; gap: clamp(1.5rem, 4vw, 3.5rem); }
.wp-block-columns:has(.hl-spec:not(.hl-stack)) .wp-block-column:first-child img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wp-block-column:has(> .hl-spec:not(.hl-stack)) { display: flex; flex-direction: column; }
.hl-spec:not(.hl-stack) { flex: 1 1 0; align-items: center; padding-block: 1.1rem; }
.hl-spec:not(.hl-stack) h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }
.hl-spec:not(.hl-stack) p { font-size: 1.02rem; }
@media (max-width: 781px) { .wp-block-column:has(> .hl-spec:not(.hl-stack)) { display: block; } }

/* Mobile header and menu */
@media (max-width: 781px) {
	.hl-header { padding-block: 0.55rem; }
	.hl-header .wp-block-site-logo img { width: 140px; height: auto; }
	.hl-header > .alignwide { gap: 0.6rem; flex-wrap: nowrap; }
	.hl-nav-cta .wp-block-button__link { padding: 0.55em 0.85em; font-size: 0.85rem; white-space: nowrap; }
	.hl-header .wp-block-navigation__responsive-container-open { padding: 0.35rem; }
	.hl-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem 1.25rem 2rem; background: #fff; }
	.hl-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 1.5rem; }
	.hl-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; width: 100%; gap: 0; }
	.hl-header .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--hl-line); }
	.hl-header .is-menu-open .wp-block-navigation-item a { display: block; padding: 1rem 0; font-size: 1.3rem; font-weight: 600; }
	.hl-header .is-menu-open .wp-block-navigation-item.current-menu-item a { color: var(--hl-crimson); }
}
@media (max-width: 781px) {
	.hl-hero-light .wp-block-column:first-child { padding-bottom: 1.75rem; }
	.hl-hero-light { padding-top: 1.75rem; }
	.hl-hero-photo::before { width: 55%; height: 60%; }
}
@media (max-width: 781px) { .hl-sticky { position: static; } }

/* Phone shortcodes */
.hl-phones a { text-decoration: none; }
.hl-phones .hl-sep { color: var(--hl-slate); opacity: .6; margin: 0 .15em; }
.hl-phones-stack { display: grid; gap: 0.15rem; }
.hl-phones-stack .hl-ph { display: block; }
.hl-plabel { font-family: var(--hl-mono); font-size: 0.72rem; letter-spacing: .04em; text-transform: uppercase; opacity: .75; font-weight: 500; margin-right: .35em; }
.hl-topbar .hl-sep { color: #fff; }
.hl-topbar .hl-plabel, .hl-footer .hl-plabel { color: inherit; }
.hl-quickbar .hl-value .hl-phones-stack { font-size: 1.02rem; gap: 0; }
