/**
 * Barndoor v12 interactive states: one hover / focus-visible / active system per element type, on light and dark surfaces.
 * Measured with god/work/redesign/states-qa/audit.mjs (real mouse hover, mouse-down, keyboard focus, contrast per state).
 * v12 reference (Barndoor-Homepage-v12.html): links forest, hover ink + 2px underline; dark-band buttons sage solid /
 * sage-hairline ghost (home .hv-btn); focus ring 2px sage on dark. ACSS link + light-form hover colors: acss-remap.php.
 *
 *            light surface                              dark surface (bands, footer, .bg--dark)
 * solid      forest -> forest-2, white text (ACSS)      sage -> mint, forest-3 text (v12-bands / v12-pages)
 * outline    hairline -> forest border (ACSS)         sage 40% -> sage border + 12% sage tint, mint text
 * text link  ink -> ink, 2px underline                  mint -> paper, 2px underline
 * focus      2px forest ring, 2px offset                2px sage ring, 2px offset
 * Each surface sets the --v12-* variables below once; the element rules only read them.
 */

/* ---- surfaces ---- */
:root {
	--v12-ring: var(--color-forest);
	--v12-outline-text: var(--color-forest);
	--v12-outline-border-hover: var(--color-forest);
	--v12-outline-tint: transparent;
}
/* dark: the Bricks band classes (v12-band--dark / --cta) and the plugin heroes in v12-bands.css set these same variables;
   below are only the dark surfaces that are not bands */
:is(.bg--dark, .bg--ultra-dark, .bg--primary, .bg--primary-dark, #brx-footer, #brxe-spjebp,
	.bd-single-cta, .tas-card-image, .rs-card-image) {
	--v12-ring: var(--color-sage);
	--v12-outline-text: var(--band-text);
	--v12-outline-border-hover: var(--color-sage);
	--v12-outline-tint: color-mix(in srgb, var(--color-sage) 12%, transparent);
	--link-color-hover: var(--color-paper);
}
/* light cards floating on a dark surface */
:is(.v12-band--dark, .bg--dark, #cu-featured, #brxe-spjebp, #brx-content > .brxe-section, #brx-content > .brxe-hero_split)
	:is(.bg--white, .bg--light, .bg--ultra-light, .bg-grey, #cu-featured-card, #brxe-mulhxr, #brxe-kkmeis, #brxe-faffmm, #brxe-hbxlmv, #brxe-tggcxe, #brxe-fwvavk, #brxe-ngmxtm, #brxe-ljtgkn) {
	--v12-ring: var(--color-forest);
	--v12-outline-text: var(--color-forest);
	--v12-outline-border-hover: var(--color-forest);
	--v12-outline-tint: transparent;
	--link-color-hover: var(--color-ink);
}

/* ---- focus-visible: one ring everywhere (ACSS/Bricks drew clay, forest-on-forest or sage-on-white rings, or none) ---- */
:is(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible {
	outline: 2px solid var(--v12-ring) !important;
	outline-offset: 2px !important;
}

/* ---- text links: v12 hover = 2px underline (color = ACSS --link-color-hover: ink, paper on dark) ---- */
body a:where(:not([class*="btn--"], .bricks-button, .brxe-button, header a, footer a)):hover { text-decoration-thickness: 2px; }
/* privacy/terms TOC: bold-on-hover reflowed wrapped items (32 -> 53px at 390); keep the weight, show the underline */
body .toc-list li a:hover:not(.active) { font-weight: 500; text-decoration: underline 2px; text-underline-offset: 3px; }

/* ---- secondary buttons: .btn-underline (BW1-96 text + underline) is the Bricks global class btn-underline qljino:
   native controls, :hover state and ::after sub-selectors (native phase 5, native/phase5.md) ---- */
/* homepage hero ghost hover (sage hairline + 12% tint): native :hover / :active values on the hv-btn--ghost class (phase 3) */
/* ACSS outline buttons: ACSS only moved the border; add the surface tint (text/border stay on ACSS + band vars) */
[class*="btn--"].btn--outline { --btn-background-hover: var(--v12-outline-tint); }
/* solid buttons: band fills hover/press on the band classes v12-band--repaint / --cta (sub-selectors), the landing header
   button on v12-ppc-header-cta and pricing "Contact Sales" on its element (:hover / :active states, native phase 7) */

/* ---- one-off overrides set on the element in Bricks ---- */
/* homepage hv-link hover/pressed colours: sub-selectors on the hv-link class (native phase 5) */
/* integrations search on the dark hero: the input inherited mint text on its white field (1.23:1 while typing) */
#brx-content .bd-archive-hero .bd-hero-search input { color: var(--color-ink); }
