/*
Theme Name: Hi-VizBiz 2026
Theme URI: https://hi-vizbiz.co.uk
Author: Xpose
Description: Block theme for Hi-VizBiz — marketing for trades. Hi-viz yellow on black, heavy condensed display type, built for speed. No page builder, no external font requests.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: hi-viz-biz-2026
*/

/* Design tokens live in theme.json. This file carries only what the block
   system can't express. */

:root {
	/* One inner measure, shared by the bands, the breadcrumb strip and the
	   page header, so everything lines up on the same left edge. */
	--hvb-measure: 44rem;
	--hvb-wide: 62rem;
	--hvb-gutter: clamp(1.25rem, 4vw, 2.5rem);
	--hvb-band-pad: clamp(2.75rem, 6vw, 5.5rem);

	/* Hazard tape. The one piece of decoration on the site, and it's the
	   thing the brand is named after. */
	--hvb-hazard: repeating-linear-gradient(
		-45deg,
		var(--wp--preset--color--hi-viz) 0 0.75rem,
		var(--wp--preset--color--ink) 0.75rem 1.5rem
	);
}

/* ---- Bands --------------------------------------------------------------
   Pages arrive from the build as a run of <section class="hvb-band">. They are
   full-bleed; the measure is applied to their children, so a table or a link
   grid can run wider than the prose without leaving the band.
   -------------------------------------------------------------------------- */

.hvb-band {
	padding: var(--hvb-band-pad) var(--hvb-gutter);
}

.hvb-band > * {
	max-width: var(--hvb-measure);
	margin-inline: auto;
}

.hvb-band > .wp-block-table,
.hvb-band > .hvb-linkgrid,
.hvb-band > .hvb-form,
.hvb-band > .hvb-report {
	max-width: var(--hvb-wide);
}

.hvb-band--alt {
	background: var(--wp--preset--color--concrete);
}

/* Consecutive same-tone bands would read as one — happens where a band is
   dropped for having only placeholder copy. */
.hvb-band--plain + .hvb-band--plain {
	padding-top: 0;
}

/* First heading in a band gets the chevron rule above it. */
.hvb-band > h2,
.hvb-band > h3 {
	margin-bottom: 1.25rem;
}

.hvb-band > h2::before {
	content: "";
	display: block;
	width: 3.25rem;
	height: 0.45rem;
	margin-bottom: 1.1rem;
	background: var(--wp--preset--color--hi-viz);
	clip-path: polygon(0 0, calc(100% - 0.45rem) 0, 100% 50%, calc(100% - 0.45rem) 100%, 0 100%);
}

/* ---- Hero ---------------------------------------------------------------- */

.hvb-band--hero {
	position: relative;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding-bottom: calc(var(--hvb-band-pad) + 0.75rem);
}

.hvb-band--hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 0.75rem;
	background: var(--hvb-hazard);
}

.hvb-hero__kicker {
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--hi-viz);
	margin-bottom: 1rem;
}

.hvb-hero__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: clamp(2.1rem, 1.1rem + 3.4vw, 4rem);
	line-height: 1.02;
	letter-spacing: -0.02em;
	text-transform: none;
	text-wrap: balance;
	margin: 0 auto 1.5rem;
}

/* A ninety-character headline set at the full display size is a wall. */
.hvb-hero__title--long {
	font-size: clamp(1.7rem, 1rem + 2.3vw, 2.85rem);
	text-wrap: pretty;
}

.hvb-band--hero p:not(.hvb-hero__kicker) {
	color: var(--wp--preset--color--concrete);
}

/* The lede under the headline carries the pitch — it should not read as small
   print under a big title. */
.hvb-band--hero > p:not(.hvb-hero__kicker):not(.hvb-actions) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.45;
}

.hvb-band--hero strong {
	color: var(--wp--preset--color--paper);
}

.hvb-band--hero a:not(.hvb-cta) {
	color: var(--wp--preset--color--hi-viz);
}

.hvb-band--hero a:not(.hvb-cta):hover {
	color: var(--wp--preset--color--paper);
}

/* ---- Call-to-action rows ------------------------------------------------- */

.hvb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.hvb-cta {
	text-decoration: none;
}

/* The second CTA in a row is the lower-commitment one — outline, not fill, so
   the eye still lands on the first. */
.hvb-actions .hvb-cta:not(:first-child) {
	background: transparent;
	color: var(--wp--preset--color--ink);
	box-shadow: inset 0 0 0 2px currentColor;
}

.hvb-actions .hvb-cta:not(:first-child):hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--hi-viz);
	box-shadow: none;
}

.hvb-band--hero .hvb-actions .hvb-cta:not(:first-child) {
	color: var(--wp--preset--color--paper);
}

.hvb-band--hero .hvb-actions .hvb-cta:not(:first-child):hover {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* ---- Lists --------------------------------------------------------------- */

.hvb-band ul:not(.hvb-linkgrid):not(.wp-block-navigation__container):not(.hvb-checks) {
	list-style: none;
	padding-left: 0;
}

.hvb-band ul:not(.hvb-linkgrid):not(.wp-block-navigation__container):not(.hvb-checks) > li {
	position: relative;
	padding-left: 1.85rem;
	margin-bottom: 0.65rem;
}

.hvb-band ul:not(.hvb-linkgrid):not(.wp-block-navigation__container):not(.hvb-checks) > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.9rem;
	height: 0.45rem;
	background: var(--wp--preset--color--hi-viz);
	clip-path: polygon(0 0, calc(100% - 0.4rem) 0, 100% 50%, calc(100% - 0.4rem) 100%, 0 100%);
}

/* A list where every item is just a link — trade pickers, service menus. */
.hvb-linkgrid {
	list-style: none;
	margin: 1.75rem auto 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
	gap: 0.6rem;
}

.hvb-linkgrid a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	height: 100%;
	padding: 0.85rem 1rem;
	background: var(--wp--preset--color--paper);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
}

.hvb-linkgrid a::after {
	content: "›";
	color: var(--wp--preset--color--muted);
	font-size: 1.4em;
	line-height: 1;
}

.hvb-linkgrid a:hover {
	background: var(--wp--preset--color--hi-viz);
	color: var(--wp--preset--color--ink);
}

.hvb-linkgrid a:hover::after {
	color: var(--wp--preset--color--ink);
}

.hvb-band--hero .hvb-linkgrid a {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--paper);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--muted);
}

/* ---- Page header (pages with no hero, e.g. accreditations) --------------- */

.hvb-page__title {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding-block: var(--hvb-band-pad) calc(var(--hvb-band-pad) - 1rem);
	padding-inline: max(var(--hvb-gutter), calc((100% - var(--hvb-measure)) / 2));
	margin: 0;
	text-transform: none;
}

/* Anything that isn't a band or the related block still gets the measure —
   accreditation pages are plain content with no sections. */
.entry-content > *:not(.hvb-band):not(.hvb-related) {
	max-width: var(--hvb-measure);
	margin-inline: auto;
	padding-inline: var(--hvb-gutter);
	box-sizing: content-box;
}

/* ---- Header -------------------------------------------------------------
   The bar sits on ink and the hero below it is ink, so the two read as one
   block. Deliberate — it gives the headline the whole top of the screen.
   -------------------------------------------------------------------------- */

.hvb-header__end {
	gap: clamp(0.75rem, 2vw, 2rem);
}

.hvb-header .wp-block-navigation__container {
	gap: clamp(0.75rem, 1.6vw, 1.6rem);
}

.hvb-header .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	padding-block: 0.35rem;
	border-bottom: 2px solid transparent;
}

.hvb-header .wp-block-navigation-item__content:hover,
.hvb-header .current-menu-item .wp-block-navigation-item__content {
	color: var(--wp--preset--color--hi-viz);
	border-bottom-color: var(--wp--preset--color--hi-viz);
}

.hvb-header__cta .wp-block-button__link {
	padding: 0.6rem 1.1rem;
	white-space: nowrap;
}

/* Below the nav's own breakpoint the menu collapses to a burger; the CTA would
   crowd it, and the sticky call bar covers the same job on mobile. */
@media (max-width: 599px) {
	.hvb-header__cta {
		display: none;
	}
}

/* ---- Footer -------------------------------------------------------------- */

.hvb-footer {
	position: relative;
}

.hvb-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 0.75rem;
	background: var(--hvb-hazard);
}

.hvb-footer__line {
	margin-bottom: 0.5rem;
	line-height: 1.05;
}

.hvb-footer__cols {
	gap: 2rem;
}

.hvb-footer h3 {
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--hi-viz);
	margin-bottom: 0.85rem;
}

.hvb-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
}

.hvb-footer li {
	margin-bottom: 0.45rem;
}

.hvb-footer a {
	color: var(--wp--preset--color--concrete);
	text-decoration: none;
}

.hvb-footer a:hover {
	color: var(--wp--preset--color--hi-viz);
	text-decoration: underline;
}

.hvb-footer__legal {
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Four columns collapse to one by default in core; two reads better here. */
@media (min-width: 600px) and (max-width: 781px) {
	.hvb-footer__cols {
		flex-wrap: wrap;
	}

	.hvb-footer__cols > .wp-block-column {
		flex-basis: calc(50% - 1rem) !important;
	}
}

/* Chevron device from the logo lockup — used as a section marker. */
.hvb-chevron::after {
	content: "";
	display: block;
	width: 4.5rem;
	height: 0.5rem;
	margin-top: 1.25rem;
	background: var(--wp--preset--color--hi-viz);
	clip-path: polygon(0 0, calc(100% - 0.5rem) 0, 100% 50%, calc(100% - 0.5rem) 100%, 0 100%);
}

/* Price ratio callout — the "one job pays for X" device that carries the pitch. */
.hvb-ratio {
	border-left: 6px solid var(--wp--preset--color--hi-viz);
	padding: 1rem 0 1rem 1.25rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.35;
}

/* ---- Tables -------------------------------------------------------------
   These carry the argument on this site — job values, package comparisons — so
   they have to be readable, not default-WordPress hairlines.
   -------------------------------------------------------------------------- */

/* Horizontal scroll rather than breaking the page on mobile. */
.wp-block-table {
	overflow-x: auto;
	margin-block: 2rem;
	/* A shadow on the right edge that fades as you reach the end, so it's
	   obvious there's more table off-screen. */
	background:
		linear-gradient(to right, var(--wp--preset--color--paper) 30%, rgba(255, 255, 255, 0)) left / 2.5rem 100% no-repeat,
		linear-gradient(to left, var(--wp--preset--color--paper) 30%, rgba(255, 255, 255, 0)) right / 2.5rem 100% no-repeat,
		radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.18), transparent) left / 0.75rem 100% no-repeat,
		radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.18), transparent) right / 0.75rem 100% no-repeat;
	background-attachment: local, local, scroll, scroll;
}

.wp-block-table table {
	min-width: 34rem;
	width: 100%;
	border-collapse: collapse;
	background: transparent;
}

.wp-block-table th {
	padding: 0.85rem 0.9rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--hi-viz);
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: left;
	border: 0;
	vertical-align: bottom;
}

.wp-block-table td {
	padding: 0.7rem 0.9rem;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	vertical-align: top;
}

.wp-block-table tbody tr:nth-child(odd) {
	background: rgba(0, 0, 0, 0.03);
}

.wp-block-table td strong {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 1.15em;
}

/* Feature grids — package comparisons and the like. Ticks belong under their
   column heading, not jammed against the left edge of a wide cell. */
.hvb-table--matrix td:not(:first-child),
.hvb-table--matrix th:not(:first-child) {
	text-align: center;
}

.hvb-table--matrix tbody tr:first-child td {
	padding-block: 1.1rem;
	background: var(--wp--preset--color--hi-viz);
	border-top: 0;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 1.35em;
	font-weight: 700;
}

/* Sticky click-to-call for emergency trades. Hidden above mobile. */
.hvb-call-bar {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 99;
	display: none;
	padding: 0.9rem;
	text-align: center;
	font-weight: 700;
	background: var(--wp--preset--color--hi-viz);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

@media (max-width: 781px) {
	.hvb-call-bar {
		display: block;
	}

	body.has-call-bar {
		padding-bottom: 3.5rem;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---- Forms -------------------------------------------------------------- */

/* A card, so the form reads as the thing to do on the page rather than as a
   run of unstyled inputs after the copy. */
.hvb-form {
	max-width: 34rem;
	margin-block: 2rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--wp--preset--color--paper);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--ink);
	border-top: 0.6rem solid var(--wp--preset--color--hi-viz);
}

.hvb-form .wp-block-button__link,
.hvb-form button[type="submit"] {
	width: 100%;
}

.hvb-field {
	margin-bottom: 1rem;
}

.hvb-field label,
.hvb-consent label {
	display: block;
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
}

.hvb-consent label {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.hvb-form input[type="text"],
.hvb-form input[type="tel"],
.hvb-form input[type="url"],
.hvb-form input[type="email"] {
	width: 100%;
	padding: 0.8rem 0.9rem;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 2px;
}

.hvb-form input:focus-visible {
	outline: 3px solid var(--wp--preset--color--hi-viz);
	outline-offset: 1px;
}

.hvb-form input:user-invalid {
	border-color: #b3261e;
}

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hvb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hvb-note {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}

.hvb-status:empty {
	display: none;
}

.hvb-status {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-left: 6px solid var(--wp--preset--color--hi-viz);
	background: var(--wp--preset--color--concrete);
}

.hvb-status--error {
	border-left-color: #b3261e;
}

/* ---- Website review report ---------------------------------------------- */

.hvb-report {
	margin-block: 2rem;
}

.hvb-score {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.1;
	margin-bottom: 0.5rem;
}

.hvb-score span {
	display: block;
	font-size: var(--wp--preset--font-size--xx-large);
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--hi-viz);
	padding: 0.2em 0.4em;
	width: fit-content;
	margin-bottom: 0.3rem;
}

.hvb-checks {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.hvb-check {
	padding: 0.75rem 0 0.75rem 1.75rem;
	border-top: 1px solid var(--wp--preset--color--concrete);
	position: relative;
}

.hvb-check strong {
	display: block;
}

.hvb-check span {
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
}

.hvb-check::before {
	position: absolute;
	left: 0;
	top: 0.75rem;
	font-weight: 700;
}

.hvb-check--pass::before {
	content: "✓";
	color: #1e7a3c;
}

.hvb-check--fail::before {
	content: "✕";
	color: #b3261e;
}

/* ---- Breadcrumbs & related links ---------------------------------------- */

/* The trail sits on ink directly above the hero, so the two read as one block
   rather than a stray line of grey text floating above a black slab. */
.hvb-crumbs {
	background: var(--wp--preset--color--ink);
	padding-block: 0.9rem;
	padding-inline: max(var(--hvb-gutter), calc((100% - var(--hvb-measure)) / 2));
}

.hvb-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--muted);
}

.hvb-crumbs a {
	color: var(--wp--preset--color--concrete);
	text-decoration: none;
}

.hvb-crumbs a:hover {
	color: var(--wp--preset--color--hi-viz);
}

.hvb-crumbs li + li::before {
	content: "›";
	margin-right: 0.4rem;
}

.hvb-crumbs [aria-current] {
	color: var(--wp--preset--color--muted);
}

.hvb-related {
	position: relative;
	display: block;
	margin-top: 0;
	padding: var(--hvb-band-pad) var(--hvb-gutter);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--paper);
}

.hvb-related::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 0.75rem;
	background: var(--hvb-hazard);
}

.hvb-related > * {
	max-width: var(--hvb-wide);
	margin-inline: auto;
}

.hvb-related h3 {
	margin-bottom: 1rem;
	color: var(--wp--preset--color--hi-viz);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hvb-related h3 + .hvb-related__list {
	margin-top: 0;
}

.hvb-related__list {
	list-style: none;
	margin: 0 auto 2.5rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.5rem;
}

.hvb-related__list a {
	display: block;
	padding: 0.6rem 0.85rem;
	color: var(--wp--preset--color--paper);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	background: rgba(255, 255, 255, 0.05);
	border-left: 3px solid var(--wp--preset--color--hi-viz);
}

.hvb-related__list a:hover {
	background: var(--wp--preset--color--hi-viz);
	color: var(--wp--preset--color--ink);
}

.hvb-related__up {
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--condensed);
	font-weight: 700;
	text-transform: uppercase;
}

.hvb-related__up a {
	color: var(--wp--preset--color--hi-viz);
	text-decoration: none;
	border-bottom: 2px solid currentColor;
}

.hvb-related__up a:hover {
	color: var(--wp--preset--color--paper);
}

/* ---- Cookie consent ----------------------------------------------------- */

.hvb-consent-bar {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 200;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-size: 0.9rem;
}

.hvb-consent-bar[hidden] {
	display: none;
}

.hvb-consent-bar p {
	margin: 0;
	max-width: 46rem;
}

.hvb-consent-bar a {
	color: var(--wp--preset--color--hi-viz);
}

.hvb-consent-bar__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.hvb-consent-bar__decline {
	background: none;
	border: 0;
	padding: 0.5rem;
	color: var(--wp--preset--color--concrete);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.hvb-consent-bar__decline:hover {
	color: var(--wp--preset--color--paper);
}

/* Don't let the consent bar sit on top of the emergency call bar. */
body.has-call-bar .hvb-consent-bar {
	bottom: 3.5rem;
}
