/* =====================================================================
   Block content. Maps WordPress block markup (Group, Paragraph, Heading,
   Button, Image, List, Details, Table) onto the site design, on the site
   and in the editor.
   ===================================================================== */

/* Reset block-library spacing so the design's own spacing applies. */
:where(.wp-block-group, .wp-block-buttons, .wp-block-list, .wp-block-details, .wp-block-table),
:where(.wp-block-group, .is-layout-flow, .is-layout-constrained) > * { margin-block: 0; }
.cdm-blocks figure, .editor-styles-wrapper figure { margin: 0; }
.cdm-blocks p, .editor-styles-wrapper p { margin: 0; }
.wp-block-list { padding-left: 0; }

/* ---- Buttons ---- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: .85rem; }
.wp-block-buttons.hm-actions { margin-top: 2rem; }
.hm-head--left .wp-block-buttons { margin-top: 1.5rem; }
.wp-block-button .wp-block-button__link {
	--btn-bg: var(--c-primary); --btn-fg: #fff;
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1;
	padding: .85rem 1.35rem; min-height: 48px; border: 2px solid transparent; border-radius: 999px;
	background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; white-space: nowrap;
	touch-action: manipulation; transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.wp-block-button .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--btn-fg); }
.wp-block-button.is-style-accent .wp-block-button__link { --btn-bg: var(--c-accent); --btn-fg: var(--c-on-accent); }
.wp-block-button.is-style-accent .wp-block-button__link:hover { background: var(--c-accent-dark); }
.wp-block-button.is-style-ghost .wp-block-button__link { --btn-bg: #fff; --btn-fg: var(--c-ink); border-color: var(--c-border); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--c-surface); }
.wp-block-button.is-style-dark .wp-block-button__link { --btn-bg: var(--c-ink); --btn-fg: #fff; }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: #000; }
.wp-block-button.is-lg .wp-block-button__link { min-height: 56px; padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.wp-block-button.is-block, .wp-block-button.is-block .wp-block-button__link { width: 100%; }
.hm-services .wp-block-button.is-style-accent .wp-block-button__link { box-shadow: none; }

/* ---- Lists with a check (or cross) in front ---- */
.hm-facts li, .hm-plan .wp-block-list li, .hm-fit-col li, .pg-case .wp-block-list li { display: flex; gap: .5rem; align-items: flex-start; }
.hm-facts li::before, .hm-plan .wp-block-list li::before, .hm-fit-col li::before, .pg-case .wp-block-list li::before {
	content: ""; flex: none; width: 18px; height: 18px; margin-top: .28rem; background: var(--c-primary);
	-webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat;
}
.hm-audit .hm-facts li::before { background: var(--c-accent); }
.hm-fit-col.is-no li::before { background: var(--c-muted); -webkit-mask-image: var(--i-close); mask-image: var(--i-close); }
.hm-facts { list-style: none; }
.hm-plan .wp-block-list { list-style: none; display: grid; gap: .6rem; margin: 0 0 1.6rem; flex: 1; align-content: start; }
.hm-plan .wp-block-list li { font-size: .98rem; color: var(--c-body); }
.hm-fit-col .wp-block-list, .pg-case .wp-block-list { list-style: none; display: grid; gap: .8rem; }
.hm-days-item .wp-block-list { list-style: none; display: grid; gap: .6rem; }
.hm-days-item .wp-block-list li { position: relative; padding-left: 1.2rem; }
.hm-days-item .wp-block-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent-dark); }

/* ---- Hero ---- */
.hm-hero-copy .hm-lead { margin-bottom: 0; }
.pg-hero-grid > .wp-block-image.pg-hero-media { margin: 0; }

/* ---- Sound familiar / pains ---- */
.hm-pain-item { padding: 1.5rem 0; border-top: 1px solid var(--c-border); }
.hm-pain-item h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.hm-pain-item p { color: var(--c-muted); }

/* ---- Industry cards ---- */
.hm-ind .wp-block-image.hm-ind-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.hm-ind-name { font-size: 1.15rem; margin: 0; }
.hm-ind-name a { color: var(--c-ink); }
.hm-ind-go a { display: inline-flex; align-items: center; gap: .35rem; color: var(--c-primary); font-weight: 700; }
.hm-ind-go a::after, .hm-plan-more a::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; }
.hm-plan-more a { display: inline-flex; align-items: center; gap: .35rem; }
/* The whole card is clickable through its title link. */
.hm-ind, .pg-svc { position: relative; }
.hm-ind-name a::before, .pg-svc-name a::before { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ---- Services (dark) ---- */
.hm-svc .hm-ind-ico { flex: none; width: 42px; height: 42px; border-radius: 11px; background: rgba(255, 106, 85, .14); color: var(--c-accent); margin: 0; }
.hm-svc .hm-ind-ico svg { width: 22px; height: 22px; }
.hm-svc p { color: var(--c-on-dark); }

/* ---- Steps and 90 days ---- */
.hm-step-grid { counter-reset: step; }
.hm-step { counter-increment: step; border-top: 3px solid var(--c-ink); padding-top: 1.25rem; }
.hm-step::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; margin-bottom: .9rem; }
.hm-step h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.hm-step p { color: var(--c-muted); }
.hm-days-item { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.6rem; }
.hm-days-item h3 { font-size: 1.35rem; margin-bottom: .9rem; }
p.hm-days-when { width: fit-content; margin-bottom: 1rem; }

/* ---- Plans ---- */
p.hm-plan-tag { margin: 0; }
p.hm-plan-for { margin: 0 0 1.1rem; }
p.hm-plan-price { margin: 0; }
p.hm-plan-alt { margin: .3rem 0 1.25rem; }
.hm-plan .is-monthly { display: none; }
.is-monthly-view .hm-plan .is-yearly { display: none; }
.is-monthly-view .hm-plan .is-monthly { display: block; }
p.hm-plan-more { margin: 1.75rem 0 0; }

/* ---- Tables ---- */
.wp-block-table.hm-table { background: none; border: 0; border-radius: 0; overflow-x: auto; }
.wp-block-table.hm-table table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.wp-block-table.hm-table th, .wp-block-table.hm-table td { padding: 1rem 1.1rem; text-align: left; vertical-align: top; border: 0; border-top: 1px solid var(--c-border); font-size: 1rem; color: var(--c-muted); }
.wp-block-table.hm-table thead th { border-top: 0; font-family: var(--font-head); font-size: 1.05rem; color: var(--c-ink); background: #fff; }
.wp-block-table.hm-table thead { border: 0; }
.wp-block-table.hm-table td:first-child { font-weight: 700; color: var(--c-ink); width: 30%; }
.hm-table--us-last td:last-child, .hm-table--us-mid td:nth-child(3) { background: var(--tint-sun); color: var(--c-ink); font-weight: 600; }
.wp-block-table.hm-table--us-last thead th:last-child, .wp-block-table.hm-table--us-mid thead th:nth-child(3) { background: var(--c-accent); }
.wp-block-table.pg-table table { min-width: 44rem; }
.wp-block-table.pg-addon-table td:last-child { color: var(--c-primary-dark); font-weight: 700; white-space: nowrap; }
.wp-block-table.pg-addon-table td:first-child { width: auto; }

/* ---- Fit ---- */
.hm-fit-col li { color: var(--c-ink); }
.hm-fit-col.is-no li { color: var(--c-muted); }
.wp-block-image.hm-fit-photo { margin: 0 auto 1.25rem; }

/* ---- Questions (Details blocks) ---- */
.hm-faq-list .wp-block-details { border-top: 1px solid var(--c-border); }
.hm-faq-list .wp-block-details:last-child { border-bottom: 1px solid var(--c-border); }
.hm-faq-list .wp-block-details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--c-ink); min-height: 48px; }
.hm-faq-list .wp-block-details summary::-webkit-details-marker { display: none; }
.hm-faq-list .wp-block-details summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--c-ink); border-bottom: 2px solid var(--c-ink); transform: rotate(45deg); transition: transform .2s var(--ease); margin-right: .3rem; }
.hm-faq-list .wp-block-details[open] summary::after { transform: rotate(-135deg); }
.hm-faq-list .wp-block-details > p { margin: 0 0 1.25rem; color: var(--c-body); max-width: 40rem; }

/* ---- Audit band ---- */
.hm-audit-copy > p { font-size: 1.15rem; }
.hm-audit-copy .hm-facts { margin-top: 1.75rem; }

/* ---- Inner pages ---- */
.pg-svc .hm-ind-ico { margin-bottom: .4rem; }
.pg-svc-name { font-size: 1.12rem; margin: 0; }
.pg-svc-name a { color: var(--c-ink); }
.pg-chips .wp-block-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; }
.pg-chips .wp-block-list li { display: inline-flex; align-items: center; gap: .45rem; background: #fff; color: var(--c-ink); font-weight: 600; font-size: .98rem; padding: .6rem 1rem; border-radius: 999px; }
.pg-chips .wp-block-list li::before { content: ""; width: 16px; height: 16px; background: var(--c-primary); -webkit-mask: var(--i-search) center / contain no-repeat; mask: var(--i-search) center / contain no-repeat; }
.pg-strip-grid > .wp-block-image { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; }
.pg-strip-grid > .wp-block-image:first-child { aspect-ratio: auto; }
.pg-strip-grid img, .pg-collage img, .pg-story-photo img, .pg-case-photo img, .hm-ind-photo img, .hm-fit-photo img, .pg-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-collage > .wp-block-image { border-radius: var(--radius-lg); overflow: hidden; }
.pg-value { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem 1.3rem; }
.pg-value h3 { font-size: 1.2rem; margin: 1rem 0 .4rem; }
.pg-value p { color: var(--c-muted); font-size: .98rem; }
p.pg-fact { color: #fff; font-size: 1.1rem; max-width: 16rem; font-family: var(--font-body); font-weight: 400; line-height: 1.5; letter-spacing: 0; }
p.pg-fact strong { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(3rem, 7vw, 5rem); line-height: 1; color: var(--c-accent); letter-spacing: -.04em; margin-bottom: .5rem; }
p.pg-contact-line { margin-top: 1.75rem; font-size: 1.15rem; color: var(--c-ink); }
p.pg-contact-line a { font-family: var(--font-head); font-weight: 700; color: var(--c-ink); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.pg-case > h2 { font-size: 1.4rem; }
.pg-case > .wp-block-image.pg-case-photo { aspect-ratio: 16 / 10; overflow: hidden; }

@media (max-width: 760px) {
	.wp-block-buttons.hm-actions .wp-block-button { flex: 1 1 100%; }
	.wp-block-buttons.hm-actions .wp-block-button__link, .hm-band .wp-block-button, .hm-band .wp-block-button__link { width: 100%; }
	.pg-strip-grid > .wp-block-image:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}
p.hm-plan-tag { width: fit-content; right: auto; }
/* Wide tables scroll inside their own box, never the whole page. */
.wp-block-table.hm-table { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pg-addons-grid > *, .hm-compare-grid > *, .pg-compare .container > * { min-width: 0; }
@media (max-width: 760px) {
	.wp-block-table.hm-table th, .wp-block-table.hm-table td { padding: .8rem .75rem; font-size: .93rem; }
}
