/* ──────────────────────────────────────────────────────────────────────────
   Page Links CTA block
   Icy-blue section: intro + image (left) · body + CTA + big link list (right).
   Tokens only — no raw hex.
   ────────────────────────────────────────────────────────────────────────── */

.uw-pl {
	background: #DEF5FF;
	color: var(--wp--preset--color--deep-navy);
	position: relative;
}
.uw-pl__inner {
	padding-top: clamp(56px, 7vw, 120px);
	padding-bottom: clamp(56px, 7vw, 120px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1.5rem, 5vw, 80px);
	position: relative;
}
.uw-pl__left, .uw-pl__right {
	display: flex;
	flex-direction: column;
	gap: clamp(2rem, 4vw, 56px);
}

/* ── Left: heading + image ── */
/* Inline path. ACF wraps the region in a div; display:contents dissolves it so
   the .uw-pl__left and .uw-pl__right groups inside are the grid children the
   server-rendered divs were. The editor nests the same blocks one level deeper,
   so those wrappers get the same treatment. Core blocks arrive with the editor's
   default block margin, which these columns never used, and an untouched
   placeholder serializes as an empty element the legacy markup never emitted. */
.uw-pl__flow,
.uw-pl__flow > .block-editor-inner-blocks,
.uw-pl__flow > .block-editor-inner-blocks > .block-editor-block-list__layout { display: contents; }
.uw-pl__head > :is(.uw-pl__eyebrow, .uw-pl__heading),
.uw-pl__intro > :is(.uw-pl__body, .uw-button) { margin-block: 0; }
/* The CTA carries this class on the inline path so the block's own rules can
   reach it; the pill itself is styled by the shared uw-pill-btn system. */
.uw-pl__cta { display: inline-flex; }
.uw-pl__eyebrow:empty:not([contenteditable]),
.uw-pl__heading:empty:not([contenteditable]),
.uw-pl__body:empty:not([contenteditable]) { display: none; }

.uw-pl__head { display: flex; flex-direction: column; gap: clamp(1.25rem, 2vw, 24px); }
.uw-pl__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600; 
	line-height: 1;
	text-transform: uppercase;
}
.uw-pl__eyebrow-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--wp--preset--color--red); flex: none; }
.uw-pl__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(48px, 5.5vw, var(--wp--preset--font-size--heading-1));
	line-height: 0.9;
	letter-spacing: -0.01em;
}
/* -- Inline editing --
   The eyebrow and the section heading are inner blocks, and <InnerBlocks> carries
   `uw-pl__head` itself (see render.php), so the flex column above is literally the
   region wrapper and every rule above keeps matching the same elements. The body +
   CTA in `.uw-pl__intro` are a separate grid cell in the other column, so they
   cannot join the same region and keep their ACF fields. */

/* A core/paragraph cannot carry the dot <span>, so the dot is drawn instead,
   which also means it cannot be deleted by accident and screen readers do not
   announce it. :has() keeps it off the legacy markup, which would otherwise get a
   second dot and an extra 12px of flex gap. */
.uw-pl__eyebrow:not(:has(> .uw-pl__eyebrow-dot))::before {
	content: "";
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--red);
	flex: none;
}

/* Editor canvas only. ACF wraps the inner blocks in its own containers there;
   they would sit between .uw-pl__head and its two items and swallow the gap.
   `display: contents` removes them from layout without touching the front end,
   where no such wrappers exist. */
.uw-pl__head > .block-editor-inner-blocks,
.uw-pl__head > .block-editor-inner-blocks > .block-editor-block-list__layout {
	display: contents;
}

/* An untouched template placeholder still serialises as an empty element: an
   empty <h2> is an accessibility violation, and either one would consume a
   .uw-pl__head flex gap the legacy render never had (both were behind trim()
   guards). The contenteditable guard keeps this off the editor canvas, where an
   empty block is precisely what the author has to be able to click into. */
.uw-pl__eyebrow:empty:not([contenteditable]),
.uw-pl__heading:empty:not([contenteditable]) {
	display: none;
}

.uw-pl__figure {
	position: relative;
	margin: 0;
	margin-top: auto;
	border-radius: 12px;
	overflow: hidden; 
	max-width: 470px;
	height: 550px;
	width: 100%;
}
.uw-pl__img, .uw-pl__figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uw-pl__img--ph { display: block; background: color-mix(in srgb, var(--wp--preset--color--cobalt-blue) 18%, var(--wp--preset--color--icy-blue)); }

/* Swappable image stack: default visible; the hovered link's image fades in
   with a slight scale-settle for a smoother, less abrupt crossfade. */
.uw-pl__img-stack { position: absolute; inset: 0; }
.uw-pl__img-stack .uw-pl__img {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
}
.uw-pl__img-stack .uw-pl__img.is-active { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
	.uw-pl__img-stack .uw-pl__img { transition: none; transform: none; }
}

/* ── Right: body + CTA + links ── */
.uw-pl__intro { display: flex; flex-direction: column; gap: clamp(1.5rem, 2vw, 35px); align-items: flex-start; padding-top: 50px; }
.uw-pl__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.4;
}
/* Link list. */
.uw-pl__links { display: flex; flex-direction: column; }
.uw-pl__link {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 14px 24px 14px 0;
	border-radius: 10px;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(32px, 3vw, 60px);
	line-height: 1.1;
	letter-spacing: -0.01em;
	/* Cobalt at rest: the old 45% navy (#818DAA on the icy-blue band) failed
	   WCAG AA contrast. */
	color: var(--wp--preset--color--cobalt-blue);
	transition: background 0.25s ease, color 0.25s ease, padding-left 0.3s cubic-bezier(0.6, 0, 0.2, 1);
	position: relative;
}
/* Arrow: collapsed (zero width, no space) at rest; slides in on hover. */
.uw-pl__link-arrow {
	flex: none;
	display: flex;
	align-items: center;
	overflow: hidden;
	max-width: 0;
	opacity: 0;
	margin-right: 0;
	transition: max-width 0.3s cubic-bezier(0.6, 0, 0.2, 1),
	            opacity 0.2s ease,
	            margin-right 0.3s cubic-bezier(0.6, 0, 0.2, 1);
}
.uw-pl__link.is-active,
.uw-pl__link:hover,
.uw-pl__link:focus-visible {
	background: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--white);
	padding-left: 24px;
}
.uw-pl__link.is-active .uw-pl__link-arrow,
.uw-pl__link:hover .uw-pl__link-arrow,
.uw-pl__link:focus-visible .uw-pl__link-arrow {
	max-width: 42px;
	opacity: 1;
	margin-right: 16px;
}

.uw-pl__link:before {
	content: '';
	position: absolute;	
	top: 0; 
	left: 0;
	right: 0;
	height: 1px;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--deep-navy) 8%, transparent);
}
.uw-pl__link.is-active:before,
.uw-pl__link:hover:before,
.uw-pl__link:focus-visible:before { border-top-color: rgba(255, 255, 255, 0); }

.uw-pl__wattermarkTop {
	position: absolute;
	top: 0;
	right: 0; 
	pointer-events: none;
	display: flex;
}

.uw-pl__wattermarkbottom {
	position: absolute;
	bottom: 0;
	left: 0; 
	pointer-events: none;
	display: flex;
}

/* ── Mobile ── */
@media (max-width: 900px) {
	.uw-pl__inner { grid-template-columns: 1fr; }
	.uw-pl__figure { max-width: 100%; margin-top: 0; }
	.uw-pl__heading { font-size: clamp(40px, 12vw, 56px); }
	.uw-pl__intro { padding-top: 0; }
	.uw-pl__wattermarkTop, .uw-pl__wattermarkbottom { width: 50%; }
	.uw-pl__wattermarkTop svg, .uw-pl__wattermarkbottom	svg { width: 100%; height: auto; }
	.uw-pl__figure { display: none; }
}
