/* =============================================================================
   DSD Pro · Blended hero (dsd-hero-blend) · v1.2.1 · 2026-11-24
   A dark hero whose background, image and glows melt into the next section.
   First used on the Insights single post. Reusable on any page.

   HOW TO USE IT ON ANOTHER PAGE (Bricks)
   1. Wrap the hero section AND the section right after it in a Div with class
      dsd-hero-blend-zone (lets the glows cross into the next section).
   2. Hero section: class dsd-hero-blend. Give the next section dsd-hero-blend-next
      (it becomes see-through so the glows show through).
   3. Inside the hero, first: Div dsd-hero-blend__bg with 4 empty Divs:
      dsd-hero-blend__solid, dsd-hero-blend__fade, dsd-hero-blend__tail, dsd-hero-blend__lines.
      Then 4 glow Divs: dsd-hero-blend__glow + --top / --right / --left / --center.
   4. Content: dsd-hero-blend__inner › dsd-hero-blend__grid (text | art)
      › dsd-hero-blend__text and dsd-hero-blend__art (holds dsd-hero-blend__ring + an Image
      with class dsd-hero-blend__img). Optional glass strip under it: dsd-hero-blend__bar.

   CHANGE THE COLOURS
   Add a switch class to the hero: dsd-hero-blend--blue or dsd-hero-blend--charcoal,
   or set the variables below on the hero (Style › CSS variables) for a one-off.
   ========================================================================== */

.dsd-hero-blend {
	--hb-bg: #101826;                                   /* dark background (solid behind the text) */
	--hb-tint: var(--primary, #4675b8);                 /* colour the fade passes through */
	--hb-tint-2: var(--tertiary, #61bdf0);              /* colour the fade ends on */
	--hb-glow-top: rgba(97, 189, 240, .32);             /* glow, top left */
	--hb-glow-right: rgba(97, 189, 240, .34);           /* glow straddling the edge, right */
	--hb-glow-left: rgba(159, 197, 77, .30);            /* glow straddling the edge, left */
	--hb-glow-center: rgba(97, 189, 240, .18);          /* wide soft glow across the middle of the edge */
	--hb-fade: clamp(220px, 24vw, 320px);               /* height of the dissolve at the bottom */
	--hb-text: #ffffff;
	--hb-lede: #d5e0ee;
	position: relative;
	padding-bottom: clamp(96px, 11vw, 170px);
	color: var(--hb-text);
}
.dsd-hero-blend--blue { --hb-bg: var(--primary-ultra-dark, #24456f); --hb-tint: var(--primary, #4675b8); }
.dsd-hero-blend--charcoal { --hb-bg: #0c0e12; --hb-glow-left: rgba(159, 197, 77, .34); }

/* Zone: the hero + next section share one clipped wrapper (clip, not hidden, so sticky elements keep working) */
.dsd-hero-blend-zone { position: relative; overflow: clip; background: var(--light, #f4f6fa); }
.dsd-hero-blend-next { position: relative; z-index: 1; background: transparent !important; }

/* Background layers (empty divs: editor min-height fix) */
.dsd-hero-blend .dsd-hero-blend__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; min-height: 0 !important; padding: 0 !important; }
.dsd-hero-blend .dsd-hero-blend__bg > div { min-height: 0 !important; padding: 0 !important; }
.dsd-hero-blend .dsd-hero-blend__solid { position: absolute; left: 0; right: 0; top: 0; bottom: var(--hb-fade); background: var(--hb-bg); }
.dsd-hero-blend .dsd-hero-blend__fade {
	position: absolute; left: 0; right: 0; bottom: 0; height: var(--hb-fade);
	background: linear-gradient(180deg,
		var(--hb-bg) 0%,
		color-mix(in srgb, var(--hb-bg) 94%, transparent) 14%,
		color-mix(in srgb, color-mix(in srgb, var(--hb-bg) 88%, var(--hb-tint)) 84%, transparent) 28%,
		color-mix(in srgb, color-mix(in srgb, var(--hb-bg) 72%, var(--hb-tint)) 66%, transparent) 42%,
		color-mix(in srgb, color-mix(in srgb, var(--hb-bg) 45%, var(--hb-tint)) 46%, transparent) 56%,
		color-mix(in srgb, var(--hb-tint) 28%, transparent) 70%,
		color-mix(in srgb, var(--hb-tint-2) 14%, transparent) 84%,
		color-mix(in srgb, var(--hb-tint-2) 6%, transparent) 100%);
}
.dsd-hero-blend .dsd-hero-blend__tail {
	position: absolute; left: 0; right: 0; top: 100%; height: clamp(140px, 16vw, 240px);
	background: linear-gradient(180deg, color-mix(in srgb, var(--hb-tint-2) 6%, transparent) 0%, color-mix(in srgb, var(--hb-tint-2) 3%, transparent) 45%, transparent 100%);
}
.dsd-hero-blend .dsd-hero-blend__lines {
	position: absolute; inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 40px 40px;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - var(--hb-fade)), transparent 100%);
	mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - var(--hb-fade)), transparent 100%);
}

/* Glows: behind content, crossing the bottom edge into the next section */
.dsd-hero-blend .dsd-hero-blend__glow { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; min-height: 0 !important; padding: 0 !important; }
.dsd-hero-blend .dsd-hero-blend__glow--top { width: 640px; height: 640px; left: -240px; top: -280px; background: radial-gradient(circle closest-side, var(--hb-glow-top), transparent); }
.dsd-hero-blend .dsd-hero-blend__glow--right { width: 820px; height: 820px; right: -260px; bottom: -460px; background: radial-gradient(circle closest-side, var(--hb-glow-right), transparent); }
.dsd-hero-blend .dsd-hero-blend__glow--left { width: 760px; height: 760px; left: -260px; bottom: -440px; background: radial-gradient(circle closest-side, var(--hb-glow-left), transparent); }
.dsd-hero-blend .dsd-hero-blend__glow--center { width: 1400px; height: 560px; left: 50%; translate: -50% 0; bottom: -300px; border-radius: 50%; background: radial-gradient(ellipse closest-side, var(--hb-glow-center), transparent); }

/* Content */
.dsd-hero-blend .dsd-hero-blend__inner { position: relative; z-index: 1; width: 100%; max-width: 77.5rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); box-sizing: border-box; }
.dsd-hero-blend .dsd-hero-blend__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(24px, 3vw, 48px); padding-top: clamp(40px, 5vw, 64px); }
.dsd-hero-blend .dsd-hero-blend__text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-bottom: clamp(56px, 8vw, 130px); min-width: 0; }
.dsd-hero-blend .dsd-hero-blend__title { margin: 0; font-family: Montserrat, sans-serif; font-weight: 900; font-size: clamp(2.125rem, 4.4vw, 3.75rem); line-height: 1.04; letter-spacing: -.035em; color: var(--hb-text); text-wrap: balance; }
.dsd-hero-blend .dsd-grad-light { background: linear-gradient(90deg, var(--tertiary, #61bdf0) 0%, #7fd3a0 55%, var(--secondary, #9fc54d) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dsd-hero-blend .dsd-hero-blend__lede { margin: 0; max-width: 34em; font-family: "Source Sans 3", sans-serif; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.6; color: var(--hb-lede); }

/* Art: image with no frame, feathered into the dark (left + top) and down into the page (bottom) */
.dsd-hero-blend .dsd-hero-blend__art { position: relative; z-index: 1; margin: 0 calc(-1 * clamp(1rem, 4vw, 2.5rem) - max(0px, (100vw - 77.5rem) / 2)) 0 0; min-width: 0; }
.dsd-hero-blend .dsd-hero-blend__img {
	display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 0;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, transparent 0%, #000 14%, #000 66%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, transparent 0%, #000 14%, #000 66%, transparent 100%);
	mask-composite: intersect;
}
.dsd-hero-blend .dsd-hero-blend__img img { width: 100%; height: 100%; object-fit: cover; }
.dsd-hero-blend .dsd-hero-blend__ring { position: absolute; inset: 8% 6% 12% 18%; z-index: -1; border-radius: 50%; background: radial-gradient(circle closest-side, rgba(97, 189, 240, .55), rgba(159, 197, 77, .25) 55%, rgba(159, 197, 77, 0)); min-height: 0 !important; padding: 0 !important; }

/* Glass strip under the hero content (byline, share, buttons…) */
.dsd-hero-blend .dsd-hero-blend__bar {
	position: relative; z-index: 2; margin-top: calc(-1 * clamp(48px, 7vw, 110px));
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
	width: 100%; padding: 18px 22px; box-sizing: border-box; border-radius: 20px;
	background: rgba(255, 255, 255, .74); border: 1px solid #ffffff; color: var(--base, #101010);
	-webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
	box-shadow: inset 0 1px 0 #ffffff, 0 24px 50px -28px rgba(36, 69, 111, .5);
}
/* 1.1.1: Bricks Shortcode elements are full width by default; in the bar they only take the room they need,
   so the byline stays on one line and the share buttons sit on the right. */
.dsd-hero-blend .dsd-hero-blend__bar > .brxe-shortcode { width: auto; min-width: 0; flex: 0 0 auto; }

/* 1.1.1: match the approved design exactly.
   - Bricks gives every Div a fixed width, which stopped the image column from stretching to the right edge of the screen.
   - The image keeps the design's height on wide screens instead of growing taller and taller.
   - The dark layer overlaps the fade by 2px, so no thin line shows where they meet. */
.dsd-hero-blend .dsd-hero-blend__art { width: auto; max-width: none; justify-self: stretch; }
/* 1.1.2: measure the bleed from the hero grid's own width (container query units), so the image reaches
   the right edge of the screen even when Bricks/ACSS adds side padding around the hero. The zone clips any overflow. */
.dsd-hero-blend .dsd-hero-blend__grid { container-type: inline-size; }
@media (min-width: 901px) {
	.dsd-hero-blend .dsd-hero-blend__art { margin: 0 calc((100cqw - 100vw) / 2) 0 0; }
}
.dsd-hero-blend .dsd-hero-blend__img { width: 100%; max-width: none; }
.dsd-hero-blend .dsd-hero-blend__solid { bottom: calc(var(--hb-fade) - 2px); }
@media (min-width: 901px) {
	.dsd-hero-blend .dsd-hero-blend__img { aspect-ratio: auto; height: min(44vw, var(--width-50, 40rem)); min-height: var(--width-30, 22.5rem); object-fit: cover; }
}
/* Tablet portrait + phones: the image runs edge to edge, as in the design (the zone clips any overflow). */
@media (max-width: 900px) {
	.dsd-hero-blend .dsd-hero-blend__art { margin-inline: calc((100cqw - 100vw) / 2) !important; }
}

/* Tablet portrait + phones: image under the text */
@media (max-width: 900px) {
	.dsd-hero-blend .dsd-hero-blend__grid { grid-template-columns: minmax(0, 1fr); }
	.dsd-hero-blend .dsd-hero-blend__text { padding-bottom: 0; }
	.dsd-hero-blend .dsd-hero-blend__art { margin: 0 calc(-1 * clamp(1rem, 4vw, 2.5rem)); }
	.dsd-hero-blend .dsd-hero-blend__img {
		aspect-ratio: 16 / 11;
		-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 100%);
		mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 100%);
	}
}

/* ---------- 1.1.6: glows that stay soft in iPhone full-page screenshots and PDFs ----------
   The site's .dsd-orb glows (Bricks global CSS) were solid circles softened with filter: blur(60px).
   iPhone full-page screenshots and "Save as PDF" drop that blur, so the glows showed as solid blobs.
   Here each orb is drawn as a colour that fades out on its own (radial gradient), so there is nothing to drop.
   This file loads on every page, so it fixes the orbs site-wide. Colours come from the ACSS palette. */
body .dsd-orb {
	filter: none;
	scale: 1.3; /* the blur used to spread the glow past its box; this keeps the same overall size */
	background: radial-gradient(circle closest-side, var(--dsd-orb-c) 0%, var(--dsd-orb-c) 35%, transparent 100%);
}
body .dsd-orb--hero-sky { --dsd-orb-c: color-mix(in oklch, var(--tertiary) 50%, transparent); }
body .dsd-orb--hero-lime { --dsd-orb-c: color-mix(in oklch, var(--secondary) 38%, transparent); }
body .dsd-orb--hero-red { --dsd-orb-c: color-mix(in oklch, var(--accent) 14%, transparent); }
body .dsd-orb--work-blue { --dsd-orb-c: color-mix(in oklch, var(--primary) 45%, transparent); }
body .dsd-orb--work-lime { --dsd-orb-c: color-mix(in oklch, var(--secondary) 25%, transparent); }
body .dsd-orb--start-sky { --dsd-orb-c: color-mix(in oklch, var(--tertiary) 32%, transparent); }
body .dsd-orb--cta-lime { --dsd-orb-c: color-mix(in oklch, var(--secondary) 55%, transparent); }
body .dsd-orb--cta-sky { --dsd-orb-c: color-mix(in oklch, var(--tertiary) 55%, transparent); }
body .dsd-orb--foot-lime { --dsd-orb-c: color-mix(in oklch, var(--secondary) 22%, transparent); }
body .dsd-orb--low-left { --dsd-orb-c: color-mix(in oklch, var(--tertiary) 32%, transparent); }
