/* =========================================================================
   How-to videos: template-video-library.php.
   Scoped to .hv. Mobile first, min-width queries at 640 / 768 / 900 / 1200.
   House style from the 18 Sep 2026 spec (the .sg/.wb/.su/.cr common
   denominator): navy #181d46, light blue #90cdeb, 2px buttons, 4px cards,
   Green Grey closing band. The video grid follows the media page (.md).
   ========================================================================= */

.hv {
	--hv-navy: #181d46;      /* Billi Blue */
	--hv-lightblue: #90cdeb; /* primary button on dark, accents */
	--hv-grey: #eaeaea;      /* borders, rules */
	--hv-band-grey: #f5f5f5;
	--hv-band-tint: #f1f5f5; /* Green Grey */
	--hv-text: #000;
	--hv-muted: #75757b;
	--hv-gutter: 20px;
	font-family: var(--font-din);
	color: var(--hv-text);
	line-height: 1.5;
}

@media (min-width: 900px) {
	.hv { --hv-gutter: 40px; }
}

.hv *,
.hv *::before,
.hv *::after { box-sizing: border-box; }

/* framework.css sets a global img { width: 100% }: width must be reset, not
   just max-width. */
.hv img { max-width: 100%; width: auto; height: auto; display: block; }

.hv-container {
	width: 100%;
	max-width: 1436px;
	margin: 0 auto;
	padding-left: var(--hv-gutter);
	padding-right: var(--hv-gutter);
}

.hv-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.hv-icon { flex: 0 0 auto; width: 1em; height: 1em; }


/* ---- Sections ------------------------------------------------------------
   White, grey or tint bands; navy only for the hero, never the last
   section. */

.hv-section {
	padding: 48px 0;
	scroll-margin-top: calc(var(--header-chrome-h, 74px) + var(--trust-bar-h, 46px));
}

@media (min-width: 900px) {
	.hv-section { padding: 80px 0; }
}

.hv-section--grey { background: var(--hv-band-grey); }

.hv :is(h2, h3) {
	margin-top: 0;
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.hv .hv-section-heading {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	color: var(--hv-navy);
}

.hv .hv-section-intro {
	margin: 0;
	max-width: 66ch;
	font-size: 17px;
	line-height: 1.55;
	color: var(--hv-muted);
}

.hv-section-head { margin-bottom: 28px; }

@media (min-width: 900px) {
	.hv .hv-section-heading { font-size: 34px; }
	.hv-section-head { margin-bottom: 40px; }
}


/* ---- Buttons ------------------------------------------------------------
   desktop.css has a global a:hover { opacity: .7 }: every button opts out. */

/* 16px on a 1.5 line with 12px padding: 48px tall, the size the homepage,
   Why Billi, Specify Billi and the sector pages use. */
.hv .hv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: 2px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.hv .hv-btn:hover,
.hv .hv-btn:focus-visible { opacity: 1; }

.hv .hv-btn--navy { background: var(--hv-navy); color: #fff; }
.hv .hv-btn--navy:hover,
.hv .hv-btn--navy:focus-visible { background: #fff; color: var(--hv-navy); box-shadow: inset 0 0 0 1px var(--hv-navy); }

.hv .hv-btn--light { background: var(--hv-lightblue); color: var(--hv-navy); }
.hv .hv-btn--light:hover,
.hv .hv-btn--light:focus-visible { background: #fff; color: var(--hv-navy); }

.hv .hv-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.hv .hv-btn--ghost:hover,
.hv .hv-btn--ghost:focus-visible { background: #fff; color: var(--hv-navy); box-shadow: none; }

.hv .hv-btn--outline { background: transparent; color: var(--hv-navy); box-shadow: inset 0 0 0 1px var(--hv-navy); }
.hv .hv-btn--outline:hover,
.hv .hv-btn--outline:focus-visible { background: var(--hv-navy); color: #fff; }

.hv .hv-btn .hv-icon--ext { width: 14px; height: 14px; }

/* framework.css removes focus outlines sitewide. Navy on light grounds
   (#90cdeb on white is 1.7:1), white on the navy hero. */
.hv :is(a, button, summary, input, select, textarea, iframe):focus-visible {
	outline: 2px solid var(--hv-navy);
	outline-offset: 3px;
}

.hv .hv-hero :is(a, button):focus-visible { outline-color: #fff; }


/* ---- Hero ----------------------------------------------------------------
   Navy, no photograph: the old banner was a 1400x253 graphic with a play
   icon baked in. The h1 takes DM Serif Display from typography.css, so
   neither its weight nor its family is set here. */

.hv-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 340px;
	background: var(--hv-navy);
	color: #fff;
	overflow: hidden;
}

.hv-hero__inner { width: 100%; padding-top: 48px; padding-bottom: 48px; }

.hv-hero__content { max-width: 720px; }

.hv-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--hv-lightblue);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.hv .hv-hero__title { margin: 0; color: #fff; font-size: 34px; line-height: 1.12; }

.hv-hero__intro {
	margin: 16px 0 0;
	max-width: 62ch;
	color: rgba(255, 255, 255, .9);
	font-size: 17px;
	line-height: 1.5;
}

.hv-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hv-hero__actions:empty { display: none; }

@media (min-width: 900px) {
	.hv-hero__inner { padding-top: 72px; padding-bottom: 72px; }
	.hv .hv-hero__title { font-size: 52px; }
	.hv-hero__intro { font-size: 18px; }
}


/* ---- Video groups -------------------------------------------------------
   The videos are 426x240 on Vimeo, so the cards are kept near that width on
   a wide screen: heading in the first of three columns, two cards in the
   other two. Below that, heading on top and two cards, then one. */

.hv-group__inner { display: grid; gap: 28px; }

.hv-group__head { min-width: 0; }

.hv-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* min-width: 0 because the blocked-embed placeholder reports a wider
   min-content than the track (the media page's lesson). */
.hv-grid__item { min-width: 0; margin: 0; }

@media (min-width: 640px) {
	.hv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
	.hv-group__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		gap: 32px;
		align-items: start;
	}

	.hv-grid { gap: 32px; }

	.hv-group__head { padding-right: 24px; }
}

.hv-video { display: flex; flex-direction: column; height: 100%; }

.hv-video__frame-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	background: var(--hv-navy);
}

/* The iframe fills the box. Only the iframe (and an image, should Complianz
   ever use one): its "Click to accept" notice is a button it centres itself,
   and stretching that turned it into a 300px-wide dark slab. */
.hv-video__frame-wrap > :is(iframe, img) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.hv .hv-video__frame-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* Complianz hangs a .cmplz-placeholder-N class on this wrapper and injects a
   rule giving it a hardcoded pixel height worked out from the thumbnail, so a
   grid of blocked videos goes ragged until consent. (0,3,0) beats its
   (0,1,0) without !important, and the box keeps its ratio. */
.hv .hv-grid__item .hv-video__frame-wrap[class*="cmplz-placeholder-"] {
	height: auto;
	min-height: 0;
	aspect-ratio: 16 / 9;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hv .hv-video__title {
	margin: 16px 0 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--hv-navy);
	text-wrap: balance;
}

.hv .hv-video__for {
	margin: 6px 0 0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--hv-muted);
}

.hv-video__for-label { font-weight: 600; color: var(--hv-navy); }

.hv .hv-video__text {
	margin: 8px 0 0;
	font-size: 16px;
	line-height: 1.45;
	color: var(--hv-muted);
}

.hv .hv-video__guide {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: 14px;
	padding-bottom: 2px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hv-navy);
	text-decoration: none;
	border-bottom: 2px solid var(--hv-lightblue);
	transition: border-color .2s ease;
}

.hv .hv-video__guide:hover { opacity: 1; border-bottom-color: var(--hv-navy); }

.hv-icon--arrow { transition: transform .2s ease; }

.hv .hv-video__guide:hover .hv-icon--arrow { transform: translateX(3px); }

.hv .hv-group__note {
	margin: 32px 0 0;
	max-width: 66ch;
	padding-left: 14px;
	border-left: 2px solid var(--hv-lightblue);
	font-size: 16px;
	line-height: 1.5;
	color: var(--hv-text);
}

@media (min-width: 1200px) {
	/* Under the cards, not under the heading column. */
	.hv .hv-group__note { grid-column: 2; margin-top: 0; }
}


/* ---- More help: linked cards ---------------------------------------------
   Whole card clickable through one stretched link (no nested links). */

.hv-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hv-cards__item { min-width: 0; margin: 0; }

/* One column, then three: there are three cards, and a two-column step
   leaves the third alone on its own row (the media page's news cards). */
@media (min-width: 900px) {
	.hv-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}

.hv-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	padding: 24px;
	border: 1px solid var(--hv-grey);
	border-radius: 4px;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.hv-card:hover,
.hv-card:focus-within {
	border-color: var(--hv-navy);
	box-shadow: 0 6px 24px rgba(24, 29, 70, .08);
}

.hv-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	border-radius: 4px;
	background: var(--hv-band-tint);
	color: var(--hv-navy);
}

.hv .hv-card__icon svg { width: 26px; height: 26px; }

.hv .hv-card__title {
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--hv-navy);
}

.hv .hv-card__link {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

.hv .hv-card__link::after { content: ''; position: absolute; inset: 0; }

.hv .hv-card__link:hover { opacity: 1; }

/* desktop.css sets a { font-weight: 600 } globally; card copy is not a link
   but is kept at 400 regardless. */
.hv .hv-card__text {
	margin: 8px 0 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--hv-muted);
}

.hv-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 16px;
	font-size: 15px;
	font-weight: 600;
	color: var(--hv-navy);
}

.hv-card__more span { border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.hv .hv-card:hover .hv-icon--arrow { transform: translateX(3px); }


/* ---- Help band ------------------------------------------------------------
   Green Grey, never navy: the footer below is navy. */

.hv-help { padding: 48px 0; background: var(--hv-band-tint); }

.hv-help__inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hv-help .hv-section-heading { margin-bottom: 8px; }

.hv .hv-help__text {
	margin: 0;
	max-width: 60ch;
	font-size: 17px;
	line-height: 1.5;
	color: var(--hv-text);
}

.hv-help__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 900px) {
	.hv-help { padding: 72px 0; }

	.hv-help__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 48px;
	}

	.hv-help__actions { flex: 0 0 auto; }
}


/* ---- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.hv *,
	.hv *::before,
	.hv *::after {
		transition-duration: .01ms !important;
	}

	.hv .hv-video__guide:hover .hv-icon--arrow,
	.hv .hv-card:hover .hv-icon--arrow { transform: none; }
}
