/* ==========================================================================
   BRICKWISE — Repositioning sections
   Measurement Studio Services · Standards We Work To ·
   Why Contractors Choose Brickwise · Regional Expertise

   Loaded after brickwise.css and components.css. Uses only the tokens defined
   in brickwise.css :root — no new colour literals.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reveal stagger. Children opt in with an inline --i so the order comes from
   the markup rather than :nth-child, and a card can be moved without its
   delay changing.
   -------------------------------------------------------------------------- */

.bw-reveal[style*="--i"] { transition-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
	.bw-reveal[style*="--i"] { transition-delay: 0s; }
}

/* --------------------------------------------------------------------------
   Premium service card

   One hover behaviour everywhere: a terracotta rule wipes across the top, the
   border warms and the card lifts 4px. Subtle, and it costs nothing at
   runtime — only transform and opacity are animated.
   -------------------------------------------------------------------------- */

.bw-scard {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--bw-border);
	border-radius: var(--bw-radius);
	padding: 38px 34px 34px;
	overflow: hidden;
	transition: border-color 0.3s var(--bw-ease), box-shadow 0.3s var(--bw-ease),
	            transform 0.3s var(--bw-ease);
}

.bw-scard::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--bw-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.45s var(--bw-ease);
}

.bw-scard:hover,
.bw-scard:focus-within {
	border-color: #D8D0C4;
	box-shadow: var(--bw-shadow-lg);
	transform: translateY(-4px);
}

.bw-scard:hover::before,
.bw-scard:focus-within::before { transform: scaleX(1); }

.bw-scard__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--bw-radius-sm);
	background: var(--bw-accent-soft);
	color: var(--bw-accent-ink);
	margin-bottom: 22px;
	flex-shrink: 0;
}

.bw-scard__title {
	font-family: var(--bw-font-head);
	font-size: 1.1875rem;
	font-weight: 600;
	color: var(--bw-navy);
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}

.bw-scard__text {
	font-size: 1rem;
	line-height: 1.62;
	color: var(--bw-slate);
	margin: 0;
}

/* Capability lists inside cards */
.bw-scard__list {
	list-style: none;
	margin: 22px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid var(--bw-border);
	display: grid;
	gap: 10px;
}

.bw-scard__list li {
	position: relative;
	padding-left: 26px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--bw-slate);
	margin: 0;
}

/* Tick drawn in CSS — fifteen items across three cards is a lot of duplicated
   inline SVG otherwise. */
.bw-scard__list li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.42em;
	width: 9px;
	height: 5px;
	border-left: 1.8px solid var(--bw-accent);
	border-bottom: 1.8px solid var(--bw-accent);
	transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Measurement Studio Services
   -------------------------------------------------------------------------- */

.bw-msvc {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	align-items: stretch;
}

.bw-msvc .bw-scard__list {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
}

.bw-msvc__num {
	position: absolute;
	top: 28px;
	right: 30px;
	font-family: var(--bw-font-head);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--bw-stone);
}

/* --------------------------------------------------------------------------
   Standards We Work To
   -------------------------------------------------------------------------- */

.bw-std {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	align-items: stretch;
}

.bw-std__code {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 6px;
}

.bw-std__code strong {
	font-family: var(--bw-font-head);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--bw-navy);
	line-height: 1;
}

.bw-std__full {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--bw-accent-ink);
	margin: 0 0 14px;
	line-height: 1.4;
}

.bw-std__label {
	display: block;
	font-family: var(--bw-font-head);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--bw-slate-light);
	margin: 24px 0 0;
}

.bw-std .bw-scard__list {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 0;
}

/* --------------------------------------------------------------------------
   Why Contractors Choose Brickwise
   -------------------------------------------------------------------------- */

.bw-feat {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.bw-feat .bw-scard { padding: 34px 30px 32px; }

/* --------------------------------------------------------------------------
   Regional Expertise

   Three genuinely equal columns — same width, same padding, same type scale,
   no "primary region" treatment. Equal emphasis is the point of the section.
   -------------------------------------------------------------------------- */

.bw-regions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border: 1px solid var(--bw-border);
	border-radius: var(--bw-radius);
	overflow: hidden;
	background: #fff;
}

.bw-region {
	padding: 44px 36px;
	border-right: 1px solid var(--bw-border);
	display: flex;
	flex-direction: column;
	transition: background-color 0.3s var(--bw-ease);
}

.bw-region:last-child { border-right: 0; }
.bw-region:hover { background: var(--bw-offwhite); }

.bw-region__icon {
	color: var(--bw-accent-ink);
	margin-bottom: 20px;
	line-height: 0;
}

.bw-region__title {
	font-family: var(--bw-font-head);
	font-size: 1.1875rem;
	font-weight: 600;
	color: var(--bw-navy);
	margin: 0 0 12px;
	line-height: 1.3;
}

.bw-region__text {
	font-size: 1rem;
	line-height: 1.62;
	color: var(--bw-slate);
	margin: 0;
}

/* --------------------------------------------------------------------------
   Trust band — shown in place of the numeric statistics grid until real
   figures are entered, so the page never carries an invented number.
   -------------------------------------------------------------------------- */

.bw-trustband {
	background: var(--bw-navy);
	padding: 58px 0;
	position: relative;
}

.bw-trustband__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

.bw-trustband__item {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding: 4px 32px;
	border-right: 1px solid var(--bw-accent);
}

.bw-trustband__item:last-child { border-right: 0; }
.bw-trustband__item:first-child { padding-left: 0; }

.bw-trustband__icon {
	color: var(--bw-accent-light);
	flex-shrink: 0;
	line-height: 0;
	margin-top: 2px;
}

.bw-trustband__body { display: flex; flex-direction: column; }

.bw-trustband__title {
	font-family: var(--bw-font-head);
	font-size: 0.9375rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #fff;
	margin-bottom: 9px;
	line-height: 1.25;
}

.bw-trustband__text {
	font-size: 0.875rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.78);
}

/* Currency symbol on a statistic — smaller and raised so £ does not optically
   outweigh the figure it qualifies. */
.bw-stat__prefix {
	font-size: 0.62em;
	font-weight: 600;
	vertical-align: 0.42em;
	margin-right: 2px;
	color: var(--bw-accent-light);
}

/* ==========================================================================
   Overflow containment

   Grid and flex children default to min-width:auto, so a long item can force
   its track wider than its share instead of wrapping — which pushes content
   past the viewport edge and reads as cropped. Every grid/flex child here is
   given min-width:0 so wrapping happens instead.
   ========================================================================== */

.bw-msvc > *,
.bw-std > *,
.bw-feat > *,
.bw-regions > *,
.bw-trustband__grid > *,
.bw-scard__list > *,
.bw-trustband__body,
.bw-logo__type {
	min-width: 0;
}

/* Long compound terms must break rather than widen their column. Applies to
   text inside every ancestor that clips its overflow, where a token wider than
   its column is not merely untidy — it is invisible. */
.bw-scard__title,
.bw-scard__text,
.bw-scard__list li,
.bw-region__title,
.bw-region__text,
.bw-std__full,
.bw-trustband__title,
.bw-trustband__text,
.bw-hero__sub,
.bw-hero__trust span,
.bw-phero__sub,
.bw-sec__lead,
.bw-cta p,
.bw-pcard__title,
.bw-pcard__text,
.bw-step__title,
.bw-step__text,
.bw-step__deliver,
.bw-stat__label,
.bw-eyebrow {
	overflow-wrap: break-word;
	word-break: normal;
}

/* ==========================================================================
   Mobile and accessibility hardening
   ========================================================================== */

/* A button must never be wider than what contains it. .bw-btn sets
   white-space: nowrap for tidy desktop rows, which on a narrow viewport turns
   a long label into horizontal overflow instead of a second line. */
.bw-btn {
	max-width: 100%;
	box-sizing: border-box;
}

@media (max-width: 560px) {
	.bw-btn {
		white-space: normal;
		text-align: center;
		line-height: 1.3;
	}
}

/* Focus ring: terracotta has enough contrast on light surfaces but not against
   deep navy, so dark sections get a light ring. */
.bw-sec--navy :focus-visible,
.bw-hero :focus-visible,
.bw-stats :focus-visible,
.bw-trustband :focus-visible,
.bw-cta :focus-visible,
.bw-footer :focus-visible,
.bw-phero :focus-visible {
	outline: 3px solid #FFFFFF;
	outline-offset: 2px;
}

/* Touch targets. WCAG 2.5.8 asks 24x24 minimum; 44px is comfortable and costs
   nothing here. Matches the burger breakpoint, where the nav becomes taps. */
@media (max-width: 1199px) {
	.bw-nav__list a,
	.bw-footer__list a {
		min-height: 44px;
		display: flex;
		align-items: center;
	}
}

.bw-scard img,
.bw-region img,
.bw-prose img,
.bw-prose iframe {
	max-width: 100%;
	height: auto;
}

/* Wide tables scroll inside their own box rather than widening the page. */
.bw-prose table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
	.bw-msvc,
	.bw-std,
	.bw-feat { grid-template-columns: repeat(2, 1fr); }

	/* Cards are half-width here, so the capability lists drop to one column;
	   two columns inside a half-width card leaves ~90px per item. */
	.bw-msvc .bw-scard__list { grid-template-columns: 1fr; }

	.bw-regions { grid-template-columns: 1fr; }
	.bw-region {
		border-right: 0;
		border-bottom: 1px solid var(--bw-border);
	}
	.bw-region:last-child { border-bottom: 0; }

	.bw-trustband__grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
	.bw-trustband__item:nth-child(2n) { border-right: 0; }
	.bw-trustband__item:nth-child(odd) { padding-left: 0; }
	.bw-trustband__item { padding-right: 24px; }
}

@media (max-width: 760px) {
	.bw-msvc,
	.bw-std,
	.bw-feat { grid-template-columns: 1fr; gap: 20px; }

	.bw-scard { padding: 30px 24px 28px; }
	.bw-feat .bw-scard { padding: 28px 24px 26px; }
	.bw-region { padding: 32px 26px; }
	.bw-msvc__num { top: 22px; right: 22px; }

	.bw-trustband { padding: 44px 0; }
	.bw-trustband__grid { grid-template-columns: 1fr; row-gap: 0; }
	.bw-trustband__item {
		border-right: 0;
		border-bottom: 1px solid var(--bw-accent);
		padding: 22px 0;
	}
	.bw-trustband__item:last-child { border-bottom: 0; padding-bottom: 0; }
	.bw-trustband__item:first-child { padding-top: 0; }
}
