/* Webinar hero: a wide photo with the headline card straddling its left edge
   and an event ticket straddling its bottom edge on the right. Built for the
   call-outs webinar page (30 Oct 2026) so a webinar reads as an event, not as
   a copy of the arch, peek or plate heroes the rest of the site uses.

   Everything is scoped to .esc-webinar-hero, and the file is enqueued only
   when a group carrying that class renders (see escalate_webinar_hero_stil).

   Colours are the exact brand values: blue #1B3CF5, white, orange #EA8C2E for
   the live dot, and the site's ink and line tokens for the card. */

.esc-hero.esc-webinar-hero {
	padding-block: clamp(12px, 2.4vh, 32px) clamp(40px, 6vh, 72px);
}

.esc-webinar-hero__stage {
	/* Photo height follows the screen height so the hero ends inside the first
	   screen: header (about 153px) + top padding + photo + ticket tail. */
	--ph: clamp(360px, calc(100svh - 300px), 560px);
	--tail: 56px;
	position: relative;
	padding-bottom: var(--tail);
}

/* ---------- photo ---------- */
.esc-webinar-hero__photo {
	margin: 0 0 0 34%;
	width: 66%;
	height: var(--ph);
	border-radius: var(--r-lg, 22px);
	overflow: hidden;
}
.esc-webinar-hero__photo figure,
.esc-webinar-hero__photo .wp-block-image {
	margin: 0;
	width: 100%;
	height: 100%;
}
.esc-webinar-hero__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
}

/* ---------- headline card: wrapper left edge, onto the photo ---------- */
.esc-webinar-hero__card {
	/* Centred on the photo, so the space above and below it is even. */
	position: absolute;
	z-index: 2;
	left: 0;
	top: calc(var(--ph) / 2);
	transform: translateY(-50%);
	margin: 0;
	width: 46%;
	box-sizing: border-box;
	padding: clamp(26px, 2.6vw, 40px);
	background: #FFFFFF;
	border: 1px solid var(--line, #E7E9F2);
	border-radius: var(--r-lg, 22px);
	box-shadow: var(--sh-2, 0 8px 30px rgba(16, 16, 29, .08));
}
.esc-webinar-hero h1.wp-block-heading {
	font-size: clamp(2rem, min(3.3vw, 5.6vh), 3rem);
	line-height: 1.08;
	margin: 0 0 .5em;
}
/* The coloured phrase stays on one line, so the heading breaks as
   "Most call-outs / have a fix." instead of leaving "fix." alone.
   (text-wrap: balance broke it at the hyphen in "call-outs".) */
.esc-webinar-hero h1.wp-block-heading mark {
	white-space: nowrap;
}
.esc-webinar-hero .esc-hero__lede {
	font-size: 1.02rem;
	max-width: none;
	margin: 0 0 1.4rem;
}
.esc-webinar-hero .wp-block-buttons.esc-hero__cta {
	margin-top: 0;
}
.esc-webinar-hero .esc-cred {
	margin-top: 1.1rem;
}

/* ---------- ticket: wrapper right edge, across the photo's bottom edge ---------- */
.esc-webinar-hero__ticket {
	--notch: 46px;
	position: absolute;
	z-index: 3;
	right: 0;
	bottom: 0;
	width: 360px;
	box-sizing: border-box;
	padding: 18px 26px 22px;
	background: #1B3CF5;
	color: #FFFFFF;
	border-radius: 16px;
	/* Two half-circle notches at the tear line, cut with a mask so the photo
	   shows through them. The mask is a shape, nothing visible is shaded. */
	-webkit-mask:
		radial-gradient(circle 9px at 0 var(--notch), #0000 97%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle 9px at 100% var(--notch), #0000 97%, #000) right / 51% 100% no-repeat;
	mask:
		radial-gradient(circle 9px at 0 var(--notch), #0000 97%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle 9px at 100% var(--notch), #0000 97%, #000) right / 51% 100% no-repeat;
}
.esc-webinar-hero__ticket p {
	margin: 0;
	color: #FFFFFF;
}
.esc-webinar-hero__ticket p.esc-webinar-hero__live {
	display: flex;
	align-items: center;
	gap: .55rem;
	height: calc(var(--notch) - 18px);
	font-family: var(--body);
	font-weight: 600;
	font-size: .76rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	/* The tear line sits exactly on the notches. */
	border-bottom: 2px dashed #FFFFFF;
	padding-bottom: 0;
	margin-bottom: 14px;
}
.esc-webinar-hero__live::before {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #EA8C2E;
}
.esc-webinar-hero__ticket p.esc-webinar-hero__day {
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1.15;
	margin-bottom: .45rem;
}
.esc-webinar-hero__ticket p.esc-webinar-hero__time,
.esc-webinar-hero__ticket p.esc-webinar-hero__length {
	font-size: .95rem;
	line-height: 1.45;
}

/* ---------- 900px and below: one column, ticket under the headline ---------- */
@media (max-width: 900px) {
	.esc-hero.esc-webinar-hero {
		padding-block: 12px 40px;
	}
	.esc-webinar-hero__stage {
		display: flex;
		flex-direction: column;
		padding-bottom: 0;
	}
	/* The card's children join the column so the ticket can sit between the
	   headline and the intro. */
	.esc-webinar-hero__card {
		display: contents;
	}
	.esc-webinar-hero__card > .esc-eyebrow { order: 1; }
	.esc-webinar-hero__card > h1 { order: 2; }
	.esc-webinar-hero__ticket,
	.esc-webinar-hero__card > .esc-webinar-hero__when { order: 3; }
	.esc-webinar-hero__card > .esc-hero__lede { order: 4; }
	.esc-webinar-hero__card > .esc-hero__cta { order: 5; }
	.esc-webinar-hero__card > .esc-cred { order: 6; }
	.esc-webinar-hero__photo { order: 7; }

	.esc-webinar-hero h1.wp-block-heading {
		font-size: clamp(2rem, 8.4vw, 2.8rem);
		margin-bottom: .45em;
	}
	/* Two classes, so the group layout's own block margins do not win. */
	.esc-webinar-hero .esc-webinar-hero__ticket {
		--notch: 40px;
		position: static;
		transform: none;
		width: 100%;
		max-width: 420px;
		padding: 14px 20px 16px;
		margin: 0 0 1.2rem;
	}
	.esc-webinar-hero__ticket p.esc-webinar-hero__live { margin-bottom: 10px; }
	.esc-webinar-hero__ticket p.esc-webinar-hero__day { font-size: 1.15rem; margin-bottom: .3rem; }
	.esc-webinar-hero__ticket p.esc-webinar-hero__time,
	.esc-webinar-hero__ticket p.esc-webinar-hero__length { font-size: .9rem; }
	.esc-webinar-hero .esc-hero__lede { margin-bottom: 1.1rem; }
	.esc-webinar-hero__photo {
		margin: 1.6rem 0 0;
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}
}

/* Date line inside the headline card. 1.1.4: the ticket was cut on Rene's call, 30 Oct 2026. */
.esc-webinar-hero .esc-webinar-hero__when {
	margin: 0 0 .9rem;
}
