/**
 * Hero template (template-parts/content-hero.php). Loaded for the hero
 * post types and team members (the profile reuses the back link, eyebrow,
 * subtitle, note and intro). Eyebrow, dividers and type come from
 * editorial.css; this file is the two layouts and the pieces only a hero
 * has.
 *
 * @package GeneratePress_Child
 */

/*--------------------------------------------------------------
# Split layout (default)
--------------------------------------------------------------*/
.entry-hero {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
	width: 100%;
}

@media ( min-width: 782px ) {
	.entry-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}

/* The hero title is a plain <h1>, or an <h2 class="entry-hero__title">
   when a listing shows the post as its Show Case. What the .entry-title
   rules (ours and GeneratePress's) gave it — the h1 size, no bottom
   margin, wrapping long words — is set here with the left alignment. */
.entry-hero h1,
.entry-hero .entry-hero__title {
	margin-bottom: 0;
	margin-left: 0;
	margin-right: auto;
	text-align: left;
	font-size: var(--editorial-font-size-h1);
	overflow-wrap: anywhere;
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* Brand names are set in capitals on the brand page, whatever case the
   title was typed in. A little tracking, as capitals in a serif need. The
   secondary line of a split title (the tagline) keeps its own case. */
.single-brand .entry-hero h1,
.single-brand .entry-hero .entry-hero__title {
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.single-brand .entry-hero .entry-title__secondary {
	letter-spacing: normal;
	text-transform: none;
}

.entry-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: var(--editorial-space-lg) var(--editorial-gutter);
	text-align: left;
}

.entry-hero__back {
	display: inline-block;
	margin-bottom: 1.5em;
	padding: 0.5em 1em;
	border: 1px solid currentColor;
	color: var(--editorial-muted-text);
	font-size: 0.9rem;
	text-decoration: none;
}

.entry-hero__back:is(:hover, :focus-visible) {
	color: var(--editorial-heading);
}

.entry-hero__logo {
	display: block;
	max-width: 120px;
	max-height: 60px;
	width: auto;
	margin: 0 0 1.5em;
}

.entry-hero__eyebrow {
	margin-bottom: 0.5em;
	font-size: 0.9rem;
}

/* Second line under the name (job title), then a quiet
   third one (location). */
.entry-hero__subtitle {
	margin: 0.6em 0 0;
	color: var(--editorial-muted-text);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.entry-hero__note {
	margin: 0.4em 0 0;
	color: var(--editorial-muted-text);
	font-size: 0.95rem;
}

.entry-hero .wc-chips {
	margin-top: var(--editorial-space-sm);
}

/* Comma-separated category links. */
.entry-hero__categories {
	margin: 1em 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	color: color-mix(in srgb, currentColor 75%, var(--editorial-soft-bg));
}

.entry-hero__categories li {
	display: inline;
}

.entry-hero__categories li:not(:last-child)::after {
	content: ", ";
}

.entry-hero__categories a {
	color: inherit;
	text-decoration: none;
}

.entry-hero__categories a:is(:hover, :focus-visible) {
	text-decoration: underline;
}

.entry-hero__intro {
	max-width: var(--content-reading);
	margin-top: 1.25em;
	color: color-mix(in srgb, currentColor 80%, var(--editorial-soft-bg));
}

.entry-hero__cta {
	margin-top: 2em;
}

/* "Visit Website:" uses the eyebrow style (also carries
   .entry-hero__eyebrow), but in black instead of the accent. */
.entry-hero .entry-hero__cta .entry-hero__cta-label {
	color: #000;
}

.entry-hero .entry-hero__cta-link {
	color: #000;
	word-break: break-word;
}

.entry-hero .entry-hero__cta-link:is(:hover, :focus-visible) {
	color: #000;
	text-decoration: underline;
}

.entry-hero__image {
	margin: 0;
	min-height: 320px;
}

.entry-hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*--------------------------------------------------------------
# Fullscreen layout (ACF hero_layout = Fullscreen)
--------------------------------------------------------------*/
.entry-hero--fullscreen {
	display: block;
	position: relative;
	overflow: hidden;
	min-height: 60vh;
	color: var(--editorial-on-image);
}

.entry-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.entry-hero--fullscreen::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0.6));
}

.entry-hero__overlay {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding: var(--editorial-space-lg) var(--editorial-gutter);
	text-align: center;
}

/* With a CTA the image is a link (hero-fullscreen.php): the gradient and
   the overlay let clicks through to it, except on their own links. The
   image itself is left alone. */
.entry-hero--fullscreen:has(> a)::after,
.entry-hero--fullscreen:has(> a) .entry-hero__overlay {
	pointer-events: none;
}

.entry-hero--fullscreen .entry-hero__overlay a {
	pointer-events: auto;
}

/* The accent text link would sit dark on the dark gradient. */
.entry-hero--fullscreen .entry-hero__cta-link {
	color: inherit;
	text-decoration: underline;
}

.entry-hero--fullscreen .entry-hero__back {
	position: absolute;
	top: var(--editorial-gutter);
	left: var(--editorial-gutter);
}

.entry-hero--fullscreen h1,
.entry-hero--fullscreen .entry-hero__title {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	color: var(--editorial-on-image);
	font-size: clamp(3rem, 2rem + 6vw, 7rem);
}

.entry-title__primary {
	display: block;
}

.entry-title__secondary {
	display: block;
	margin-top: 0.15em;
	font-size: 0.35em;
	font-weight: 400;
}

.entry-hero__divider {
	margin: 1.25em 0;
}

.entry-hero__meta {
	max-width: var(--content-reading);
	margin: 0;
	font-size: 0.95rem;
	letter-spacing: 0.03em;
}

.entry-hero__meta-label {
	margin: 0 0.4em 0 0;
	font-size: 0.8em;
}

/* The same line in the split and banner heroes (template-parts/hero-meta.php),
   under the title. */
.entry-hero:not(.entry-hero--fullscreen) .entry-hero__meta {
	margin-top: var(--editorial-space-sm);
	color: var(--editorial-text);
}

/* The excerpt of a Fullscreen hero renders below the image on the page
   background: title as eyebrow, divider, excerpt as a big serif line. */
.entry-hero__excerpt {
	max-width: var(--editorial-heading-measure);
	margin: 0 auto;
	padding: var(--editorial-space-lg) var(--editorial-gutter);
	text-align: center;
}

.entry-hero__excerpt-divider {
	margin: 0 auto 1.25em;
}

.entry-hero__excerpt h2 {
	margin: 0;
	font-size: clamp(1.75rem, 1.4rem + 2vw, 3rem);
	line-height: 1.3;
}

/*--------------------------------------------------------------
# Article hero (templates/hero-post.php)
--------------------------------------------------------------*/
/* The fullscreen band, set for an article: a shorter band and a title
   sized for headlines of ten words or more, the excerpt as a dek and the
   byline under a rule. Everything on the photo takes the on-image colour;
   the eyebrow and back link are links, which would otherwise come out in
   the accent text shade, dark on the dark gradient. */
.entry-hero--article,
.entry-hero--article .entry-hero__overlay {
	min-height: clamp(26rem, 62vh, 40rem);
}

.entry-hero--article .entry-hero__overlay {
	padding-block: calc(var(--editorial-space-xl) + var(--editorial-space-sm)) var(--editorial-space-xl);
}

.entry-hero--article .entry-title {
	max-width: var(--editorial-heading-measure);
	margin-block: 0;
	font-size: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
	line-height: 1.08;
}

.entry-hero--article :is(.entry-hero__eyebrow, .entry-hero__back) {
	color: var(--editorial-on-image);
	text-decoration: none;
}

.entry-hero--article .entry-hero__eyebrow {
	margin: 0 0 var(--editorial-space-sm);
}

.entry-hero--article :is(.entry-hero__eyebrow, .entry-hero__back):is(:hover, :focus-visible) {
	text-decoration: underline;
}

.entry-hero__dek {
	max-width: var(--content-reading);
	margin: var(--editorial-space-md) 0 0;
	font-size: var(--editorial-font-size-lede);
	line-height: 1.45;
}

.entry-hero--article .entry-hero__divider {
	background: currentColor;
	opacity: 0.6;
}

/* No image: a tinted band, dark text, no gradient. */
.entry-hero--plain {
	background: var(--editorial-band);
	color: var(--editorial-text);
}

.entry-hero--plain::after {
	content: none;
}

.entry-hero--plain .entry-title,
.entry-hero--plain :is(.entry-hero__eyebrow, .entry-hero__back) {
	color: var(--editorial-heading);
}

.entry-hero--plain .entry-hero__eyebrow {
	color: var(--editorial-accent-text);
}

.entry-hero--plain .entry-hero__divider {
	background: var(--editorial-accent);
	opacity: 1;
}

@media ( max-width: 600px ) {
	.entry-hero--article .entry-hero__back {
		position: static;
		margin-bottom: var(--editorial-space-md);
	}

	.entry-hero--article .entry-hero__overlay {
		padding-block: var(--editorial-space-lg);
	}
}

/*--------------------------------------------------------------
# Banner layout (ACF hero_layout = Banner, template-parts/hero-banner.php)
--------------------------------------------------------------*/
/* The image fills the hero; a wash of the page colour from the left keeps
   the dark text readable and fades out before the middle, so the right of
   the picture shows as it is. Phones: the image above, the text below on
   the band, no wash. */
.entry-hero--banner {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	min-height: clamp(32rem, 72svh, 46rem);
	background: var(--editorial-band);
	color: var(--editorial-text);
}

.entry-hero--banner .entry-hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	margin: 0;
	overflow: hidden;
}

.entry-hero--banner .entry-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.entry-hero--banner .entry-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		color-mix(in srgb, var(--editorial-page) 92%, transparent) 0%,
		color-mix(in srgb, var(--editorial-page) 82%, transparent) 38%,
		color-mix(in srgb, var(--editorial-page) 0%, transparent) 72%
	);
	pointer-events: none;
}

.entry-hero--banner .entry-hero__content {
	width: min(100%, 48rem);
	padding: var(--editorial-space-lg) var(--editorial-gutter);
}

.entry-hero--banner .entry-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 1.25em;
	margin-bottom: var(--editorial-space-sm);
	font-size: 0.9rem;
	letter-spacing: 0.12em;
}

.entry-hero--banner .entry-hero__eyebrow::after {
	content: "";
	flex: 0 0 3.5rem;
	height: 1px;
	background: currentColor;
}

/* The excerpt: the large line. */
.entry-hero__headline,
.entry-hero--title-lead h1,
.entry-hero--title-lead .entry-hero__title {
	margin: 0;
	color: var(--editorial-heading);
	font-family: var(--wc-font-serif);
	font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
	font-weight: 600;
	line-height: 1.05;
	text-wrap: balance;
}

/* The title under it, in italic. The extra class outweighs the brand
   page's capitals (.single-brand .entry-hero h1). */
.entry-hero.entry-hero--banner h1,
.entry-hero.entry-hero--banner .entry-hero__title {
	margin: 0.45em 0 0;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.4rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	-webkit-hyphens: manual;
	hyphens: manual;
}

.entry-hero.entry-hero--title-lead h1,
.entry-hero.entry-hero--title-lead .entry-hero__title {
	margin-top: 0;
	font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
	font-style: normal;
	font-weight: 600;
	line-height: 1.05;
}

.entry-hero--banner .entry-hero__intro {
	max-width: 36rem;
	margin-top: var(--editorial-space-sm);
	color: var(--editorial-text);
	font-size: 1.15rem;
	line-height: 1.5;
}

.entry-hero--banner .entry-hero__intro > :last-child {
	margin-bottom: 0;
}

.entry-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 2.5rem;
	margin-top: var(--editorial-space-md);
}

/* The button keeps the theme's colours (Customize → Colors → Buttons,
   the accent fill on hover); only an arrow is added. */
.entry-hero__button {
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
}

.entry-hero__button::after {
	content: "\2192";
	transition: transform 200ms ease;
}

.entry-hero__button:is(:hover, :focus-visible)::after {
	transform: translateX(0.25em);
}

/* Second link: plain text over an accent hairline. */
.entry-hero__link {
	padding-bottom: 0.3em;
	border-bottom: 1px solid var(--editorial-accent-text);
	color: var(--editorial-heading);
	font-weight: 500;
	text-decoration: none;
	transition: color 200ms ease;
}

.entry-hero__link:is(:hover, :focus-visible) {
	color: var(--editorial-accent-text);
}

@media ( max-width: 781px ) {
	.entry-hero--banner {
		min-height: 0;
	}

	.entry-hero--banner .entry-hero__media {
		position: relative;
		inset: auto;
		z-index: auto;
		aspect-ratio: 4 / 3;
	}

	/* No wash, and no rule after an eyebrow that wraps to two lines. */
	.entry-hero--banner .entry-hero__media::after,
	.entry-hero--banner .entry-hero__eyebrow::after {
		content: none;
	}
}

/*--------------------------------------------------------------
# Request a Meeting (inc/event-meeting.php, assets/js/meeting-dialog.js)
--------------------------------------------------------------*/
/* Upcoming events: a filled button before the hero CTA, the same size and
   lettering as the outline CTA beside it, in the theme's button colours
   (Customize → Colors → Buttons) with the accent fill on hover. */
.entry-hero__cta--meeting {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.25rem;
}

.entry-hero--fullscreen .entry-hero__cta--meeting {
	justify-content: center;
}

.entry-hero__cta .entry-hero__meeting {
	padding: 1em 2.75em;
	border: 0;
	font-family: var(--wc-font-sans);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
}

/* In the Banner it sits with the theme's own filled button, and gets its
   arrow too. */
.entry-hero__actions .entry-hero__meeting {
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
	cursor: pointer;
}

.entry-hero__actions .entry-hero__meeting::after {
	content: "\2192";
	transition: transform 200ms ease;
}

.entry-hero__actions .entry-hero__meeting:is(:hover, :focus-visible)::after {
	transform: translateX(0.25em);
}

body .entry-hero__meeting:is(:hover, :focus-visible) {
	background-color: var(--editorial-accent-fill);
	color: var(--editorial-on-accent);
}

/* The fullscreen overlay lets clicks through to the image link; the
   button takes them back, as the links do. */
.entry-hero--fullscreen .entry-hero__overlay button {
	pointer-events: auto;
}

/* The pop-up. */
.wc-meeting {
	width: min(44rem, calc(100vw - 2rem));
	max-height: calc(100svh - 2rem);
	padding: 0;
	border: 0;
	background: var(--editorial-page);
	color: var(--editorial-text);
	text-align: left;
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.25);
}

.wc-meeting::backdrop {
	background: rgb(0 0 0 / 0.55);
}

html.has-wc-dialog {
	overflow: hidden;
}

.wc-meeting__inner {
	position: relative;
	padding: clamp(1.5rem, 1rem + 3vw, 3rem);
}

.wc-meeting__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--editorial-heading);
	font-size: 2rem;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.wc-meeting__close:is(:hover, :focus-visible) {
	background: transparent;
	color: var(--editorial-accent-text);
}

.wc-meeting__eyebrow {
	margin: 0 3rem 0.5rem 0;
	color: var(--editorial-accent-text);
	font-family: var(--wc-font-sans);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.wc-meeting h2 {
	margin: 0 3rem var(--editorial-space-sm) 0;
	font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
	line-height: 1.15;
}

.wc-meeting__intro {
	max-width: 34em;
	margin: 0 0 var(--editorial-space-md);
}

/*--------------------------------------------------------------
# Gallery (ACF gallery field)
--------------------------------------------------------------*/
.entry-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--editorial-gap);
	padding: 0 var(--editorial-gutter) var(--editorial-space-lg);
}

.entry-gallery img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/*--------------------------------------------------------------
# Hero video (inc/hero-video.php, assets/js/hero-video.js)
--------------------------------------------------------------*/
/* Sits exactly over the hero image and stays invisible until it is
   actually playing, so the image (the poster) shows until then and is
   all that phones ever see. pointer-events: none keeps a CTA image link
   underneath clickable. In the fullscreen layout the darkening gradient
   (::after) comes later in the stacking order, so it covers the video
   too and the white title keeps its contrast. */
.entry-hero__image {
	position: relative;
}

.wc-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	pointer-events: none;
	transition: opacity 800ms ease;
}

.wc-hero-video.is-playing {
	opacity: 1;
}

.wc-hero-video__toggle {
	position: absolute;
	right: var(--editorial-space-sm);
	bottom: var(--editorial-space-sm);
	z-index: 2;
	display: inline-grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 0.7);
	border-radius: 50%;
	background: rgb(0 0 0 / 0.35);
	color: var(--editorial-on-image);
	cursor: pointer;
	transition: background-color 200ms ease;
}

.wc-hero-video__toggle[hidden] {
	display: none;
}

.wc-hero-video__toggle:is(:hover, :focus-visible) {
	background: rgb(0 0 0 / 0.6);
}

.wc-hero-video__icon-play,
.wc-hero-video__toggle.is-paused .wc-hero-video__icon-pause {
	display: none;
}

.wc-hero-video__toggle.is-paused .wc-hero-video__icon-play {
	display: block;
}
