/*
Theme Name: Level Pro ETX
Theme URI: https://levelproetx.com
Description: Bespoke dark-industrial brand theme for Level Pro ETX concrete lifting, leveling, void filling, and soil stabilization. Child of Twenty Twenty-Five. Native Gutenberg blocks + a brand CSS layer.
Author: DayLight Creative
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: levelproetx
*/

:root {
	--lp-accent: var(--wp--preset--color--accent);
	--lp-ink: var(--wp--preset--color--accent-ink);
	--lp-base: var(--wp--preset--color--base);
	--lp-surface: var(--wp--preset--color--surface);
	--lp-surface-2: var(--wp--preset--color--surface-2);
	--lp-text: var(--wp--preset--color--contrast);
	--lp-muted: var(--wp--preset--color--muted);
	--lp-line: var(--wp--preset--color--line);
	--lp-r-card: 14px;
	--lp-r-img: 14px;
	--lp-r-btn: 7px;
	--lp-r-pill: 999px;
	--lp-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--lp-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; background: var(--lp-base); }
::selection { background: var(--lp-accent); color: var(--lp-ink); }

/* keep optical character of display type tight */
h1, h2, h3, .lp-display { font-feature-settings: "ss01"; }

/* ---------- Focus + a11y ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, .wp-block-button__link:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--lp-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- Header / nav ---------- */
.lp-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--lp-base) 86%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--lp-line);
}
.lp-header .lp-logo img { height: 46px; width: auto; display: block; }
.lp-nav a {
	color: var(--lp-text);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 0.2s var(--lp-ease);
}
.lp-nav a:hover { color: var(--lp-accent); }
.lp-phone {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	color: var(--lp-text);
	text-decoration: none;
	white-space: nowrap;
}
.lp-phone:hover { color: var(--lp-accent); }

/* ---------- Buttons ---------- */
.wp-block-button__link {
	border-radius: var(--lp-r-btn);
	transition: transform 0.18s var(--lp-ease), filter 0.18s var(--lp-ease), background 0.18s var(--lp-ease);
	will-change: transform;
}
.wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.05); }
.wp-block-button__link:active { transform: translateY(0); }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--lp-text);
	border: 1.5px solid color-mix(in srgb, var(--lp-text) 30%, transparent);
	box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--lp-accent);
	color: var(--lp-accent);
}

/* ---------- Section rhythm + utilities ---------- */
.lp-section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.lp-section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.lp-surface { background: var(--lp-surface); }
.lp-eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lp-accent);
	margin-bottom: 0.9rem;
}
.lp-kicker { color: var(--lp-muted); max-width: 56ch; }
.lp-rule { height: 1px; background: var(--lp-line); border: 0; }

/* ---------- Angled section dividers: the "leveling" motif ----------
   A surface band whose slanted top edge carries a green "level line".
   Pure-vw slant keeps the angle constant across viewports so the line
   and the band edge always agree. */
.lp-angle { position: relative; isolation: isolate; background: transparent !important; }
.lp-angle > * { position: relative; z-index: 1; }
.lp-angle::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: -1.8vw; bottom: -1.8vw;
	z-index: 0;
	background: var(--lp-surface);
	border-top: 3px solid var(--lp-accent);
	transform: skewY(-1.8deg);
	box-shadow: 0 -18px 40px -24px rgba(143, 228, 69, 0.18);
}
/* darker band variant (sits over a surface section) */
.lp-angle.lp-angle--deep::before { background: var(--lp-base); }
@media (prefers-reduced-motion: reduce) { .lp-angle::before { } }

/* down-chevron "level" motif */
.lp-chev::before {
	content: "";
	display: inline-block;
	width: 0; height: 0;
	margin-right: 0.5em;
	border-left: 0.34em solid transparent;
	border-right: 0.34em solid transparent;
	border-top: 0.42em solid var(--lp-accent);
	transform: translateY(-0.06em);
}

/* ---------- Hero ---------- */
.lp-hero { position: relative; min-height: clamp(560px, 86svh, 820px); display: flex; align-items: center; overflow: clip; }
.lp-hero .wp-block-cover__background { background: var(--wp--preset--gradient--scrim) !important; }
/* left-weighted scrim so left-aligned hero copy stays legible over any photo */
.lp-hero::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg, rgba(18,17,16,0.88) 0%, rgba(18,17,16,0.55) 38%, rgba(18,17,16,0.12) 70%, transparent 100%);
}
.lp-hero::after {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: radial-gradient(120% 90% at 12% 8%, rgba(143, 228, 69, 0.10), transparent 46%);
}
.lp-hero .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; text-shadow: 0 2px 22px rgba(0,0,0,0.45); }
/* shorter hero for interior pages */
.lp-hero.lp-hero--page { min-height: clamp(360px, 52svh, 520px); }
.lp-hero h1 { max-width: 16ch; }
.lp-hero-sub { color: #e7e5e0; font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 46ch; line-height: 1.55; }

/* ---------- Stat strip ---------- */
.lp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--lp-line); border-block: 1px solid var(--lp-line); }
.lp-stats > * { background: var(--lp-base); padding: clamp(1.4rem, 3vw, 2.2rem); }
.lp-stat-num { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1; color: var(--lp-text); letter-spacing: -0.02em; }
.lp-stat-num em { color: var(--lp-accent); font-style: normal; }
.lp-stat-label { color: var(--lp-muted); font-size: 0.92rem; margin-top: 0.45rem; }

/* ---------- Process: Drill / Pump / Patch ---------- */
.lp-step { position: relative; border: 1px solid var(--lp-line); border-radius: var(--lp-r-card); overflow: clip; background: var(--lp-surface); height: 100%; }
.lp-step img { width: 100%; height: 200px; object-fit: cover; display: block; }
.lp-step-body { padding: 1.4rem 1.4rem 1.6rem; }
.lp-step-n { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.14em; color: var(--lp-accent); text-transform: uppercase; }
.lp-step h3 { margin: 0.3rem 0 0.5rem; font-size: 1.5rem; }
.lp-step p { color: var(--lp-muted); margin: 0; }

/* ---------- Service cards ---------- */
.lp-service { position: relative; border-radius: var(--lp-r-card); overflow: clip; min-height: 380px; display: flex; align-items: flex-end; border: 1px solid var(--lp-line); }
.lp-service img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 0.6s var(--lp-ease); }
.lp-service::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(18,17,16,0) 30%, rgba(18,17,16,0.92) 100%); }
.lp-service:hover img { transform: scale(1.05); }
.lp-service-body { position: relative; z-index: 2; padding: 1.6rem; }
.lp-service-body h3 { margin: 0 0 0.4rem; font-size: 1.55rem; }
.lp-service-body p { color: #d7d4ce; margin: 0; font-size: 0.98rem; }

/* ---------- Value props (why choose) ---------- */
.lp-value { border-top: 2px solid var(--lp-accent); padding-top: 1.2rem; }
.lp-value h3 { font-size: 1.25rem; margin: 0 0 0.45rem; }
.lp-value p { color: var(--lp-muted); margin: 0; }

/* ---------- CTA band ---------- */
.lp-cta {
	background:
		radial-gradient(80% 140% at 100% 0%, rgba(143, 228, 69, 0.16), transparent 55%),
		var(--lp-surface-2);
	border: 1px solid var(--lp-line);
	border-radius: var(--lp-r-card);
}

/* ---------- FAQ accordion (native details) ---------- */
.lp-faq details { border-bottom: 1px solid var(--lp-line); padding: 0.35rem 0; }
.lp-faq summary {
	cursor: pointer; list-style: none; padding: 1.05rem 2.4rem 1.05rem 0; position: relative;
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.12rem; color: var(--lp-text);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
	content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
	font-weight: 700; font-size: 1.5rem; color: var(--lp-accent); transition: transform 0.25s var(--lp-ease);
}
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details[open] summary { color: var(--lp-accent); }
.lp-faq .lp-faq-a { color: var(--lp-muted); padding: 0 2.4rem 1.1rem 0; line-height: 1.65; }

/* ---------- Footer ---------- */
.lp-footer { background: var(--lp-surface); border-top: 1px solid var(--lp-line); }
.lp-footer a { color: var(--lp-muted); text-decoration: none; }
.lp-footer a:hover { color: var(--lp-accent); }
.lp-footer .lp-logo img { height: 52px; width: auto; }

/* image polish */
.lp-section img.lp-photo, figure.lp-photo img { border-radius: var(--lp-r-img); display: block; }
.lp-bordered { border: 1px solid var(--lp-line); border-radius: var(--lp-r-card); }

/* ---------- Before / After comparison slider (the "see it level" proof) ----------
   Two stacked photos of the same slab; the BEFORE is clipped to --pos. Drag the
   handle, click anywhere, or focus the handle and use the arrow keys. The green
   divider is the brand "level line" motif made literal. */
.lp-ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 3vw, 2rem); }
@media (max-width: 781px) { .lp-ba-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }
.lp-ba {
	position: relative; width: 100%; aspect-ratio: 3 / 2; margin: 0;
	border-radius: var(--lp-r-img); overflow: hidden; border: 1px solid var(--lp-line);
	box-shadow: var(--lp-shadow); user-select: none; touch-action: none; cursor: ew-resize; --pos: 50%;
}
.lp-ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.lp-ba-after { z-index: 1; }
.lp-ba-before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.lp-ba-tag {
	position: absolute; bottom: 14px; z-index: 4; pointer-events: none;
	font-family: var(--wp--preset--font-family--display); font-size: 0.7rem; font-weight: 700;
	letter-spacing: 0.14em; text-transform: uppercase; color: var(--lp-text);
	background: color-mix(in srgb, var(--lp-base) 72%, transparent);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	padding: 0.4rem 0.8rem; border-radius: var(--lp-r-pill); border: 1px solid var(--lp-line);
}
.lp-ba-tag--before { left: 14px; }
.lp-ba-tag--after { right: 14px; color: var(--lp-accent); }
.lp-ba-divider {
	position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; z-index: 3;
	background: var(--lp-accent); transform: translateX(-50%); pointer-events: none;
	box-shadow: 0 0 16px rgba(143, 228, 69, 0.5);
}
.lp-ba-handle {
	position: absolute; top: 50%; left: var(--pos); transform: translate(-50%, -50%); z-index: 5;
	width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--lp-accent);
	background: var(--lp-base); color: var(--lp-accent); cursor: ew-resize;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
	transition: transform 0.18s var(--lp-ease), box-shadow 0.18s var(--lp-ease);
}
.lp-ba-handle svg { width: 22px; height: 22px; display: block; }
.lp-ba-handle:hover { transform: translate(-50%, -50%) scale(1.08); }
.lp-ba-handle:focus-visible { outline: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 0 4px color-mix(in srgb, var(--lp-accent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .lp-ba-handle { transition: none; } }

/* ---------- Motion: reliable hero load-in (ends visible) + hover micro-interactions.
   Content is never hidden behind JS; scroll-reveal was removed for reliability. ---------- */
@media (prefers-reduced-motion: no-preference) {
	.lp-hero .wp-block-cover__inner-container .lp-eyebrow,
	.lp-hero .wp-block-cover__inner-container h1,
	.lp-hero .wp-block-cover__inner-container .lp-hero-sub,
	.lp-hero .wp-block-cover__inner-container .wp-block-buttons {
		animation: lp-rise 0.8s var(--lp-ease) both;
	}
	.lp-hero .wp-block-cover__inner-container h1 { animation-delay: 0.07s; }
	.lp-hero .wp-block-cover__inner-container .lp-hero-sub { animation-delay: 0.15s; }
	.lp-hero .wp-block-cover__inner-container .wp-block-buttons { animation-delay: 0.23s; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- Contact form (Forminator) — brand skin ----------
   Forminator ships a light default theme; these override it to the dark-industrial
   system. Scoped to .forminator-ui so nothing leaks. !important is needed to beat
   the plugin's own high-specificity base CSS. */
.forminator-ui.forminator-custom-form { color: var(--lp-text); }
.forminator-ui .forminator-label {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
	color: var(--lp-text) !important; margin-bottom: 0.45rem;
}
.forminator-ui .forminator-required { color: var(--lp-accent) !important; }
.forminator-ui .forminator-description,
.forminator-ui .forminator-checkbox-label,
.forminator-ui .forminator-radio-label { color: var(--lp-muted); }

.forminator-ui .forminator-input,
.forminator-ui .forminator-textarea,
.forminator-ui select {
	background: var(--lp-surface-2) !important;
	color: var(--lp-text) !important;
	border: 1px solid color-mix(in srgb, var(--lp-text) 16%, transparent) !important;
	border-radius: var(--lp-r-btn) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 16px !important;
	padding: 0.7rem 0.9rem !important;
	box-shadow: none !important;
	transition: border-color 0.18s var(--lp-ease), box-shadow 0.18s var(--lp-ease);
}
.forminator-ui .forminator-input::placeholder,
.forminator-ui .forminator-textarea::placeholder { color: var(--lp-muted); opacity: 1; }
.forminator-ui .forminator-input:focus,
.forminator-ui .forminator-textarea:focus,
.forminator-ui select:focus {
	border-color: var(--lp-accent) !important; outline: none !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-accent) 35%, transparent) !important;
}
.forminator-ui textarea.forminator-textarea { min-height: 140px; }

/* primary submit = brand green CTA (matches site buttons) */
.forminator-ui .forminator-button-submit {
	background: var(--lp-accent) !important; color: var(--lp-ink) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-weight: 700 !important; font-size: 0.98rem !important; letter-spacing: 0.01em !important;
	border: 0 !important; border-radius: var(--lp-r-btn) !important;
	padding: 0.95rem 2rem !important; cursor: pointer;
	transition: transform 0.18s var(--lp-ease), filter 0.18s var(--lp-ease);
}
.forminator-ui .forminator-button-submit:hover { transform: translateY(-2px); filter: brightness(1.05); }
.forminator-ui .forminator-button-submit:active { transform: translateY(0); }
.forminator-ui .forminator-button-submit:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 3px; }

/* "Choose File" = subtle outline button */
.forminator-ui .forminator-button-upload {
	background: transparent !important; color: var(--lp-text) !important;
	border: 1.5px solid color-mix(in srgb, var(--lp-text) 30%, transparent) !important;
	border-radius: var(--lp-r-btn) !important;
	font-family: var(--wp--preset--font-family--display) !important; font-weight: 600 !important;
}
.forminator-ui .forminator-button-upload:hover { border-color: var(--lp-accent) !important; color: var(--lp-accent) !important; }
/* native file input button (the browser-rendered "Choose File") */
.forminator-ui input[type="file"] { color: var(--lp-muted); font-size: 0.9rem; }
.forminator-ui input[type="file"]::file-selector-button {
	-webkit-appearance: none; appearance: none;
	background: transparent; color: var(--lp-text);
	border: 1.5px solid color-mix(in srgb, var(--lp-text) 30%, transparent);
	border-radius: var(--lp-r-btn); font-family: var(--wp--preset--font-family--display);
	font-weight: 600; padding: 0.5rem 1.1rem; margin-right: 0.8rem; cursor: pointer;
	transition: border-color 0.18s var(--lp-ease), color 0.18s var(--lp-ease);
}
.forminator-ui input[type="file"]::file-selector-button:hover { border-color: var(--lp-accent); color: var(--lp-accent); }

/* checkbox / radio custom boxes -> brand accent when checked */
.forminator-ui .forminator-checkbox-box,
.forminator-ui .forminator-radio-box {
	background: var(--lp-surface-2) !important;
	border-color: color-mix(in srgb, var(--lp-text) 22%, transparent) !important;
}
.forminator-ui .forminator-checkbox input:checked ~ .forminator-checkbox-box,
.forminator-ui .forminator-radio input:checked ~ .forminator-radio-box {
	background: var(--lp-accent) !important; border-color: var(--lp-accent) !important;
}

/* validation errors readable on dark */
.forminator-ui .forminator-error-message,
.forminator-ui .forminator-label-error { color: #ff8a7a !important; }
.forminator-ui .forminator-has_error .forminator-input,
.forminator-ui .forminator-has_error .forminator-textarea { border-color: #ff8a7a !important; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.lp-stats { grid-template-columns: repeat(2, 1fr); }
	.lp-hero { min-height: clamp(520px, 82svh, 640px); }
	.lp-nav { display: none; }
}
@media (min-width: 600px) {
	.lp-stats { grid-template-columns: repeat(4, 1fr); }
}
