/* ──────────────────────────────────────────────────────────────────────────
   Stats Block
   Intro column (eyebrow/heading/body/CTA) + hairline-separated stat rows
   (big number + icon/label/description). Tokens only — no raw hex.
   ────────────────────────────────────────────────────────────────────────── */

.uw-st { 
	color: var(--wp--preset--color--deep-navy);
}
.uw-st__inner {
	padding-top: clamp(56px, 7vw, 120px);
	padding-bottom: clamp(56px, 7vw, 120px);
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(2rem, 5vw, 80px);
}

/* ── Intro ── */
.uw-st__intro {
	flex: 0 1 471px;
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 2vw, 32px);
	align-items: flex-start;
}
.uw-st__intro-top {
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 2.5vw, 40px);
}
.uw-st__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1;
	text-transform: uppercase;
}
.uw-st__eyebrow-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--wp--preset--color--red); flex: none; }

/* Inline path. The eyebrow is a core/paragraph now, and a paragraph cannot carry
   the decorative <span> the legacy markup put the dot in - nor should an editor
   have to type or be able to delete it. Draw it instead, with the same 12px
   circle and the same 12px flex gap, so both paths render identically and a
   screen reader announces only the words.
   Told apart from the LEGACY markup by whether the dot <span> is present, not
   by position. The legacy path is also a <p class="uw-st__eyebrow"> and still
   emits its own dot, so an unscoped rule painted a second circle on every
   instance that path exists to protect. Scoping by position instead - a direct
   child of .uw-st__flow - broke the moment the eyebrow moved into the
   .uw-st__intro-top group, which silently dropped the dot and pulled the words
   24px left. Same :has() test as content-block, page-links and team-grid. */
.uw-st__eyebrow:not(:has(> .uw-st__eyebrow-dot))::before {
	content: "";
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--red);
	flex: none;
}

/* The eyebrow sits in .uw-st__intro-top again, the box it always sat in, so it
   needs no gap correction - it takes that box's own gap. Core blocks do arrive
   with the editor's default block margin, which this column never used. */
.uw-st__intro-top > :is(.uw-st__eyebrow, .uw-st__heading) { margin-block: 0; }
/* The box hugs its content, as a flex item that never stretched: the group core
   emits is a block-level div, which would fill the column instead. */
/* Matched on the element, not through .uw-st__intro: the region wrapper between
   them is display:contents, which changes layout but not selector matching. */
.uw-st__flow > .uw-st__intro-top { align-self: flex-start; }
.uw-st__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(56px, 7vw, var(--wp--preset--font-size--heading-1));
	line-height: 0.8;
	letter-spacing: -0.01em;
}
.uw-st__body {
	margin: 0;
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.35;
}

/* ── Stat list ── */
.uw-st__list {
	flex: 0 1 842px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.uw-st__row {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2vw, 2rem);
	padding: 24px 0; 
}

.uw-st__row:last-child { padding-bottom: 0; }

.uw-st__row:not(:first-child) { border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent); }

.uw-st__number {
	flex: 0 0 clamp(180px, 26vw, 431px);
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(120px, 9vw, var(--wp--preset--font-size--hero-2));
	line-height: 0.9;
	letter-spacing: -0.02em;
}
.uw-st__number--small {
	font-size: clamp(70px, 9vw, var(--wp--preset--font-size--heading-1));
}
.uw-st__detail {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.uw-st__detail-head { display: flex; align-items: center; gap: 16px; }
.uw-st__icon { color: var(--wp--preset--color--red); flex: none; fill: var(--wp--preset--color--red); }
.uw-st__icon svg { width: 36px; height: 36px; display: block; }
.uw-st__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 28px;
	line-height: 0.9;
	letter-spacing: -0.01em;
}
.uw-st__desc {
	margin: 0;
	font-family: var(--wp--preset--font-family--pp-mori);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.2;
}

/* ── Inline editing ──
   The heading and the intro copy are inner blocks. `<InnerBlocks class="uw-st__flow">`
   renders inside .uw-st__intro-top, directly below the eyebrow: the eyebrow keeps
   the clamp(1.25rem, 2.5vw, 40px) gap it always had from .uw-st__intro-top, and
   .uw-st__flow re-creates the clamp(1.5rem, 2vw, 32px) gap the body used to get
   from .uw-st__intro back when it was a direct child there. Every rule above keeps
   matching the same elements, so nothing is retargeted. The CTA is untouched: it
   is still a direct child of .uw-st__intro, one .uw-st__intro gap below. */
/* Legacy emitted <div class="uw-st__body"> wrapping a <p>, and that <p> kept the
   browser's default 1em block margin - so the body box has always been 2em taller
   than its text. On the inline path the paragraph IS .uw-st__body, and zeroing its
   margin made the box 34px shorter than the live site at mobile, where this column
   drives the section height. Restate the margin the inner <p> had. */
p.uw-st__body { margin-block: 1em; }

.uw-st__flow {
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 2vw, 32px);
}

/* Editor bridge. In the canvas ACF nests the blocks inside
   .block-editor-inner-blocks > .block-editor-block-list__layout, which would sit
   between .uw-st__flow and its flex children; on the front end the blocks are
   direct children. display:contents makes both DOMs lay out identically. */
.uw-st__flow > .block-editor-inner-blocks,
.uw-st__flow > .block-editor-inner-blocks > .block-editor-block-list__layout { display: contents; }

/* An untouched template placeholder serializes as an empty element: an empty
   <h2> is a WCAG violation, and either one would still consume a flex gap the
   legacy render never had. The contenteditable guard keeps this off the editor
   canvas, where an empty block must stay visible and clickable. */
.uw-st__heading:empty:not([contenteditable]),
.uw-st__body:empty:not([contenteditable]),
/* The eyebrow is a seeded placeholder too, and an empty one is not merely blank:
   the dot above is drawn on the element itself, so an untouched eyebrow paints a
   bare red circle over the heading and eats a region gap. */
p.uw-st__eyebrow:empty:not([contenteditable]) { display: none; }

/* Both blocks empty: the legacy render put nothing at all between the eyebrow and
   the CTA, so an empty region must not consume .uw-st__intro-top's gap. In the
   canvas the sole direct child is .block-editor-inner-blocks, which is not :empty,
   so the region stays visible and clickable there without an editor exception. */
.uw-st__flow:not(:has(> :not(:empty))) { display: none; }

/* Heading emptied or deleted, body still present: the body then sits where the
   legacy body sat — one .uw-st__intro gap below the eyebrow, not the larger
   .uw-st__intro-top gap the heading used to take. */
.uw-st__intro-top:not(:has(.uw-st__heading:not(:empty))) { gap: clamp(1.5rem, 2vw, 32px); }

/* ── Mobile ── */
@media (max-width: 900px) {
	.uw-st__inner { flex-direction: column; gap: 2.5rem; }
	.uw-st__intro, .uw-st__list { flex: none; width: 100%; }
	.uw-st__row { flex-direction: column; align-items: flex-start; gap: 1rem; }
	.uw-st__number { flex: none; }
	.uw-st__heading { font-size: clamp(48px, 14vw, 72px); }
}

/* ── Scroll-triggered staggered fade-in (JS-armed via .uw-st--anim) ──
   Additive: only applies once view.js adds `uw-st--anim`; the SSR/no-JS
   appearance is unchanged. */
.uw-st--anim .uw-st__row {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.9s ease, transform 0.9s ease;
	transition-delay: var(--uw-st-delay, 0ms);
}
.uw-st--anim .uw-st__row.is-revealed {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.uw-st--anim .uw-st__row {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
