/*
Theme Name: JM Hansen Automotive
Theme URI: https://jmhansenautomotive.com/
Author: Humpf Tech
Description: Custom block theme for JM Hansen Automotive. Everything is editable in Appearance → Editor (no page builder).
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jmhansen
*/

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--sky); color: var(--wp--preset--color--midnight); }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { overflow-x: clip; }
img { height: auto; }
:where(h1, h2, h3, h4) mark.has-inline-color { background: none; }

/* ---------- header ---------- */
.jmh-topbar { font-size: var(--wp--preset--font-size--x-small); letter-spacing: .02em; }
.jmh-topbar a { color: inherit; text-decoration: none; }
.jmh-topbar a:hover { color: var(--wp--preset--color--sky); }
.jmh-topbar .jmh-i-check::before { color: var(--wp--preset--color--sky); }
.jmh-topbar-cta a { color: var(--wp--preset--color--sky) !important; }
.jmh-topbar-cta a::after {
	content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .35em; vertical-align: -.16em;
	background-color: currentColor; -webkit-mask: url(assets/icons/arrow-right.svg) center / contain no-repeat; mask: url(assets/icons/arrow-right.svg) center / contain no-repeat;
}
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
.jmh-header {
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	box-shadow: 0 1px 0 var(--wp--preset--color--line), 0 10px 30px -18px rgba(6, 21, 47, .35);
}
.jmh-header .wp-block-site-logo img { width: clamp(190px, 22vw, 250px) !important; height: auto; }
.jmh-header .wp-block-navigation .wp-block-navigation-item__content { padding: .35em 0; position: relative; color: var(--wp--preset--color--navy); }
.jmh-header .wp-block-navigation .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 2px;
	background: var(--wp--preset--color--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.jmh-header .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.jmh-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.jmh-header .wp-block-navigation a:where(:not(.wp-element-button)) { text-decoration: none; }
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--gradient--night-drive) !important; color: #fff !important;
	padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 2rem; color: #fff !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem !important; }
.jmh-header .jmh-header-cta .wp-block-button__link { padding: .7em 1.2em; font-size: 1.0625rem; }
@media (max-width: 781px) {
	.jmh-topbar .jmh-hide-sm { display: none !important; }
	.jmh-header .jmh-header-cta { display: none; }
}

/* ---------- inline icons (CSS masks, colour follows text) ---------- */
[class*="jmh-i-"]::before {
	content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .45em; vertical-align: -.16em;
	background-color: currentColor; -webkit-mask: var(--jmh-icon) center / contain no-repeat; mask: var(--jmh-icon) center / contain no-repeat;
}
.jmh-i-phone { --jmh-icon: url(assets/icons/phone.svg); }
.jmh-i-pin { --jmh-icon: url(assets/icons/map-pin.svg); }
.jmh-i-clock { --jmh-icon: url(assets/icons/clock.svg); }
.jmh-i-mail { --jmh-icon: url(assets/icons/mail.svg); }
.jmh-i-check { --jmh-icon: url(assets/icons/check.svg); }
.jmh-i-arrow::before { display: none; }
.jmh-i-arrow::after {
	content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .4em; vertical-align: -.14em; transition: transform .2s ease;
	background-color: currentColor; -webkit-mask: url(assets/icons/arrow-right.svg) center / contain no-repeat; mask: url(assets/icons/arrow-right.svg) center / contain no-repeat;
}
a:hover > .jmh-i-arrow::after, .jmh-i-arrow:hover::after { transform: translateX(4px); }

/* ---------- typography helpers ---------- */
.is-style-kicker, .jmh-kicker {
	font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase;
	letter-spacing: .2em; font-size: .95rem; line-height: 1.2; color: var(--wp--preset--color--blue);
	display: flex; align-items: center; gap: .75rem;
}
.is-style-kicker::before, .jmh-kicker::before {
	content: ""; width: 34px; height: 4px; flex: none; background: currentColor; transform: skewX(-24deg); border-radius: 1px;
}
.is-style-kicker.has-text-align-center, .jmh-kicker.has-text-align-center { justify-content: center; }
.has-midnight-background-color .is-style-kicker, .has-navy-background-color .is-style-kicker,
.wp-block-cover .is-style-kicker, .has-background-gradient .is-style-kicker { color: var(--wp--preset--color--sky); }
.jmh-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }
.has-white-color h1, .has-white-color h2, .has-white-color h3, .has-white-color h4, .has-white-color h5, .has-white-color h6,
.wp-block-cover h1, .wp-block-cover h2, .wp-block-cover h3 { color: inherit; }
.has-midnight-background-color :where(h1,h2,h3,h4), .has-navy-background-color :where(h1,h2,h3,h4),
.has-background-gradient :where(h1,h2,h3,h4) { color: #fff; }
.has-midnight-background-color a:where(:not(.wp-element-button)), .has-navy-background-color a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--sky); }

/* ---------- hero ---------- */
.jmh-hero { isolation: isolate; }
.jmh-hero h1 { text-shadow: 0 2px 30px rgba(6, 21, 47, .35); }
.jmh-hero .wp-block-cover__inner-container { max-width: var(--wp--style--global--wide-size); }
.jmh-chips { gap: .5rem 1.5rem !important; }
.jmh-chips p { margin: 0; font-weight: 600; font-size: var(--wp--preset--font-size--small); }
.jmh-chips p::before { color: var(--wp--preset--color--sky); }
.is-style-angled { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5vw), 0 100%); padding-bottom: calc(var(--wp--preset--spacing--60) + 3.5vw) !important; }
.is-style-angled-top { clip-path: polygon(0 3.5vw, 100% 0, 100% 100%, 0 100%); padding-top: calc(var(--wp--preset--spacing--60) + 3.5vw) !important; }

/* ---------- blueprint backgrounds ---------- */
.is-style-blueprint {
	background-image:
		linear-gradient(rgba(23, 88, 232, .09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(23, 88, 232, .09) 1px, transparent 1px),
		linear-gradient(rgba(23, 88, 232, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(23, 88, 232, .045) 1px, transparent 1px) !important;
	background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px !important;
	background-position: -1px -1px !important;
}
.is-style-blueprint-dark {
	background-image:
		radial-gradient(ellipse at 80% 0%, rgba(47, 140, 255, .28), transparent 55%),
		linear-gradient(rgba(140, 200, 255, .09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(140, 200, 255, .09) 1px, transparent 1px),
		linear-gradient(rgba(140, 200, 255, .04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(140, 200, 255, .04) 1px, transparent 1px) !important;
	background-size: 100% 100%, 160px 160px, 160px 160px, 32px 32px, 32px 32px !important;
	background-position: 0 0, -1px -1px, -1px -1px, -1px -1px, -1px -1px !important;
}

/* ---------- cards ---------- */
.is-style-card {
	position: relative; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px;
	box-shadow: var(--wp--preset--shadow--card); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	overflow: hidden;
}
.is-style-card::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--wp--preset--gradient--hansen);
	transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.is-style-card:hover { transform: translateY(-4px); box-shadow: var(--wp--preset--shadow--lift); border-color: transparent; }
.is-style-card:hover::before { transform: scaleX(1); }
.is-style-card .wp-block-image { margin-bottom: .25rem; }
.is-style-card h3 { margin-top: .5rem; }
.is-style-card p:last-child { margin-bottom: 0; }
.jmh-card-link { margin-top: auto !important; font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.jmh-card-link a { text-decoration: none; }
.jmh-card-link a::after {
	content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .35em; vertical-align: -.14em; transition: transform .2s ease;
	background-color: currentColor; -webkit-mask: url(assets/icons/arrow-right.svg) center / contain no-repeat; mask: url(assets/icons/arrow-right.svg) center / contain no-repeat;
}
.jmh-card-link a:hover::after { transform: translateX(4px); }
.is-style-glass {
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(140, 200, 255, .22); border-radius: 14px;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- images ---------- */
.is-style-chamfer img {
	clip-path: polygon(36px 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%, 0 36px);
}
.jmh-photo-stack { position: relative; }
.jmh-photo-stack::after {
	content: ""; position: absolute; z-index: -1; inset: 18px -18px -18px 18px; border: 3px solid var(--wp--preset--color--blue);
	clip-path: polygon(36px 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%, 0 36px); opacity: .9;
}
.jmh-badge img { width: 64px; height: 64px; }

/* ---------- lists ---------- */
ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist li { position: relative; padding-left: 2.1rem; margin-bottom: .6rem; }
ul.is-style-checklist li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 1.35rem; height: 1.35rem; border-radius: 50%;
	background: var(--wp--preset--color--blue) url(assets/icons/check-white.svg) center / 70% no-repeat;
}

/* ---------- steps ---------- */
.jmh-step-num {
	font-family: var(--wp--preset--font-family--display); font-style: italic; font-weight: 800; font-size: 4.25rem; line-height: .9;
	color: transparent; -webkit-text-stroke: 2px var(--wp--preset--color--electric); margin: 0 !important;
}
.jmh-step { position: relative; }

/* ---------- stats / trust strip ---------- */
.jmh-strip { position: relative; z-index: 3; }
.jmh-strip .wp-block-column { position: relative; }
@media (min-width: 782px) {
	.jmh-strip .wp-block-column + .wp-block-column::before {
		content: ""; position: absolute; left: calc(var(--wp--style--block-gap, 2rem) / -2); top: 10%; bottom: 10%; width: 1px; background: rgba(140, 200, 255, .25);
	}
}
.jmh-strip h3 { font-size: 1.375rem; text-transform: uppercase; letter-spacing: .03em; margin: .6rem 0 .25rem; }
.jmh-strip p { margin: 0; color: #c9dcf5; font-size: var(--wp--preset--font-size--small); }

/* ---------- buttons ---------- */
.wp-block-button__link { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--blue); border-color: currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--blue); color: #fff; border-color: var(--wp--preset--color--blue); }
.wp-block-button.is-style-light-outline > .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.wp-block-button.is-style-light-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--navy); border-color: #fff; }
.wp-block-button.is-style-white > .wp-block-button__link { background: #fff; color: var(--wp--preset--color--navy); border-color: #fff; }
.wp-block-button.is-style-white > .wp-block-button__link:hover { background: var(--wp--preset--color--ice); border-color: var(--wp--preset--color--ice); }

/* ---------- FAQ ---------- */
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.35rem; color: var(--wp--preset--color--navy);
	cursor: pointer; list-style: none; position: relative; padding-right: 2.5rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.75rem; line-height: 1; color: var(--wp--preset--color--blue); transition: transform .2s ease;
}
.wp-block-details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--steel); }

/* ---------- hours table ---------- */
.jmh-hours { width: 100%; align-self: stretch; margin: 0; }
.jmh-hours table { border-collapse: collapse; width: 100%; }
.jmh-hours td:first-child { padding-right: 1rem; }
.jmh-hours td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .55rem 0; }
.jmh-hours td:last-child { text-align: right; font-weight: 600; color: var(--wp--preset--color--navy); }

/* ---------- contact form (Contact Form 7) ---------- */
.jmh-form, .jmh-form * { box-sizing: border-box; }
.jmh-form .hidden-fields-container, .jmh-form fieldset.hidden-fields-container { display: none !important; }
.jmh-form .wpcf7-form-control-wrap { display: block; }
.jmh-form .wpcf7-form p { margin: 0; }
.jmh-form label br { display: none; }
.jmh-form textarea { height: 9.5rem; }
.jmh-form .wpcf7-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.jmh-form .wpcf7-form > p, .jmh-form .wpcf7-form > .full, .jmh-form .wpcf7-response-output { grid-column: 1 / -1; margin: 0; }
.jmh-form .wpcf7-form > .half { grid-column: span 1; }
.jmh-form label { display: block; font-weight: 600; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--navy); }
.jmh-form input:not([type="submit"]), .jmh-form select, .jmh-form textarea {
	width: 100%; margin-top: .35rem; padding: .8rem .9rem; font: inherit; color: var(--wp--preset--color--ink); background: #fff;
	border: 1.5px solid var(--wp--preset--color--line); border-radius: 8px; transition: border-color .2s ease, box-shadow .2s ease;
}
.jmh-form textarea { min-height: 130px; resize: vertical; }
.jmh-form input:focus, .jmh-form select:focus, .jmh-form textarea:focus { outline: none; border-color: var(--wp--preset--color--blue); box-shadow: 0 0 0 4px rgba(23, 88, 232, .15); }
.jmh-form input[type="submit"] {
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.1875rem; text-transform: uppercase; letter-spacing: .06em;
	background: var(--wp--preset--color--blue); color: #fff; border: 0; border-radius: 6px; padding: .95em 2em; cursor: pointer;
}
.jmh-form input[type="submit"]:hover { background: var(--wp--preset--color--navy); }
.jmh-form .wpcf7-spinner { margin: 0 0 0 1rem; }
@media (max-width: 600px) { .jmh-form .wpcf7-form { grid-template-columns: 1fr; } .jmh-form .wpcf7-form > .half { grid-column: 1 / -1; } }

/* ---------- footer ---------- */
.jmh-footer a { color: #fff; text-decoration: none; }
.jmh-footer a:hover { color: var(--wp--preset--color--sky); text-decoration: underline; }
.jmh-footer h4 { color: var(--wp--preset--color--sky); font-size: 1rem; letter-spacing: .14em; }
.jmh-footer p, .jmh-footer li { color: #c3d3ea; }
.jmh-footer ul { list-style: none; padding: 0; }
.jmh-footer li { margin-bottom: .45rem; }
.jmh-footer-bottom { border-top: 1px solid rgba(140, 200, 255, .18); }
.jmh-footer-bottom p { color: #8ea3c2; }

/* ---------- small screens ---------- */
@media (max-width: 781px) {
	.jmh-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(6,21,47,.9) 0%, rgba(6,21,47,.82) 60%, rgba(11,42,102,.75) 100%) !important; }
	.jmh-photo-stack::after { display: none; }
	.jmh-strip { margin-top: -3rem !important; }
}

/* ---------- misc ---------- */
.jmh-map iframe { width: 100%; min-height: 340px; border: 0; border-radius: 14px; display: block; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
