/*
 * Craft kit — loaded only while the "Craft" style variation is active
 * (settings.custom.kit, see wplb_kit() in inc/setup.php).
 *
 * For high-end builders, joiners and specialist contractors: quiet, exact,
 * expensive. Near-black and gold, a classic serif for headings (EB Garamond) over
 * a clear sans (Commissioner), sharp corners, hairline rules instead of
 * shadows, and the capabilities datasheet as a refined spec table. Colours
 * and fonts live in styles/craft.json; this file only does what theme.json
 * cannot.
 *
 * !important appears only where a pattern sets the value inline.
 */

/* Sharp corners everywhere the patterns round them. */
.wplb-card,
.wplb-faq-item,
.wplb-triage__item,
.wplb-media img,
.wp-block-post-featured-image,
.wp-block-post-featured-image img,
.wp-block-image img,
.wplb-ba__frame,
.wplb-ba__label,
.wplb-form input,
.wplb-form textarea,
.wplb-notice,
.wplb-open-now:not([hidden]),
.wp-block-button__link {
	border-radius: 0 !important;
}

/* Hairlines instead of shadows: the finish is in the edges. */
.wplb-card {
	border: 1px solid rgb(20 20 15 / 14%);
	box-shadow: none !important;
}
.wplb-faq-item {
	border: 1px solid rgb(20 20 15 / 14%);
	box-shadow: none !important;
}
.wplb-form input,
.wplb-form textarea {
	border: 1px solid rgb(20 20 15 / 30%);
}
@media (prefers-reduced-motion: no-preference) {
	.wplb-card {
		transition: border-color 0.2s ease;
	}
	.wplb-card:hover {
		border-color: var(--wp--preset--color--accent);
	}
}

/* Header: a single gold hairline. */
.wplb-header {
	border-bottom: 1px solid var(--wp--preset--color--accent) !important;
}

/* Section headings: a short gold rule beneath, like a joiner's mark. */
main h2.wp-block-heading::after {
	content: "";
	display: block;
	width: 2.5rem;
	height: 1px;
	margin-top: 1rem;
	background: var(--wp--preset--color--accent);
}
main h2.wp-block-heading.has-text-align-center::after {
	margin-inline: auto;
}

/*
 * The lead photo of a service or project page gets a gold frame on its
 * edges. On the edge, not inset, so it never cuts across what the photo
 * shows (a cut-out machine on white, say). Cards get none: at card size
 * it is clutter.
 */
.wp-block-post-featured-image:not(.wp-block-post-template *, .wplb-media, .wplb-media *) img {
	outline: 2px solid rgb(201 162 39 / 90%);
	outline-offset: -2px;
}

/*
 * Capabilities as a spec table: one hairline row per item, label on the
 * start side, value set in the heading serif on the end side.
 */
.wplb-specs {
	display: block;
	max-width: 48rem;
	border-block-start: 1px solid var(--wp--preset--color--dark);
}
.wplb-spec {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	column-gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--40);
	border-block-end: 1px solid rgb(20 20 15 / 14%);
}
.wplb-spec dt {
	grid-column: 1;
	grid-row: 1;
	font-weight: 500;
	letter-spacing: 0.02em;
}
.wplb-spec__value {
	grid-column: 2;
	grid-row: 1;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 400;
	color: var(--wp--preset--color--primary);
}
.wplb-spec__detail {
	grid-column: 1 / -1;
}

/* Hero: a gold hairline mount inset from the edges, like a framed drawing. */
.wp-block-cover.alignfull::after {
	content: "";
	position: absolute;
	inset: clamp(0.75rem, 2.5vw, 1.5rem);
	z-index: 1;
	pointer-events: none;
	border: 1px solid rgb(201 162 39 / 45%);
}
.wp-block-cover.alignfull .wp-block-cover__inner-container {
	z-index: 2;
}

/*
 * A photo hero gets a darker veil than the default 60%: the small gold line
 * is thin serif-adjacent text and loses contrast over bright site photos.
 */
.wp-block-cover.alignfull .wp-block-cover__background.has-background-dim.has-background-dim-60 {
	opacity: 0.7;
}
.wp-block-cover.alignfull:has(> img) .wp-block-cover__inner-container :is(p, h1, h2) {
	text-shadow: 0 1px 3px rgb(0 0 0 / 70%);
}
