/* Shared by the painting, restaurant and builder demos. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.demo-bar {
	position: relative;
	z-index: 30;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 20px;
	padding: 9px 16px;
	background: #1e1e1e;
	color: #e9e9e9;
	font: 13px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
	text-align: center;
}
.demo-bar a { color: #f3d58f; font-weight: 600; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }

.btn {
	display: inline-block;
	padding: 14px 28px;
	border: 2px solid transparent;
	border-radius: var(--radius, 4px);
	background: var(--accent);
	color: var(--accent-ink, #fff);
	font: 700 15px var(--sans);
	text-decoration: none;
	cursor: pointer;
	transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-small { padding: 9px 18px; font-size: 14px; }

.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
.lead-form input, .lead-form select, .lead-form textarea {
	width: 100%;
	padding: 14px 15px;
	border: 1px solid var(--line, #ccc);
	border-radius: var(--radius, 4px);
	background: #fff;
	color: inherit;
	font: 400 16px var(--sans);
}
.lead-form textarea { min-height: 110px; resize: vertical; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: 2px solid var(--accent); }
.lead-form .full { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; margin: 4px 0 0; padding: 14px; border-radius: var(--radius, 4px); background: rgba(0, 128, 0, .12); text-align: center; }
.form-note[hidden] { display: none; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .86); }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(960px, 100%); }
.modal-close { position: absolute; right: 0; top: -44px; background: none; border: 0; color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }
.modal-screen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background-size: cover; background-position: center; color: #fff; text-align: center; }
.modal-screen::before { content: ""; position: absolute; inset: 0; background: rgba(10, 8, 6, .72); }
.modal-screen p { position: relative; margin: 0; padding: 20px; font: 600 clamp(20px, 3.4vw, 32px)/1.3 var(--serif, var(--sans)); }
.modal-screen small { display: block; margin-top: 8px; font: 400 14px var(--sans); opacity: .8; }

/* Before/after slider: .compare holds the "after" image; .compare-before is clipped by --pos. */
.compare { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background-size: cover; background-position: center; --pos: 50%; user-select: none; touch-action: pan-y; }
.compare-before { position: absolute; inset: 0; background-size: cover; background-position: center; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); pointer-events: none; }
.compare-handle::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: #222; display: grid; place-items: center; font-size: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-tag { position: absolute; top: 14px; padding: 4px 12px; border-radius: 3px; background: rgba(0, 0, 0, .65); color: #fff; font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.compare-tag.l { left: 14px; }
.compare-tag.r { right: 14px; }

@media (max-width: 760px) { .lead-form { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

@media (max-width: 860px) { .btn-small { padding: 9px 14px; font-size: 12px; white-space: nowrap; } }
