/*
Theme Name: Hudson Survey
Theme URI: https://hudsonsurvey.com/
Author: Hudson Survey Company, LLC
Description: Answer-first block theme for Hudson Survey Company, licensed land surveying in North and Central New Jersey.
Version: 2.0.8
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hudson-survey
*/

:root {
	--hs-ink: var(--wp--preset--color--ink);
	--hs-slate: var(--wp--preset--color--slate);
	--hs-teal: var(--wp--preset--color--teal);
	--hs-line: var(--wp--preset--color--line);
	--hs-paper: var(--wp--preset--color--paper);
	--hs-radius: 10px;
	--hs-shadow: 0 2px 4px rgba(21, 33, 43, .04), 0 12px 32px -18px rgba(21, 33, 43, .28);
}

html { scroll-behavior: smooth; }
:target { scroll-margin-top: 96px; }
::selection { background: var(--wp--preset--color--mint); color: var(--hs-ink); }
a { text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 3px solid var(--hs-teal); outline-offset: 3px; border-radius: 4px;
}
img { height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group { margin-block-start: 0; }

/* ---------- Shared ---------- */
.hs-section { padding-block: var(--wp--preset--spacing--60); }
.hs-paper { background: var(--hs-paper); }
.hs-rule-top { border-top: 1px solid var(--hs-line); }
.hs-rule-bottom { border-bottom: 1px solid var(--hs-line); }
.hs-lead { font-size: var(--wp--preset--font-size--large); color: var(--hs-slate); max-width: 40rem; }
.hs-muted { color: var(--hs-slate); }
.hs-small { font-size: var(--wp--preset--font-size--small); }
.hs-split { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.hs-split > * { margin: 0 !important; }
.hs-media img { width: 100%; border-radius: 8px; display: block; }
.hs-media figcaption { font-size: .875rem; color: var(--hs-slate); margin-top: .5rem; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; color: var(--hs-ink); padding: calc(.8rem - 2px) calc(1.4rem - 2px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--hs-ink); color: #fff; border-color: var(--hs-ink); }

/* ---------- Header ---------- */
.wp-site-blocks > .hs-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > .hs-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > .hs-site-header { top: 0; } }
.hs-header { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--hs-line); padding-block: .9rem; }
.hs-brand .wp-block-site-logo img { max-height: 52px; width: auto; }
.hs-brand .wp-block-site-title { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; margin: 0; }
.hs-brand .wp-block-site-title a { color: var(--hs-ink); text-decoration: none; }
.wp-custom-logo .hs-brand .wp-block-site-title { display: none; }
.hs-nav { font-weight: 500; font-size: 1rem; }
.hs-nav .wp-block-navigation-item__content { color: var(--hs-ink); text-decoration: none; }
.hs-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover { color: var(--hs-teal); text-decoration: underline; }
.hs-nav .wp-block-navigation__submenu-container { border: 1px solid var(--hs-line) !important; border-radius: var(--hs-radius); box-shadow: var(--hs-shadow); padding: .4rem !important; min-width: 240px !important; }
.hs-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .5rem .75rem !important; border-radius: 6px; }
.hs-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--hs-paper); }
.hs-header-actions { gap: 1.25rem; }
.hs-header-phone { margin: 0; font-weight: 700; white-space: nowrap; }
.hs-header-phone a { color: var(--hs-ink); text-decoration: none; }
.hs-header-actions .wp-block-button__link { padding: .65rem 1.1rem; }
@media (max-width: 1100px) { .hs-header-phone { display: none; } }
@media (max-width: 600px) { .hs-header-actions .wp-block-buttons { display: none; } }
.hs-nav .wp-block-navigation__responsive-container.is-menu-open { padding-top: 4.5rem; }
.hs-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.15rem; }

/* ---------- Finder (homepage hero) ---------- */
.hs-finder { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 6vw, 4.5rem); }
.hs-finder h1 { max-width: 18em; margin-bottom: .75rem; }
.hs-finder .hs-lead { margin-top: 0; margin-bottom: 2rem; }
.hs-finder-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.75rem; align-items: start; }
@media (max-width: 900px) { .hs-finder-grid { grid-template-columns: 1fr; } }
.hs-finder-grid > * { margin: 0 !important; }
.hs-finder-options { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 420px) { .hs-finder-options { grid-template-columns: 1fr; } }
.hs-finder-options li { margin: 0; }
.hs-finder-options a {
	display: flex; align-items: center; min-height: 56px; box-sizing: border-box; padding: .75rem 1rem;
	background: #fff; color: var(--hs-ink); border: 1.5px solid #C9D2D9; border-radius: 8px;
	font-weight: 500; font-size: 1rem; line-height: 1.3; text-decoration: none;
}
.hs-finder-options a:hover { border-color: var(--hs-teal); }
.hs-finder-options a[aria-current="true"] { background: var(--hs-teal); color: #fff; border-color: var(--hs-teal); font-weight: 700; }
.hs-finder-note { margin-top: 1.25rem !important; font-size: 1rem; color: var(--hs-slate); }
.hs-finder-note a { font-weight: 700; }
.hs-answers { display: grid; gap: 1.25rem; }
.hs-answers > * { margin: 0 !important; }
.hs-answer { background: #fff; border: 1px solid var(--hs-line); border-radius: var(--hs-radius); box-shadow: var(--hs-shadow); overflow: hidden; padding: 0 1.75rem 1.75rem; }
.hs-answer > * { margin-block: 0; }
.hs-answer > * + * { margin-top: .75rem !important; }
.hs-answer .hs-answer-img { margin: 0 -1.75rem 1.25rem !important; border-bottom: 1px solid var(--hs-line); }
.hs-answer .hs-answer-img img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; background: #E8EDF0; }
.hs-answer-reason { font-size: .95rem; color: var(--hs-slate); }
.hs-answer h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; }
.hs-answer h2:focus { outline: none; }
.hs-answer dl, .hs-answer .hs-facts { margin: 1rem 0 0; }
.hs-facts p { margin: .6rem 0 0; color: var(--hs-slate); }
.hs-facts strong { color: var(--hs-ink); display: block; font-size: 1rem; }
.hs-answer .wp-block-buttons { margin-top: 1.25rem !important; align-items: center; gap: 1rem; }
.hs-answer .hs-text-link .wp-block-button__link { background: none; color: var(--hs-teal); padding: 0; text-decoration: underline; font-weight: 600; }
.hs-answer .hs-text-link .wp-block-button__link:hover { color: var(--hs-ink); background: none; }
.hs-finder.is-ready .hs-answer[hidden] { display: none; }

/* Reviews badge */
.hs-reviews { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; margin-top: 1rem !important; }
.hs-reviews a { color: var(--hs-ink); }
.hs-stars { color: #B7791F; letter-spacing: .05em; }

/* ---------- Facts table ---------- */
.hs-glance { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--hs-line); margin-top: 1.5rem !important; }
.hs-glance > * { margin: 0 !important; padding: 1.1rem 1.25rem 1.1rem 0; border-bottom: 1px solid var(--hs-line); }
.hs-glance p { margin: 0; }
.hs-glance .hs-k { font-size: .95rem; color: var(--hs-slate); }
.hs-glance .hs-v { font-weight: 600; margin-top: .15rem; }

/* ---------- FAQ ---------- */
.hs-faq-wrap { max-width: 820px; margin-inline: auto; }
.hs-faq { border-bottom: 1px solid var(--hs-line); margin: 0 !important; }
.hs-faq:first-of-type { border-top: 1px solid var(--hs-line); }
.hs-faq summary { cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; font-weight: 700; font-size: 1.125rem; list-style: none; }
.hs-faq summary::-webkit-details-marker { display: none; }
.hs-faq summary::after { content: "+"; position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--hs-teal); }
.hs-faq[open] summary::after { content: "\2212"; }
.hs-faq > :not(summary) { margin: 0 0 1.1rem !important; color: #2C3A44; max-width: 44rem; }

/* ---------- Areas ---------- */
.hs-areas { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.hs-areas li { margin: 0; }
.hs-areas a { display: block; padding: .7rem .9rem; border: 1px solid var(--hs-line); border-radius: 8px; background: #fff; color: var(--hs-ink); text-decoration: none; font-weight: 600; }
.hs-areas a:hover { border-color: var(--hs-teal); color: var(--hs-teal); }

/* ---------- Quote ---------- */
.hs-quote { background: var(--hs-ink); color: #fff; }
.hs-quote h2, .hs-quote h3 { color: #fff; }
.hs-quote p { color: #D5DCE1; }
.hs-quote a { color: #fff; }
.hs-quote-grid { display: grid !important; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .hs-quote-grid { grid-template-columns: 1fr; } }
.hs-quote-grid > * { margin: 0 !important; }
.hs-contact { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; font-weight: 600; }
.hs-form-card { background: #fff; color: var(--hs-ink); border-radius: 12px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.hs-form-card h3 { color: var(--hs-ink) !important; margin-top: 0; }
.hs-form-card .grunion-field-label, .hs-form-card label { font-weight: 600; font-size: .95rem; color: var(--hs-ink); }
.hs-form-card input[type="text"], .hs-form-card input[type="email"], .hs-form-card input[type="tel"], .hs-form-card textarea, .hs-form-card select {
	width: 100%; max-width: 100%; box-sizing: border-box; border: 1.5px solid #C9D2D9 !important; border-radius: 6px !important; padding: .7rem .85rem !important;
	font: inherit; background: #fff; color: var(--hs-ink);
}
.hs-form-card input:focus, .hs-form-card textarea:focus, .hs-form-card select:focus { border-color: var(--hs-teal) !important; }
.hs-form-card .wp-block-button:has(button[type="submit"]) { flex-basis: 100%; }
.hs-form-card button[type="submit"] { width: 100%; cursor: pointer; border: 0; }
@media (max-width: 600px) { .hs-form-card .wp-block-jetpack-contact-form > * { flex-basis: 100% !important; max-width: 100% !important; } }

/* ---------- Inner pages ---------- */
.hs-page-hero { background: var(--hs-paper); border-bottom: 1px solid var(--hs-line); padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.hs-crumbs { font-size: .9rem; margin: 0 0 .5rem !important; color: var(--hs-slate); }
.hs-crumbs a { color: var(--hs-slate); }
.hs-page-hero .wp-block-post-title { margin: 0; max-width: 20em; }
.hs-page-content { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60); }
.hs-page-content h2 { margin-top: 2.5rem; }
.hs-page-content h2:first-child { margin-top: 0; }
.hs-page-content img { border-radius: 8px; }
.hs-towns { columns: 3 180px; column-gap: 2rem; padding-left: 1.1rem; }
.hs-towns li { break-inside: avoid; margin: 0 0 .25rem; }
.hs-surveys { padding-left: 1.1rem; }
.hs-surveys li { margin: 0 0 .35rem; }

/* ---------- CTA band ---------- */
.hs-cta { background: var(--hs-ink); color: #fff; padding-block: var(--wp--preset--spacing--60); }
.hs-cta h2 { color: #fff; }
.hs-cta p { color: #D5DCE1; }
.hs-cta .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.hs-cta .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--hs-ink); border-color: #fff; }

/* ---------- Footer ---------- */
.hs-footer { background: var(--hs-paper); border-top: 1px solid var(--hs-line); padding-block: var(--wp--preset--spacing--60) 1.5rem; font-size: .975rem; }
.hs-footer-grid { display: grid !important; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 2.5rem; }
@media (max-width: 900px) { .hs-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hs-footer-grid { grid-template-columns: 1fr; } }
.hs-footer-grid > * { margin: 0 !important; }
.hs-footer h2 { font-size: 1rem; margin: 0 0 .9rem; letter-spacing: 0; }
.hs-footer .wp-block-site-title { font-weight: 800; font-size: 1.25rem; margin: 0; }
.hs-footer .wp-block-site-title a { color: var(--hs-ink); text-decoration: none; }
.hs-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.hs-footer ul a { color: var(--hs-ink); text-decoration: none; }
.hs-footer ul a:hover { color: var(--hs-teal); text-decoration: underline; }
.hs-footer-phone { font-weight: 800; font-size: 1.35rem; margin-top: 1rem !important; }
.hs-footer-phone a { color: var(--hs-ink); text-decoration: none; }
.hs-footer-bottom { border-top: 1px solid var(--hs-line); margin-top: 2.5rem !important; padding-top: 1.25rem; font-size: .875rem; color: var(--hs-slate); }
.hs-footer-bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Fixes after first render */
.hs-page-content .hs-lead { max-width: none; }
.hs-faq-wrap > h2 { margin-bottom: 1rem; }


/* Finder options: equal-height boxes, even gaps */
.hs-finder-options { gap: .75rem; grid-auto-rows: 1fr; }
.hs-finder-options li { display: flex; margin: 0 !important; }
.hs-finder-options a { flex: 1; height: 100%; }


/* Finder: primary quote button stands out (survey-flag orange) */
.hs-answer .wp-block-button:not(.hs-text-link) .wp-block-button__link {
	background: #F28C28; color: #15212B; font-size: 1.125rem; font-weight: 700;
	padding: 1rem 1.75rem; border-radius: 10px;
	box-shadow: 0 2px 0 #C2660F, 0 8px 20px rgba(242, 140, 40, .35);
	transition: background-color .15s, transform .15s, box-shadow .15s;
}
.hs-answer .wp-block-button:not(.hs-text-link) .wp-block-button__link:hover {
	background: #F79A3C; color: #15212B; transform: translateY(-1px);
	box-shadow: 0 3px 0 #C2660F, 0 10px 24px rgba(242, 140, 40, .45);
}
.hs-answer .wp-block-button:not(.hs-text-link) .wp-block-button__link:focus-visible { outline: 3px solid #15212B; outline-offset: 3px; }
@media (max-width: 600px) {
	.hs-answer .wp-block-button:not(.hs-text-link) { width: 100%; }
	.hs-answer .wp-block-button:not(.hs-text-link) .wp-block-button__link { display: block; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	.hs-answer .wp-block-button__link { transition: none; transform: none !important; }
}


/* All quote buttons: survey-flag orange (header, CTA band, quote form) */
.wp-block-button__link[href$="#quote"],
.hs-form-card button[type="submit"] {
	background: #F28C28; color: #15212B; font-weight: 700;
	box-shadow: 0 2px 0 #C2660F;
	transition: background-color .15s, transform .15s, box-shadow .15s;
}
.wp-block-button__link[href$="#quote"]:hover,
.hs-form-card button[type="submit"]:hover {
	background: #F79A3C; color: #15212B; transform: translateY(-1px);
	box-shadow: 0 3px 0 #C2660F, 0 8px 18px rgba(242, 140, 40, .35);
}
.wp-block-button__link[href$="#quote"]:focus-visible,
.hs-form-card button[type="submit"]:focus-visible { outline: 3px solid #15212B; outline-offset: 3px; }
.hs-cta .wp-block-button__link[href$="#quote"]:focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link[href$="#quote"], .hs-form-card button[type="submit"] { transition: none; transform: none !important; }
}


/* Photo slots: placeholder until a real photo replaces it */
.hs-photo-todo { margin-block: 1.5rem !important; }
.hs-photo-todo img { aspect-ratio: 2 / 1; object-fit: cover; }
.hs-photo-todo figcaption { border-left: 3px solid #F28C28; padding: .4rem 0 .4rem .75rem; margin-top: .75rem; font-size: .9rem; color: var(--hs-slate); background: #FFF6EC; border-radius: 0 6px 6px 0; }
.hs-photo-todo figcaption strong { color: #15212B; }

/* Real photos: crop to a wide frame */
.hs-photo img { aspect-ratio: 3 / 2; object-fit: cover; object-position: center 68%; }
.hs-answer .hs-answer-img img { object-position: center 68%; }
