/*
Theme Name: Exact Housing
Theme URI: https://exacthousing.com
Description: Premium block theme for Exact Housing — home construction, design and renovation. Every colour, font and section is editable in Appearance → Editor.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: exact-housing
License: GPL-2.0-or-later
*/

/* Only what theme.json can't express lives here. */

/* Eyebrow label above headings */
.eh-eyebrow {
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--oak);
}

/* Italic accent words in headings: wrap with <em> */
:where(h1, h2, h3) em { font-style: italic; color: var(--wp--preset--color--oak); }

/* Sticky header */
.eh-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(1.4) blur(10px);
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	transition: box-shadow 0.3s;
}
.admin-bar .eh-header { top: 32px; }
.eh-header.is-scrolled { box-shadow: 0 1px 0 var(--wp--preset--color--sand); }
.eh-logo { font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; letter-spacing: -0.01em; }
.eh-logo a { text-decoration: none; color: inherit; }

.eh-plain-list { list-style: none; padding-left: 0; line-height: 2; }
.eh-footer-rule { margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--30) !important; border-color: rgb(255 255 255 / 0.15) !important; }

/* Cards */
.eh-card {
	border-radius: var(--wp--custom--radius);
	overflow: hidden;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.eh-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgb(30 28 25 / 0.35); }
.eh-card .wp-block-image img,
.eh-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 0.6s ease; }
.eh-card:hover img { transform: scale(1.04); }
.eh-card .wp-block-image, .eh-card .wp-block-post-featured-image { overflow: hidden; margin: 0; border-radius: 0; }
.eh-card .wp-block-image img { border-radius: 0; }

/* Trust bar numbers */
.eh-stat strong {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1;
	color: var(--wp--preset--color--ink);
}

/* Process steps */
.eh-steps { counter-reset: step; }
.eh-step { counter-increment: step; border-top: 1px solid var(--wp--preset--color--sand); padding-top: 1.25rem; }
.eh-step::before {
	content: "0" counter(step);
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.5rem;
	color: var(--wp--preset--color--oak);
	line-height: 1;
	display: block;
	margin-bottom: 0.75rem;
}

/* Packages */
.eh-package { border: 1px solid var(--wp--preset--color--sand); border-radius: var(--wp--custom--radius); height: 100%; }
.eh-package.is-featured { border-color: var(--wp--preset--color--accent); box-shadow: 0 24px 50px -30px rgb(47 74 63 / 0.6); }
.eh-package ul { list-style: none; padding-left: 0; }
.eh-package li { padding: 0.45rem 0 0.45rem 1.6rem; position: relative; border-bottom: 1px solid var(--wp--preset--color--surface); }
.eh-package li::before { content: "✓"; position: absolute; left: 0; color: var(--wp--preset--color--accent); font-weight: 700; }

/* FAQ */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--sand); padding: 1.1rem 0; }
.wp-block-details summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: transform 0.3s; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }

/* Quote cards */
.eh-review { border-radius: var(--wp--custom--radius); height: 100%; }
.eh-review .wp-block-post-content p { font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; line-height: 1.35; }

/* Before / after slider — built by theme.js from a group with class "eh-ba" holding two images */
.eh-ba { position: relative; overflow: hidden; border-radius: var(--wp--custom--radius); user-select: none; }
.eh-ba figure { margin: 0 !important; }
.eh-ba img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0 !important; }
.eh-ba.is-ready > figure:last-of-type { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.eh-ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.eh-ba .eh-ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; pointer-events: none; }
.eh-ba .eh-ba-line::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; color: var(--wp--preset--color--ink); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.eh-ba-tag { position: absolute; top: 1rem; background: rgb(30 28 25 / 0.7); color: #fff; font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 99px; pointer-events: none; z-index: 2; }

/* Scroll reveal (only when JS is on and motion allowed) */
@media (prefers-reduced-motion: no-preference) {
	.js .eh-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
	.js .eh-reveal.is-in { opacity: 1; transform: none; }
}

/* Room for the plugin's mobile action bar */
@media (max-width: 781px) {
	body { padding-bottom: 64px; }
	.eh-hide-mobile { display: none !important; }
}
