/* =========================================================================
   How to buy ("Ways to buy"): template-ways-to-buy.php (/how-to-buy/).
   Scoped to .hb, mobile first, min-width media queries only (640 / 768 /
   900 / 1200). The house recipe from the 18 Sep 2026 spec
   (docs/superpowers/specs/2026-09-18-support-and-content-pages-design.md),
   plus what this page needs. The enquiry form is styled by css/product.css
   through the .pd .pd-enquiry reuse.

   Bands: navy hero, white route cards, then the grey enquiry band above the
   navy footer. A sibling of the contact page, so it uses the same plain navy
   hero rather than a photograph.
   ========================================================================= */

.hb {
	--hb-navy: #181d46;      /* Billi Blue */
	--hb-lightblue: #90cdeb; /* primary button on dark, accents */
	--hb-grey: #eaeaea;      /* borders, rules */
	--hb-band-grey: #f5f5f5;
	--hb-band-tint: #f1f5f5; /* Green Grey */
	--hb-text: #000;
	--hb-muted: #75757b;
	--hb-gutter: 20px;

	font-family: var(--font-din);
	color: var(--hb-text);
	line-height: 1.5;
}

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

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

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

.hb-container {
	width: 100%;
	max-width: 1436px; /* 1356px content + 2 x 40px */
	margin: 0 auto;
	padding-left: var(--hb-gutter);
	padding-right: var(--hb-gutter);
}

.hb-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;
}


/* ---- Sections ------------------------------------------------------------ */

.hb-section { padding: 48px 0; }

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

.hb .hb-section-heading {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	color: var(--hb-navy);
	text-transform: none;
	letter-spacing: normal;
}

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

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

@media (min-width: 900px) {
	.hb .hb-section-heading { font-size: 34px; }
	.hb-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. */
.hb .hb-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 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.hb .hb-btn--light { background: var(--hb-lightblue); color: var(--hb-navy); }

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

.hb .hb-btn--ghost {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.hb .hb-btn--ghost:hover,
.hb .hb-btn--ghost:focus-visible {
	background: #fff;
	color: var(--hb-navy);
	box-shadow: none;
}

.hb .hb-btn svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

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

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


/* ---- Hero --------------------------------------------------------------------
   Plain navy, like the contact page. The title is an h1: typography.css gives
   it DM Serif Display at 400. Never set its weight or family here. */

.hb-hero {
	background: var(--hb-navy);
	color: #fff;
}

.hb-hero__inner {
	padding-top: 48px;
	padding-bottom: 48px;
}

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

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

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

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

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

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


/* ---- Route cards ---------------------------------------------------------------
   One to five cards. Two columns from 640px with an odd last card taking the
   full row; at 1200px five cards sit three over two on a six-track grid, so
   the second row fills the width instead of leaving a hole. */

.hb-ways__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

@media (min-width: 640px) {
	.hb-ways__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-ways__grid--odd .hb-card:last-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
	.hb-ways__grid { gap: 24px; }
}

@media (min-width: 1200px) {
	.hb-ways__grid--odd .hb-card:last-child { grid-column: auto; }

	.hb-ways__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hb-ways__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

	.hb-ways__grid--5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.hb-ways__grid--5 .hb-card { grid-column: span 2; }
	.hb-ways__grid--5 .hb-card:nth-child(n+4) { grid-column: span 3; }
}

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

@media (min-width: 900px) {
	.hb-card { padding: 28px; }
}

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

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

.hb .hb-card__icon svg {
	width: 26px;
	height: 26px;
	display: block;
}

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

/* One stretched link per card: the whole card is the target, with no nested
   links. desktop.css sets a { font-weight: 600 } and fades links on hover. */
.hb .hb-card__link {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

.hb .hb-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 4px;
}

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

/* The ring goes round the whole card rather than the title text. */
.hb .hb-card__link:focus-visible { outline: none; }
.hb .hb-card__link:focus-visible::after { outline: 2px solid var(--hb-navy); outline-offset: 3px; }

.hb-card__text {
	margin: 8px 0 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--hb-muted);
}

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

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

.hb .hb-card__more svg {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.hb-card:hover .hb-card__more svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.hb-card,
	.hb .hb-card__more svg { transition: none; }
	.hb-card:hover .hb-card__more svg { transform: none; }
}


/* ---- Enquiry ------------------------------------------------------------------
   .pd .pd-enquiry from product.css carries the band, the aside and the form
   panel. product.css rings focus in light blue, which is 1.7:1 on the grey
   band; the aside's links get the navy ring instead. */

.hb .hb-enquiry .pd-enquiry__aside a:focus-visible {
	outline: 2px solid var(--hb-navy);
	outline-offset: 3px;
}
