/*
 * Page tops (13 Nov 2026): on pages with a form, the title and one short sentence come first and the form
 * follows straight away, so the form is on screen without scrolling. Applies only where a banner is followed by
 * a one-sentence content block and then the form (or the size finder), as set up by deploy/130-page-tops.php and
 * the newer page scripts. Browsers without :has() keep the full-height banner, which still works.
 */
body:not(.home) .small_banner_block:has(+ .content_block + :is(.enquiry_form_block, .size_finder_block)) .container {
	height: clamp(260px, 36vh, 380px);
	min-height: 0;
	padding-bottom: 28px;
}
.small_banner_block + .content_block:has(+ :is(.enquiry_form_block, .size_finder_block)) {
	padding-top: 22px;
	padding-bottom: 0;
}
.small_banner_block + .content_block:has(+ :is(.enquiry_form_block, .size_finder_block)) .large-content,
.small_banner_block + .content_block:has(+ :is(.enquiry_form_block, .size_finder_block)) p {
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	max-width: min(100%, 62ch); /* never wider than the screen: the theme sets width 1060px */
	margin-bottom: 0;
}
@media (max-width: 991px) {
	body:not(.home) .small_banner_block:has(+ .content_block + :is(.enquiry_form_block, .size_finder_block)) .container {
		height: clamp(220px, 34svh, 300px);
		padding-bottom: 18px;
	}
	.small_banner_block + .content_block:has(+ :is(.enquiry_form_block, .size_finder_block)) {
		padding-top: 16px;
	}
}

/* Homepage (13 Nov): the big photo stays, nearly full screen, with the title on it; the page's intro paragraph
   follows, then the form. */
body.home .small_banner_block .container {
	height: calc(var(--app-height, 100vh) - 90px);
	min-height: 520px;
	padding-bottom: 56px;
}
body.home .small_banner_block + .content_block:has(+ .enquiry_form_block) {
	padding-top: 48px;
}
body.home .small_banner_block + .content_block:has(+ .enquiry_form_block) p {
	max-width: min(100%, 70ch);
}
@media (max-width: 991px) {
	body.home .small_banner_block .container {
		height: calc(var(--app-height, 100vh) - 150px);
		min-height: 420px;
		padding-bottom: 32px;
	}
	body.home .small_banner_block + .content_block:has(+ .enquiry_form_block) {
		padding-top: 28px;
	}
}
/* Line the intro up with the form box below it (the theme's centred 10-of-12 column indents it). */
.small_banner_block + .content_block:has(+ .enquiry_form_block) .col-lg-10.offset-lg-1 {
	margin-left: 0;
	flex: 0 0 100%;
	max-width: 100%;
}
/* On wide screens the form box is capped at 1120px and centred: start the intro where the form starts. */
.small_banner_block + .content_block:has(+ :is(.enquiry_form_block, .size_finder_block)) .content {
	margin-left: max(0px, calc((100% - 1120px) / 2));
}

/*
 * Build timeline (13 Nov): steps as a zig-zag down a dashed centre line, the number in a circle on the line and a photo
 * opposite the words; on phones the line runs down the left. Any "Columns step" block whose ID ends in "-steps"
 * (truss-steps, design-steps, how-we-work-steps: deploy/140, 150, 160); the photo sits at the top of each step's text.
 */
.columns_step_block:has(> .anchor[id$="-steps"]) .row {
	position: relative;
	max-width: 1080px;
	margin-left: auto;
	margin-right: auto;
	--bs-gutter-y: 0;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .row::before {
	content: "";
	position: absolute;
	top: 40px;
	bottom: 40px;
	left: 50%;
	width: 3px;
	transform: translateX(-50%);
	background: repeating-linear-gradient(to bottom, #F47B20 0 10px, transparent 10px 18px);
}
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"] {
	flex: 0 0 100%;
	max-width: 100%;
	padding-bottom: 64px;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:last-child { padding-bottom: 0; }
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
	grid-template-rows: 1fr auto auto 1fr;
	align-items: center;
	height: auto;
	padding: 0;
	border: 0;
	background: none;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .number {
	grid-column: 2;
	grid-row: 1 / -1;
	justify-self: center;
	align-self: center;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: 0;
	border-radius: 50%;
	background: #F47B20;
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 0 0 10px #fff;
	position: relative;
	z-index: 1;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content { display: contents; }
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > :has(> .step-photo) {
	grid-column: 1;
	grid-row: 1 / -1;
	margin: 0;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .step-photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(20, 30, 60, .16);
}
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card h3 {
	grid-column: 3;
	grid-row: 2;
	margin: 0 0 8px;
}
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > p:not(:has(> .step-photo)),
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > .step-text {
	grid-column: 3;
	grid-row: 3;
	margin: 0;
	max-width: 40ch;
}
/* Every other step: photo on the right, words on the left. */
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > :has(> .step-photo) { grid-column: 3; }
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) h3,
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > p:not(:has(> .step-photo)),
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > .step-text {
	grid-column: 1;
	justify-self: end;
	text-align: right;
}
@media (max-width: 991px) {
	.columns_step_block:has(> .anchor[id$="-steps"]) .row::before { left: 40px; top: 30px; bottom: 30px; }
	.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"] { padding-bottom: 40px; }
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card,
	.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .columns-step-card {
		grid-template-columns: 56px minmax(0, 1fr);
		grid-template-rows: auto auto auto;
		column-gap: 16px;
		align-items: start;
	}
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .number {
		grid-column: 1;
		grid-row: 1;
		width: 52px;
		height: 52px;
		font-size: 1.4rem;
		box-shadow: 0 0 0 8px #fff;
	}
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card h3,
	.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) h3 {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
		justify-self: start;
		text-align: left;
		margin: 0;
	}
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > :has(> .step-photo),
	.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > :has(> .step-photo) {
		grid-column: 2;
		grid-row: 2;
		margin: 12px 0;
	}
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .step-photo { aspect-ratio: 16 / 10; }
	.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > p:not(:has(> .step-photo)),
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .content > .step-text,
	.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > p:not(:has(> .step-photo)),
.columns_step_block:has(> .anchor[id$="-steps"]) .row > [class*="col"]:nth-child(even) .content > .step-text {
		grid-column: 2;
		grid-row: 3;
		justify-self: start;
		text-align: left;
	}
}

/*
 * Scroll reveals (13 Nov): text fades in in half a second, not nearly two (AOS 0.9 s plus the title wipe 1 s), so it's
 * readable as soon as it scrolls into view. js/reveal-fix.js makes sure the reveal starts when the text is on screen.
 * Reduced motion: no fades or wipes at all.
 */
body[data-aos-duration] [data-aos]:not([data-aos-duration]) {
	transition-duration: 0.5s !important;
}
html:not(.no-js) .title,
html:not(.no-js) .small_banner_block {
	--reveal-duration: 0.55s;
}
@media (prefers-reduced-motion: reduce) {
	html:not(.no-js) [data-aos] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	html:not(.no-js) .title > *,
	html:not(.no-js) .small_banner_block p {
		opacity: 1 !important;
		clip-path: none !important;
		transform: none !important;
		transition: none !important;
	}
}

.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .step-text { max-width: 44ch; }
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .step-text > p { margin: 0 0 10px; }
.columns_step_block:has(> .anchor[id$="-steps"]) .columns-step-card .step-text > p:last-child { margin-bottom: 0; }

/* The cookie banner (GDPR Cookie Compliance plugin) sits just above the phone's "Get a quote / Call" bar, never over
   it, so the call button shows from the first second (launch, 18 Nov 2026). Same breakpoints as the nav's bar. */
@media (max-width: 1080px) {
  body:not(.stn-fit-js) #moove_gdpr_cookie_info_bar.gdpr_infobar_postion_bottom { bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important; }
}
body.stn-fit-3 #moove_gdpr_cookie_info_bar.gdpr_infobar_postion_bottom { bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important; }

/* Header phone number always shown (William, 18 Nov 2026). The nav's second fit step used to shrink it to the
   icon on laptops; now it keeps the number and drops the icon instead. In the Menu-button layout the number
   stays in the header too, on anything wider than a phone (phones keep the bottom Call bar). */
body.stn-fit-2 .stn-btn--phone { width: auto !important; padding: 0 12px !important; }
body.stn-fit-2 .stn-btn--phone span { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
body.stn-fit-2 .stn-btn--phone svg { display: none; }
@media (max-width: 1199px) {
  body:not(.stn-fit-js) .stn-btn--phone { width: auto !important; padding: 0 12px !important; }
  body:not(.stn-fit-js) .stn-btn--phone span { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
}
@media (min-width: 600px) {
  body.stn-fit-3 .stn-btn--phone { display: inline-flex !important; }
}
@media (min-width: 600px) and (max-width: 1080px) {
  body:not(.stn-fit-js) .stn-btn--phone { display: inline-flex !important; }
}

/* Nav items stay readable on hover (William, 18 Nov 2026). An older site-wide rule turns hovered links blue, the
   same blue as the bar, so a hovered item vanished. White on hover and keyboard focus; the current page keeps peach. */
.stn-header .stn-nav__top:hover, .stn-header .stn-nav__top:focus-visible,
.stn-header .stn-nav__top:hover .stn-nav__title, .stn-header .stn-nav__top:focus-visible .stn-nav__title,
.stn-header .stn-nav__item:hover > .stn-nav__top, .stn-header .stn-nav__item:hover > .stn-nav__top .stn-nav__title { color: #fff !important; }
.stn-header .stn-nav__item.is-current > .stn-nav__top .stn-nav__title,
.stn-header .stn-nav__item.is-current:hover > .stn-nav__top .stn-nav__title { color: #ffd2ad !important; }
.stn-header .stn-nav__toggle:hover, .stn-header .stn-nav__toggle:focus-visible { color: #fff !important; }

