/**
 * wow-v-polish — typographic + surface polish layer (worker 2: Safari polish).
 *
 * Safari/webkit-forward refinements for the record-lap theme. Every rule is
 * @supports-guarded or media-query-gated: Firefox and older browsers get zero
 * enhancements and fall back to the main.css baseline, which remains perfect.
 *
 * House rules honored in this file:
 * - html.wow-off neutralizes EVERY rule added here (single-point rollback,
 *   matching the kill-switch pattern in main.css §14h / wow-core.css).
 * - No animation or transition is introduced anywhere: prefers-reduced-motion
 *   is inherently satisfied (everything static).
 * - Volt #D9FF00 appears only where the brief explicitly sanctions it
 *   (::selection) or as a wide-gamut re-definition of the EXISTING --volt
 *   token — never on a new surface. The SI watermark uses an ink stroke,
 *   deliberately not volt.
 * - No emojis; no copy changes (all existing copy text left untouched).
 *
 * Load order assumption: this stylesheet loads AFTER main.css so its
 * enhancements win on supporting browsers.
 *
 * @package onmethod-2027
 */

/* ============ 1. Text wrap — guarded typographic upgrade ============ */
@supports (text-wrap: balance) {
	/* Reaffirms main.css §3 on supporting engines; harmless where absent. */
	h1, h2 { text-wrap: balance; }
}

@supports (text-wrap: pretty) {
	.section p,
	.om-section p,
	.entry-content p { text-wrap: pretty; }
}

/* ============ 2. Glass header + lap rail (Safari-friendly) ============ */
/*
 * Solid fallbacks: main.css already gives .site-header a solid var(--paper)
 * background and .wow-rail no background at all. Those remain the default;
 * the translucent glass variants below apply ONLY where backdrop-filter
 * is supported, so non-supporting browsers keep the solid baseline.
 */
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
	.site-header {
		background: rgba(253, 251, 247, 0.78);
		-webkit-backdrop-filter: saturate(1.4) blur(12px);
		backdrop-filter: saturate(1.4) blur(12px);
	}

	.wow-rail {
		background: rgba(26, 26, 26, 0.32);
		border: 1px solid rgba(253, 251, 247, 0.14);
		border-radius: 999px;
		-webkit-backdrop-filter: saturate(1.4) blur(12px);
		backdrop-filter: saturate(1.4) blur(12px);
	}
}

/* ============ 3. Giant outlined "SI" watermark (offer section) ============ */
/*
 * .v-si-watermark — decorative only. The integrator places the element
 * (aria-hidden="true", text content "SI") inside the offer section, which
 * must be position: relative. Absolutely positioned, huge, transparent
 * fill, low-opacity INK stroke (volt deliberately NOT used here), zero
 * pointer interaction. -webkit-text-stroke is supported in all modern
 * engines, but still guarded so older browsers get nothing.
 */
@supports ((-webkit-text-stroke: 1px rgba(0, 0, 0, 0)) or (text-stroke: 1px rgba(0, 0, 0, 0))) {
	.v-si-watermark {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		overflow: hidden;
		margin: 0;
		font-family: var(--font);
		font-weight: 800;
		font-size: clamp(16rem, 42vw, 42rem);
		line-height: 0.8;
		letter-spacing: -0.04em;
		color: transparent;
		-webkit-text-stroke: 2px rgba(26, 26, 26, 0.10);
		text-stroke: 2px rgba(26, 26, 26, 0.10);
		pointer-events: none;
		user-select: none;
		-webkit-user-select: none;
		z-index: 0;
	}
}

/* ============ 4. Wide-gamut volt — token upgrade, not a new spot ============ */
/* --volt is the existing custom property (main.css :root). On P3 displays
 * it renders the same accent a touch richer; everywhere else it is the
 * identical #D9FF00. Gated by the media query itself. */
@media (color-gamut: p3) {
	:root { --volt: color(display-p3 0.85 1 0); }
}

/* ============ 5. field-sizing: content — guarded ============ */
/* NOTE: Fluent Forms inputs are EXCLUDED — field-sizing:content makes an
   input size to its placeholder text, and long placeholders (e.g. the
   44-char "Biggest pain" one) blow out the form shell on mobile. */
@supports (field-sizing: content) {
	.wow-roi__out { field-sizing: content; }

	input[type="text"]:not(.ff-el-form-control),
	input[type="email"]:not(.ff-el-form-control),
	input[type="search"]:not(.ff-el-form-control),
	input[type="url"]:not(.ff-el-form-control),
	input[type="tel"]:not(.ff-el-form-control),
	textarea:not(.ff-el-form-control) { field-sizing: content; }

	/* Belt and suspenders: form controls can never exceed their column. */
	.ff-el-form-control { max-width: 100%; }
}

/* ============ 6. Refined ::selection (sanctioned volt use) ============ */
/* Volt here is the existing selection-adjacent accent, kept tasteful:
 * volt background, ink text. */
::selection {
	background: var(--volt);
	color: var(--ink);
}
::-moz-selection {
	background: var(--volt);
	color: var(--ink);
}

/* ============ 7. Subtle webkit scrollbar — thin, dark thumb ============ */
/* Webkit-only by design (Firefox keeps its native scrollbar: zero
 * enhancements there, per the pass rules). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
	background: #3d3d3d;
	border-radius: 6px;
	border: 2px solid transparent;
	background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
	background: #5a5a5a;
	border: 2px solid transparent;
	background-clip: content-box;
}

/* ============ 8. Link underline refinement — guarded ============ */
@supports (text-underline-offset: 1px) {
	.section p a,
	.om-section p a,
	.entry-content a {
		text-decoration-thickness: 1px;
		text-underline-offset: 0.2em;
	}
	.section p a:hover,
	.om-section p a:hover,
	.entry-content a:hover {
		text-decoration-thickness: 2px; /* matches main.css hover baseline */
	}
}

/* ============ 9. Kill switch: html.wow-off neutralizes everything above ============ */
html.wow-off .site-header {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: var(--paper);
}
html.wow-off .wow-rail {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: transparent;
	border-color: transparent;
}
html.wow-off .v-si-watermark { display: none !important; }
html.wow-off { --volt: #D9FF00; } /* higher specificity than :root — reverts the P3 token */
html.wow-off .wow-roi__out,
html.wow-off input[type="text"],
html.wow-off input[type="email"],
html.wow-off input[type="search"],
html.wow-off input[type="url"],
html.wow-off input[type="tel"],
html.wow-off textarea { field-sizing: fixed; }
html.wow-off ::selection,
html.wow-off ::-moz-selection {
	background: revert;
	color: revert;
}
html.wow-off .section p,
html.wow-off .om-section p,
html.wow-off .entry-content p { text-wrap: revert; }

/* Scrollbar revert under the kill switch (webkit). */
html.wow-off ::-webkit-scrollbar { width: revert; height: revert; }
html.wow-off ::-webkit-scrollbar-track { background: revert; }
html.wow-off ::-webkit-scrollbar-thumb { background: revert; }

/* ============ 10. Reduced motion ============ */
/* This file introduces zero animation, transition, or scroll-driven motion:
 * nothing to neutralize. All features are inherently static, satisfying
 * prefers-reduced-motion by construction. */
