/* IC Hero: Video (patterns/ic-hero-video.php). Generalized from plaza-utc-hero + scd-hero; Figma demo Offices Home 5797:192850.
 * Layers inside the cover's inner container (one stacking context, z-index 1 over the poster image):
 *   video (auto) → bottom scrim ::before (1) → headline (2) → top bar (3) → landing.js Pause/Play toggle (6).
 * The video figure is absolutely placed with no z-index of its own, so its toggle competes in this same context and stays clickable. */
.tt5c-ic-hero-video.wp-block-cover {
	box-sizing: border-box;
	min-height: max(32rem, min(100svh, 56.25vw)); /* approximate — from Figma 5797:192850 (1920×1080 incl. bar) */
	padding: 0;
	align-items: stretch;
}
.tt5c-ic-hero-video .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	margin: 0;
}
/* Bottom scrim so the headline holds contrast on any frame. */
.tt5c-ic-hero-video .wp-block-cover__inner-container::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(0deg, var(--ico-color-overlay-dark) 0%, transparent 55%);
}

/* Ambient video: fills the hero; transparent until its first frame (landing-base `--reveal`). */
.tt5c-ic-hero-video .tt5c-ic-hero-video__video {
	position: absolute;
	inset: 0;
	margin: 0;
}
/* Pause/Play stays visible (WCAG 2.2.2), bottom right on the page rail, under the headline row. */
.tt5c-ic-hero-video .tt5c-ambient__toggle {
	right: var(--wp--custom--layout--gutter);
	bottom: var(--wp--preset--spacing--20);
}

/* ---------- Top bar (D14). Default: light (Warm White 1, Black links). ---------- */
.tt5c-ic-hero-video__bar {
	position: relative;
	z-index: 3;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	gap: var(--wp--preset--spacing--35);
	padding: var(--wp--preset--spacing--27) var(--wp--custom--layout--gutter);
	background-color: var(--wp--preset--color--surface);
	color: var(--ico-color-text);
}
.tt5c-ic-hero-video__logo {
	margin: 0;
	flex: 0 0 auto;
	line-height: 0;
}
.tt5c-ic-hero-video__logo img {
	display: block;
	width: clamp(140px, 13.2vw, 253px); /* approximate — from Figma 5797:192850 (IC logo 253×23 at 1920) */
	height: auto;
}
.tt5c-ic-hero-video__menu {
	gap: var(--wp--preset--spacing--40);
	margin: 0;
}
.tt5c-ic-hero-video__cta { margin: 0; flex-wrap: nowrap; }
.tt5c-ic-hero-video__cta .wp-block-button__link { white-space: nowrap; }

/* Anchor links: Nav v2 / Link. */
.tt5c-ic-hero-video__nav { margin: 0; }
.tt5c-ic-hero-video__nav .wp-block-navigation-item__content {
	font-family: var(--ico-type-nav-v2-link-family);
	font-size: var(--ico-type-nav-v2-link-size);
	font-weight: var(--ico-type-nav-v2-link-weight);
	line-height: var(--ico-type-nav-v2-link-lh);
	letter-spacing: var(--ico-type-nav-v2-link-ls);
	text-transform: var(--ico-type-nav-v2-link-case);
	color: inherit;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: var(--ico-btn-text-rule-height);
	text-underline-offset: var(--wp--preset--spacing--10);
	white-space: nowrap;
	transition: text-decoration-color .2s;
}
.tt5c-ic-hero-video__nav .wp-block-navigation-item__content:is(:hover, :focus-visible) {
	color: inherit;
	text-decoration-color: var(--ico-color-link-attention);
}
/* Phone overlay menu (core opens it ≤600px): over the Pause/Play toggle, in the bar's colours, not core's white. */
.tt5c-ic-hero-video__bar:has(.is-menu-open) { z-index: 7; }
.wp-block-navigation.tt5c-ic-hero-video__nav .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--surface);
	color: var(--ico-color-text);
	padding: var(--wp--preset--spacing--27) var(--wp--custom--layout--gutter);
}
.wp-block-navigation.tt5c-ic-hero-video__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--27);
}

/* Dark variant: add `tt5c-ic-hero-video--bar-dark` to the cover. The bar goes see-through over the video with on-dark
 * links, a top scrim for contrast and the logo knocked out to white. */
.tt5c-ic-hero-video--bar-dark .tt5c-ic-hero-video__bar {
	background: linear-gradient(180deg, var(--ico-color-overlay-dark) 0%, transparent 100%);
	color: var(--ico-color-on-dark);
}
.tt5c-ic-hero-video--bar-dark .tt5c-ic-hero-video__logo img { filter: brightness(0) invert(1); }
.tt5c-ic-hero-video--bar-dark .wp-block-navigation.tt5c-ic-hero-video__nav .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--primary);
	color: var(--ico-color-on-dark);
}

/* ---------- Headline (Figma Title 5203:91124: rule, 24px, H1 row; bottom left) ---------- */
.tt5c-ic-hero-video__content {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 100%;
	margin: auto 0 0;
	padding: var(--wp--preset--spacing--50) var(--wp--custom--layout--gutter) calc(var(--wp--custom--layout--tap) + var(--wp--preset--spacing--20) + var(--wp--preset--spacing--20));
}
.tt5c-ic-hero-video__rule.wp-block-separator {
	width: 100%;
	max-width: none;
	height: 0;
	margin: 0 0 var(--wp--preset--spacing--27);
	border: 0;
	border-top: 1px solid currentColor; /* approximate — from Figma 5797:192850 (Lines) */
	background: none;
	opacity: 1;
}
.tt5c-ic-hero-video__row {
	gap: var(--wp--preset--spacing--27);
	margin: 0;
}
/* Size and weight come from the theme's h1 role (Headline/Hero 36/51/72). */
.tt5c-ic-hero-video__title {
	margin: 0;
	flex: 1 1 0;
	min-width: min(100%, 12ch);
	max-width: var(--wp--custom--layout--statement);
	overflow-wrap: break-word;
}

/* Play Video (tt5c/video-cta) in the ico Stroke White LG language. These selectors outrank the block stylesheet. */
.tt5c-ic-hero-video .tt5c-video-cta--hero { margin: 0; flex: 0 0 auto; }
.tt5c-ic-hero-video .tt5c-video-cta--hero .tt5c-video-cta__link {
	--tt5c-video-cta-padding-block: 0px;
	--tt5c-video-cta-optical-shift: 0px;
	--tt5c-video-cta-icon: var(--ico-btn-lg-icon);
	gap: var(--ico-btn-lg-gap);
	min-height: var(--ico-btn-lg-height);
	padding: var(--ico-btn-lg-padding);
	border: 0;
	border-radius: var(--ico-btn-radius);
	background-color: var(--ico-btn-stroke-white-default-bg);
	box-shadow: inset 0 0 0 var(--ico-btn-border-width) var(--ico-btn-stroke-white-default-border);
	color: var(--ico-btn-stroke-white-default-fg);
	font-family: var(--ico-type-button-label-lg-family);
	font-size: var(--ico-type-button-label-lg-size);
	font-weight: var(--ico-type-button-label-lg-weight);
	line-height: var(--ico-type-button-label-lg-lh);
	letter-spacing: var(--ico-type-button-label-lg-ls);
	text-transform: var(--ico-type-button-label-lg-case);
	transition: background-color .2s, color .2s, box-shadow .2s;
}
.tt5c-ic-hero-video .tt5c-video-cta--hero .tt5c-video-cta__link:is(:hover, :focus-visible) {
	background-color: var(--ico-btn-stroke-white-hover-bg);
	box-shadow: inset 0 0 0 var(--ico-btn-border-width) var(--ico-btn-stroke-white-hover-border);
	color: var(--ico-btn-stroke-white-hover-fg);
}
.tt5c-ic-hero-video .tt5c-video-cta--hero .tt5c-video-cta__link:active {
	background-color: var(--ico-btn-stroke-white-press-bg);
	box-shadow: inset 0 0 0 var(--ico-btn-border-width) var(--ico-btn-stroke-white-press-border);
	color: var(--ico-btn-stroke-white-press-fg);
}
.tt5c-ic-hero-video .tt5c-video-cta--hero .tt5c-video-cta__link:focus-visible {
	outline: var(--ico-btn-focus-ring-width) solid var(--ico-color-on-dark);
	outline-offset: var(--ico-btn-focus-ring-offset);
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.tt5c-ic-hero-video__nav { --wp--style--block-gap: var(--wp--preset--spacing--35); }
	.tt5c-ic-hero-video__nav .wp-block-navigation__container { gap: var(--wp--preset--spacing--35); }
	.tt5c-ic-hero-video__menu { gap: var(--wp--preset--spacing--35); }
}
/* Tablet: the links and Contact drop to a second row under the logo. */
@media (max-width: 900px) {
	.tt5c-ic-hero-video__bar { flex-wrap: wrap; row-gap: var(--wp--preset--spacing--20); }
	.tt5c-ic-hero-video__menu { flex: 1 1 100%; justify-content: space-between; }
}
/* Phone: core turns the links into a menu button; logo, menu button and Contact share one row again. */
@media (max-width: 600px) {
	.tt5c-ic-hero-video.wp-block-cover { min-height: 36rem; } /* derived — not Figma */
	.tt5c-ic-hero-video__bar { flex-wrap: nowrap; gap: var(--wp--preset--spacing--20); padding-block: var(--wp--preset--spacing--20); }
	.tt5c-ic-hero-video__menu { flex: 0 0 auto; gap: var(--wp--preset--spacing--20); }
	.tt5c-ic-hero-video__logo img { width: 128px; } /* derived — not Figma */
	.tt5c-ic-hero-video__cta .wp-block-button__link { padding-inline: var(--wp--preset--spacing--20); }
	.tt5c-ic-hero-video__title { flex-basis: 100%; }
}
