/**
 * Tool Card Grid pattern styling for nordnatur.tech.
 *
 * CSS BUDGET EXCEPTION (CLAUDE.md rule 14).
 * Pattern-scoped CSS for off-scale layout values that theme.json + block
 * styles can't express:
 *   - vertical stack of tool-cards (single-column grid with literal 24px
 *     gap; coincidentally = spacing-50, kept literal per D1 / D2 precedent).
 *   - tool-card internal 1.2fr/1fr two-column grid (not equal-width or
 *     minmax-able via core/group layout:grid; same fr-ratio constraint
 *     as D1's hero-brand grid).
 *   - 768px wireframe stack breakpoint (off-scale vs WP defaults; differs
 *     from D1 / D2's 900px outer-grid breakpoint because the inner two-up
 *     within a card stacks earlier than the outer hero/services grids).
 *   - .ntech-tool-card-visual placeholder slot — different geometry from
 *     D1's .ntech-hero-brand-visual (D1: aspect 4/3 + full dashed border;
 *     D3: min-height 220px + single dashed edge that flips axis on stack)
 *     so a single upstream `is-style-tnk-visual-slot` block style would
 *     force one to override most of the other's rules. Hardcoded per
 *     E-d3-3 — promote upstream only if a third consumer asks (same
 *     "don't pre-generalize" call as B2 / E-c2-3 / E-d1-2 / E-d2-3).
 *   - .ntech-badge-mono inline version chip on h3 — single-use today
 *     (E-d3-2). Promote to `tnk-ui-components` as `is-style-tnk-badge-mono`
 *     only when a second Thinkie context wants version chips on headings.
 *
 * Conditionally enqueued via post_content sniff for the
 * `ntech-tool-card-grid` className — zero payload on pages without
 * the pattern. Logged in ntech-core CHANGELOG 0.8.0.
 *
 * All values resolve through theme.json custom properties. Source of
 * truth for the design lives at styling/elements/tool-card-grid.html.
 *
 * Atom: tool-card-grid — D3 of the 2026-04-30 atom-first polish pass.
 */

/* Outer vertical stack of tool-cards. blockGap:0 on the markup zeroes
 * WP's flow-blockGap MT on the second card; the grid's own gap paints
 * the inter-card rhythm. */
.ntech-tool-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem; /* 24px — wireframe inline `margin-bottom: 24px` between adjacent tool-cards */
}

/* Each tool-card is internally a 1.2fr/1fr CSS grid (body / visual).
 * Outer card carries C2's is-style-tnk-card (border + radius + overflow
 * + 200ms hover with translateY -2px) at pattern-level base-2 surface
 * with NO outer padding — body column carries 28px padding inline so
 * the visual column can fill edge-to-edge against the dashed dividing
 * border. blockGap:0 on the markup zeroes WP's flow-blockGap MT on the
 * visual column (default-flow children of a grid container would
 * otherwise inherit MT 24px and shift down inside their cell). */
.ntech-tool-card {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 768px) {
	.ntech-tool-card {
		grid-template-columns: 1fr;
	}
}

/* Visual placeholder slot inside each tool-card. Geometry per wireframe
 * `.tool-card-visual` (lines 233-241): base bg, dashed border-LEFT (or
 * border-TOP when stacked), min-height 220px, place-items center,
 * heading-font 0.9rem, text-align center. */
.ntech-tool-card-visual {
	background-color: var(--wp--preset--color--base);
	border-left: 1px dashed var(--wp--custom--border--muted);
	min-height: 220px;
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9rem;
	text-align: center;
	padding: 1.5rem; /* 24px — keeps the placeholder caption off the dashed edge when min-height drives the column height */
}

@media (max-width: 768px) {
	.ntech-tool-card-visual {
		border-left: 0;
		border-top: 1px dashed var(--wp--custom--border--muted);
	}
}

.ntech-tool-card-visual > p {
	margin: 0;
	max-width: 28ch;
}

/* Inline mono version chip on tool-card heading. Wireframe `.badge-mono`
 * (lines 245-254): JetBrains Mono via the theme.json `mono` font-family
 * slug, xs font-size (0.78rem from A3), contrast-2 text on base bg,
 * 4px radius (default radius from A1/A2), 3/8px padding, 8px ML from
 * the heading text. */
.ntech-badge-mono {
	display: inline-block;
	margin-left: 8px;
	padding: 3px 8px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
	letter-spacing: 0;
	color: var(--wp--preset--color--contrast-2);
	background-color: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--default);
	vertical-align: middle;
}
