/* Jost — the geometric face of ENGINEERING in the Opal logo, used for the menus */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* sections switched off in the admin page carry the hidden attribute */
[hidden] { display: none !important; }

/* ------------------------------------------------------------
   Home page logo intro (img-6d42o)
   The blue "P" piece starts on the right and orbits round the
   teal circle into place while the circles turn to meet it; then
   the full logo (with the OPAL ENGINEERING lettering) fades in
   over the top. Layers are cut from the logo PNG on the same
   767×250 canvas, so the final frame is the untouched logo.
   ------------------------------------------------------------ */
.custom-logo-link.opal-logo-intro {
	position: relative;
}

.opal-logo-intro::before,
.opal-logo-intro::after {
	content: "";
	position: absolute;
	background: no-repeat center / 100% 100%;
	pointer-events: none;
}

/* teal + mint circles — canvas box x 67–271, y 0–206 */
.opal-logo-intro::before {
	left: 8.7353%;
	top: 0;
	width: 26.5971%;
	height: 82.4%;
	background-image: url("wp-content/uploads/2022/01/opal-logo-mark-circles.png");
	transform-origin: 33.82% 60.44%; /* teal circle centre */
	animation: opal-circles-turn 1.4s cubic-bezier(.45, 0, .2, 1) both,
	           opal-layer-out .01s linear 2.8s both;
}

/* blue "P" piece — canvas box x 0–181, y 49–250 */
.opal-logo-intro::after {
	left: 0;
	top: 19.6%;
	width: 23.5984%;
	height: 80.4%;
	background-image: url("wp-content/uploads/2022/01/opal-logo-mark-blue.png");
	transform-origin: 75.14% 37.56%; /* orbits the teal circle centre */
	animation: opal-blue-orbit 1.4s cubic-bezier(.45, 0, .2, 1) both,
	           opal-layer-out .01s linear 2.8s both;
}

.opal-logo-intro img {
	animation: opal-logo-in 1.6s cubic-bezier(.4, 0, .2, 1) 1.2s both;
}

@keyframes opal-blue-orbit {
	from { transform: rotate(180deg); opacity: 0; }
	15%  { opacity: 1; }
	to   { transform: rotate(0deg); opacity: 1; }
}

@keyframes opal-circles-turn {
	from { transform: rotate(-60deg); opacity: 0; }
	15%  { opacity: 1; }
	to   { transform: rotate(0deg); opacity: 1; }
}

@keyframes opal-logo-in {
	from { opacity: 0; filter: blur(3px); }
	60%  { filter: blur(0); }
	to   { opacity: 1; filter: blur(0); }
}

@keyframes opal-layer-out {
	to { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.opal-logo-intro::before,
	.opal-logo-intro::after {
		display: none;
	}
	.opal-logo-intro img {
		animation: none;
	}
}

/* Home: over the hero the nav bar is clear with white menu links; once the
   hero has scrolled up past the bar, script.js sets .opal-bar-solid and the
   white card and dark links come back. Without scripting the bar simply
   stays solid. */
.home #site-branding-sticky-wrap,
.home #site-branding ul#primary-menu > li > a,
.home #site-branding #mobile-menu-trigger {
	transition: background-color .4s ease, border-color .4s ease, box-shadow .4s ease, color .4s ease;
}

@media (scripting: enabled) {
	html:not(.opal-bar-solid) .home #site-branding-sticky-wrap {
		background-color: transparent;
		border-color: transparent;
		box-shadow: none;
	}
	html:not(.opal-bar-solid) .home #site-branding ul#primary-menu > li > a,
	html:not(.opal-bar-solid) .home #site-branding #mobile-menu-trigger {
		color: #fff;
	}
}

/* Home: a faint wisp of cloud behind the logo (img-6d42o) so the blue
   "opal" lettering sits on hazy sky like the right of the hero, not on
   the deep blue. Only while the bar is clear over the hero. */
.home .branding {
	position: relative;
	isolation: isolate;
}

.home .branding::before {
	content: "";
	position: absolute;
	/* 1400×640 haze whose anchor (24%, 30%) sits up behind "opal"; it
	   fades out before the blue P of the mark (which would otherwise read
	   as a separate piece) and above the light ENGINEERING lettering */
	/* sized from the logo's height, not the .branding box, which runs wider
	   than the logo at some widths: left -58% / width 491% of the logo */
	left: 0;
	top: -180%;
	height: 688%;
	aspect-ratio: 1400 / 640;
	transform: translateX(-11.81%);
	z-index: -1;
	background: url("images/hero/logo-cloud.png") no-repeat center / 100% 100%;
	opacity: .75;
	pointer-events: none;
	transition: opacity .4s ease;
}

/* ...and the ENGINEERING lettering turns white over the hero: a white cut
   of just those letters on the logo's own 767×250 canvas, laid exactly on
   top. It fades in with the logo, and out when the white bar comes back. */
.home .branding::after {
	content: "";
	position: absolute;
	/* the logo's own box: as tall as .branding, 767:250 wide from its left */
	top: 0;
	bottom: 0;
	left: 0;
	aspect-ratio: 767 / 250;
	background: url("wp-content/uploads/2022/01/opal-logo-engineering-white.png") no-repeat center / 100% 100%;
	pointer-events: none;
	animation: opal-logo-in 1.6s cubic-bezier(.4, 0, .2, 1) 1.2s backwards;
	transition: opacity .4s ease;
}

html.opal-vt-in .home .branding::after,
html.opal-intro-seen .home .branding::after { animation: none; }

html.opal-bar-solid .home .branding::before,
html.opal-bar-solid .home .branding::after {
	opacity: 0;
}

@media (scripting: none) {
	.home .branding::before,
	.home .branding::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.home .branding::before,
	.home .branding::after { transition: none; animation: none; }
	.home #site-branding-sticky-wrap,
	.home #site-branding ul#primary-menu > li > a,
	.home #site-branding #mobile-menu-trigger {
		transition: none;
	}
}

/* ------------------------------------------------------------
   Team page (team.html) — one card per person, with an empty
   photo frame waiting for a headshot.
   ------------------------------------------------------------ */
.opal-team__intro {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.4;
}

.opal-team {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 12px;
}

.opal-team__card {
	min-width: 0;
}

.opal-team__photo {
	aspect-ratio: 4 / 3;
	margin-bottom: 8px;
	background: #eef3f5;
	border: 1px dashed #9bb8c5;
}

.opal-team__name {
	margin: 0 0 2px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #0A4058;
	overflow-wrap: anywhere;
}

.opal-team__role,
.opal-team__contact {
	margin: 0;
	font-size: 14px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.opal-team__role {
	margin-bottom: 2px;
	color: #555;
}

.opal-team__contact a {
	display: inline-block;
	padding: 2px 0;
}

@media (max-width: 767px) {
	.opal-team__contact a {
		min-height: 40px;
		line-height: 36px;
		padding: 0;
	}
}

@media (min-width: 768px) {
	.opal-team {
		gap: 32px 24px;
	}
	.opal-team__intro { margin-bottom: 24px; }
	.opal-team__name { font-size: 16px; }
}

/* tablet: photo tile beside the details, two per row */
@media (min-width: 768px) and (max-width: 1023px) {
	.opal-team__card {
		display: grid;
		grid-template-columns: 128px minmax(0, 1fr);
		grid-template-rows: repeat(4, auto) 1fr;
		column-gap: 16px;
	}
	.opal-team__photo {
		grid-row: 1 / -1;
		aspect-ratio: 4 / 5;
		margin: 0;
	}
}

@media (min-width: 1024px) {
	.opal-team { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.opal-team__photo { aspect-ratio: 4 / 5; margin-bottom: 12px; }
}

/* a headshot added from the admin page fills the frame */
.opal-team__photo--img {
	border: 0;
	overflow: hidden;
}
.opal-team__photo--img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 25%;
}

/* photo switched off in the admin page: the card is just the words,
   under a teal rule so the row still reads as a set of cards */
.opal-team__card--no-photo .opal-team__photo { display: none; }
.opal-team__card--no-photo {
	align-self: end;
	padding-top: 12px;
	border-top: 2px solid #00B2B5;
}
.opal-team:not(:has(> .opal-team__card:not(.opal-team__card--no-photo))) > .opal-team__card { align-self: start; }
@media (min-width: 768px) and (max-width: 1023px) {
	.opal-team__card.opal-team__card--no-photo { display: block; align-self: start; }
}

/* ------------------------------------------------------------
   Craft pass — every page
   Page titles are now <h1 class="post-title"> on single pages;
   keep them drawn exactly as the theme's h2 titles were.
   ------------------------------------------------------------ */
h1.post-title {
	line-height: 30px;
	margin-bottom: 10px;
}
body.attachment h1.post-title {
	font-size: 26px;
}

/* back arrow above the title on the project category pages; script.js
   sends it back through history, the href is the no-JS fallback */
.opal-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0 0 4px -12px;
	border-radius: 50%;
	color: #333;
	transition: color .2s ease, background-color .2s ease;
}
.opal-back:hover,
.opal-back:focus-visible {
	color: #00B2B5;
	background-color: rgba(0, 178, 181, .08);
}
.opal-back svg {
	display: block;
	width: 22px;
	height: 22px;
}
@media (prefers-reduced-motion: reduce) {
	.opal-back { transition: none; }
}

/* a sub-sector listed under a project page (Assisted Living on Residential,
   Restaurants on Commercial),
   drawn as a smaller copy of the page title */
.entry-content .opal-res-sub {
	margin-top: 24px;
}
.entry-content h2.opal-res-sub__title {
	font-family: Montserrat, sans-serif;
	font-weight: 400;
	font-size: clamp(20px, 1.2rem + 1vw, 24px);
	line-height: 1.25;
	color: #333;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e4e3e3;
	overflow-wrap: anywhere;
}
@media (min-width: 1024px) {
	.entry-content .opal-res-sub { margin-top: 32px; }
}
/* inline link in a sub-sector intro: a 48px touch area that doesn't move the text */
@media (max-width: 767px) {
	.entry-content .opal-res-sub__intro a {
		display: inline-block;
		padding-block: 16px;
		margin-block: -16px;
	}
}
/* a long sub-sector list (Restaurants on Commercial) runs in two columns
   on phone and tablet; desktop keeps the single list */
@media (max-width: 1023px) {
	.entry-content .opal-res-sub--cols {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 8px;
		align-items: start;
	}
	.entry-content .opal-res-sub--cols > * {
		margin: 0;
		overflow-wrap: anywhere;
	}
	.entry-content .opal-res-sub--cols > h2,
	.entry-content .opal-res-sub--cols > .opal-res-sub__intro,
	.entry-content .opal-res-sub--cols > .opal-res-sub__label {
		grid-column: 1 / -1;
	}
	.entry-content .opal-res-sub--cols > h2 { margin-bottom: 4px; }
	.entry-content .opal-res-sub--cols > .opal-res-sub__intro { margin-bottom: 4px; }
	.entry-content .opal-res-sub--cols > .opal-res-sub__spacer { display: none; }
	.entry-content .opal-res-sub--cols > .opal-res-sub__label { margin-top: 12px; }
	.entry-content .opal-res-sub--cols .opal-link-row a {
		display: block;
		min-height: 48px;
		padding: 6px 0;
	}
}
/* tablet columns hold every name on one line: centre it in the 48px target */
@media (min-width: 768px) and (max-width: 1023px) {
	.entry-content .opal-res-sub--cols { row-gap: 4px; align-items: center; }
	.entry-content .opal-res-sub--cols .opal-link-row a { padding: 13px 0; }
	.entry-content .opal-res-sub--cols > p:not(.opal-link-row) { padding: 2px 0; }
}

/* visible keyboard focus in the brand blue */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
#mobile-menu-trigger:focus-visible {
	outline: 2px solid #397c9a;
	outline-offset: 2px;
}

/* phone: touch-sized targets and iOS-safe form fields */
@media (max-width: 767px) {
	#mobile-menu-trigger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 48px;
		min-height: 48px;
		margin: -10px -15px;
		cursor: pointer;
	}

	#mobile-menu > li {
		margin: 0;
	}
	#mobile-menu > li > a {
		display: inline-block;
		min-height: 48px;
		line-height: 48px;
		min-width: 48px;
	}
	div#mobile-menu-wrap ul#mobile-menu li.menu-item-has-children .submenu-button-wrap {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin: 0 -11px 0 -16px;
		vertical-align: top;
		cursor: pointer;
	}
	/* the theme's toggle listens on the icon, so the icon fills the target */
	div#mobile-menu-wrap ul#mobile-menu li.menu-item-has-children .submenu-button-wrap span {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
	}
	#mobile-menu .sub-menu a {
		display: inline-block;
		padding: 14px 0;
	}

	/* one-link paragraphs on the project pages read as a list */
	.entry-content .opal-link-row {
		margin: 0;
	}
	.entry-content .opal-link-row + p:not(.opal-link-row) {
		margin-top: 12px;
	}
	.entry-content .opal-link-row a {
		display: inline-block;
		padding: 10px 0;
	}

	.entry-content a:has(> img) {
		display: inline-block;
	}

	.btn,
	a.btn {
		min-height: 48px;
		display: inline-flex;
		align-items: center;
	}

	.site-info a {
		display: inline-flex;
		align-items: center;
		min-height: 48px;
	}

	.comment-form input[type="text"],
	.comment-form input[type="email"],
	.comment-form input[type="url"],
	.comment-form textarea {
		width: 100%;
		max-width: 100%;
		min-height: 48px;
		font-size: 16px;
		box-sizing: border-box;
	}
	.comment-form input[type="submit"] {
		min-height: 48px;
		font-size: 16px;
	}
}

/* Home slider: tagline as plain text over every slide */
#parent-slider-wrap .fluid_container {
	position: relative;
	display: flow-root;
	/* the whole hero from the first frame: the slider inside is display: none
	   until its script runs, and the tagline sat at the top of that empty box
	   over the logo, then dropped into place */
	height: 100%;
}
.slider-tagline {
	position: absolute;
	inset: 0;
	/* in front of the mist (1000) and the white fade (1001) */
	z-index: 1002;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 140px;
	pointer-events: none;
}
/* the empty box lets clicks through to the slider; the words themselves stay clickable */
.slider-tagline .slide-tagline,
.slider-tagline .slide-tagline-sub {
	pointer-events: auto;
}
.slider-tagline .slide-tagline,
.slider-tagline .slide-tagline-sub {
	margin: 0;
	max-width: 100%;
	font-family: Montserrat, sans-serif;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 18px rgba(0, 0, 0, .45);
	overflow-wrap: anywhere;
}
.slider-tagline .slide-tagline {
	font-size: clamp(18px, 0.9rem + 1.6vw, 40px);
	font-weight: 700;
	line-height: 1.2;
}
.slider-tagline .slide-tagline-sub {
	margin-top: 8px;
	font-size: clamp(14px, 0.7rem + 0.5vw, 18px);
	font-weight: 400;
	letter-spacing: .08em;
	line-height: 1.3;
}
@media (max-width: 767px) {
	.slider-tagline {
		padding-top: 72px;
	}
	.slider-tagline .slide-tagline-sub {
		margin-top: 4px;
	}
}
/* the editor nudges the tagline left by a fixed amount, measured at 1440 where
   the text box starts 150px in; narrower desktops keep that 150px start so the
   words land in the same place instead of off the left edge */
@media (min-width: 1024px) and (max-width: 1439px) {
	.slider-tagline .container {
		width: auto;
		margin: 0;
		padding-left: 150px;
	}
}

/* ------------------------------------------------------------
   Home hero — full-bleed slider, fading to white at the foot,
   with the "Trusted by" logo marquee sitting in the fade.
   Camera.js sizes the slider from its width; these rules take
   the height over and let the photos cover the box.
   ------------------------------------------------------------ */
#parent-slider-wrap {
	--opal-hero-h: clamp(480px, 100svh, 900px);
	position: relative;
	height: var(--opal-hero-h) !important;
	/* clip, not hidden: a hidden box can still be swiped sideways
	   to the mist and photo edges spilling past it */
	overflow: hidden;
	overflow: clip;
}
#avenue_slider_wrap .camera_target { overflow: clip !important; }

/* First frame: the slider draws the photo only after every script on the
   page has run, so until then the hero shows the same photo itself
   (preloaded in index.html's head), framed exactly as the slide frames it,
   over the sky's blue while it downloads. No white flash, the white menu,
   lettering and tagline have their backdrop from the start, and the slide
   lands on top pixel for pixel. */
#parent-slider-wrap { background-color: #4a72a6; }
#parent-slider-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: url("wp-content/uploads/2016/07/cropped-pexels-photo-87223.jpeg") 50% 50% / cover no-repeat;
	pointer-events: none;
}
@media (min-width: 1024px) {
	/* the .cameraSlide_0 img framing below, plus the editor's nudge on it in mb-overrides.css */
	#parent-slider-wrap::before {
		background-position: 0% 50%;
		transform-origin: 0 0;
		transform: scale(1.12);
		translate: -49.5px 0;
	}
}
/* The slider reveals the photo by fading in a copy of the slide over it
   (.cameraappended), which the editor's nudge doesn't reach: the copy sat
   49.5px off and doubled the building, then snapped across as the real
   slide took over. The photo is already showing, so skip the copy — the
   real slide lands on the same pixels. (Autoplay is off: this fade only
   ever runs for that first reveal.) Opacity, not visibility: the slider
   sets visibility: visible on the copy's own slide. */
#avenue_slider_wrap .cameraappended { opacity: 0 !important; }

/* the slider's own loaders — a grey dashed GIF disc while the photo loads
   and a timer pie — landed on the menu button after every load; the hero
   already has the white fade and mist while the photo arrives */
#avenue_slider_wrap .camera_loader,
#avenue_slider_wrap .camera_pie { display: none !important; }

#parent-slider-wrap #avenue_slider_wrap,
#avenue_slider_wrap .camera_fakehover,
#avenue_slider_wrap .camera_target,
#avenue_slider_wrap .cameraCont,
#avenue_slider_wrap .cameraSlide,
#avenue_slider_wrap .camerarelative,
#avenue_slider_wrap .cameraappended {
	height: var(--opal-hero-h) !important;
}

#avenue_slider_wrap .cameraSlide img.imgLoaded {
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0 !important;
	object-fit: cover;
}

/* desktop: nudge the building right, towards (not under) the HOME link.
   Anchored top-left so no gap opens at the left edge and the roof
   doesn't climb into the menu. */
@media (min-width: 1024px) {
	#avenue_slider_wrap .cameraSlide_0 img.imgLoaded {
		object-position: 0% 50%;
		transform-origin: 0 0;
		transform: scale(1.12);
	}
}

/* scroll tilt — as the page scrolls (--mist-p, 0 → 1, from script.js) the
   shot of the building tips down and eases in, while the clouds rise.
   Pivoting on the foot of the photo keeps every edge covered. Moves the
   slide, not the img, so the img's own scale and the editor's offsets stay. */
#avenue_slider_wrap .cameraSlide_0 {
	transform-origin: 50% 100%;
	transform: perspective(1400px) rotateX(calc(var(--mist-p, 0) * 5deg)) scale(calc(1 + var(--mist-p, 0) * .14));
	will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
	#avenue_slider_wrap .cameraSlide_0 { transform: none; }
}

/* the fade to white */
#parent-slider-wrap::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40%;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .85) 62%, #fff 100%);
	pointer-events: none;
	z-index: 1001;
}

/* rising mist — faint cloud wisps drifting up the sides of the building,
   tucked under the white fade so they melt out of it */
.opal-mist {
	position: absolute;
	inset: 0;
	z-index: 1000;
	overflow: hidden;
	pointer-events: none;
	opacity: 0;
	transition: opacity 2s ease;
}
/* only over the building photo (first slide) */
#parent-slider-wrap:has(.cameraSlide_0.cameracurrent) .opal-mist {
	opacity: 1;
}
.opal-mist__puff {
	position: absolute;
	bottom: -12%;
	width: clamp(320px, 40vw, 640px);
	aspect-ratio: 4 / 3;
	background: url("images/hero/mist-a.webp") center / contain no-repeat;
	opacity: 0;
	will-change: transform, opacity;
	animation: opal-mist-rise 36s linear infinite;
}
.opal-mist__puff--l1 { left: -14%; animation-delay: 0s; }
.opal-mist__puff--l2 { left: 2%; background-image: url("images/hero/mist-b.webp"); animation-duration: 42s; animation-delay: -15s; }
.opal-mist__puff--l3 { left: -6%; animation-duration: 39s; animation-delay: -28s; }
.opal-mist__puff--r1 { right: -14%; background-image: url("images/hero/mist-b.webp"); animation-duration: 40s; animation-delay: -8s; }
.opal-mist__puff--r2 { right: 2%; animation-duration: 45s; animation-delay: -23s; }
.opal-mist__puff--r3 { right: -6%; background-image: url("images/hero/mist-b.webp"); animation-duration: 37s; animation-delay: -32s; }
.opal-mist__puff--l1, .opal-mist__puff--l2, .opal-mist__puff--l3 { --mist-drift: 6vw; }
.opal-mist__puff--r1, .opal-mist__puff--r2, .opal-mist__puff--r3 { --mist-drift: -6vw; }
.opal-mist__puff--l2 { --mist-drift: 8vw; }
.opal-mist__puff--r2 { --mist-drift: -8vw; }
/* each wisp sweeps up in an arc — in toward the building, then curling back out */
@keyframes opal-mist-rise {
	0%   { opacity: 0;   transform: translate3d(0, 0, 0) scale(.9) rotate(0deg); }
	15%  { opacity: .8; }
	45%  { transform: translate3d(var(--mist-drift, 0), -60%, 0) scale(1.12) rotate(2deg); }
	65%  { opacity: .55; }
	100% { opacity: 0;   transform: translate3d(calc(var(--mist-drift, 0) * .3), -145%, 0) scale(1.35) rotate(-2deg); }
}
/* scroll swoosh — script.js sets --mist-s, an eased 0 (top) to 1 (hero
   scrolled away) that trails the scroll, so the wisps lift smoothly at any
   scroll speed and a cloud bank rolls up from under the photo; the hero box
   itself clips them. */
.opal-mist {
	--p: var(--mist-s, var(--mist-p, 0));
	overflow: visible;
	transform: translate3d(0, calc(var(--p) * -55%), 0) scale(calc(1 + var(--p) * .3));
	transform-origin: 50% 100%;
	will-change: transform;
}
.opal-mist::before,
.opal-mist::after {
	content: "";
	position: absolute;
	top: 100%;
	height: 90%;
	background: url("images/hero/mist-a.webp") center bottom / 100% 100% no-repeat;
	opacity: min(1, calc(var(--p) * 2.6));
	pointer-events: none;
}
/* the bank: follows the eased scroll position and settles where the page stops */
.opal-mist::before {
	left: -30%;
	width: 90%;
	transform: translate3d(calc(var(--p) * 18%), calc(var(--p) * -105%), 0);
}
.opal-mist::after {
	right: -30%;
	width: 90%;
	background-image: url("images/hero/mist-b.webp");
	transform: translate3d(calc(var(--p) * -18%), calc(var(--p) * -125%), 0);
}
@media (max-width: 767px) {
	.opal-mist__puff { width: 70vw; }
	.opal-mist__puff--l2, .opal-mist__puff--r2 { display: none; }
	.opal-mist::before, .opal-mist::after { width: 120%; }
}
@media (prefers-reduced-motion: reduce) {
	.opal-mist__puff { animation: none; opacity: .3; }
	.opal-mist { transform: none; }
	.opal-mist::before, .opal-mist::after { display: none; }
}

.opal-trusted {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1002;
	padding: 0 0 24px;
	text-align: center;
}

/* the label, with the company search button at its end */
.opal-trusted__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 12px;
}

.opal-trusted__label {
	margin: 0;
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #0A4058;
}

.opal-trusted__lane {
	overflow: hidden;
	overflow: clip;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

/* two rows: industry professionals on top, clients beneath */
.opal-trusted__lane + .opal-trusted__lane { margin-top: 8px; }

.opal-trusted__track {
	--opal-count: 12;
	display: flex;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	/* duration = logos in one set × time per logo slot, so both rows roll
	   at the same 34px/s (tablet 47px/s, desktop 39px/s) however long they are */
	animation: opal-trusted-roll calc(var(--opal-count) * 4.25s) linear infinite;
}
/* 38 logos, 8 of them wide: 30 + 8 × 1.4 */
.opal-trusted__track--pros { --opal-count: 41.2; }
/* 22 logos, 1 of them wide: 21 + 1.4 */
.opal-trusted__track--clients { --opal-count: 22.4; }

.opal-trusted__logo {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 44px;
	margin-right: 32px;
	animation: opal-trusted-in 1.2s cubic-bezier(.16, .84, .3, 1) both;
	animation-delay: calc(var(--opal-in, 0) * 60ms + 400ms);
}
/* long, thin wordmarks get 1.4 slots so they don't shrink to a hairline —
   each one counts 1.4 in its row's --opal-count */
.opal-trusted__logo--wide { width: 170px; }

/* on load the row pushes in from the right, logos a beat apart */
.opal-trusted__logo:nth-child(12n+2)  { --opal-in: 1; }
.opal-trusted__logo:nth-child(12n+3)  { --opal-in: 2; }
.opal-trusted__logo:nth-child(12n+4)  { --opal-in: 3; }
.opal-trusted__logo:nth-child(12n+5)  { --opal-in: 4; }
.opal-trusted__logo:nth-child(12n+6)  { --opal-in: 5; }
.opal-trusted__logo:nth-child(12n+7)  { --opal-in: 6; }
.opal-trusted__logo:nth-child(12n+8)  { --opal-in: 7; }
.opal-trusted__logo:nth-child(12n+9)  { --opal-in: 8; }
.opal-trusted__logo:nth-child(12n+10) { --opal-in: 9; }
.opal-trusted__logo:nth-child(12n+11) { --opal-in: 10; }
.opal-trusted__logo:nth-child(12n+12) { --opal-in: 11; }

@keyframes opal-trusted-in {
	from { transform: translateX(100vw); opacity: 0; }
	40%  { opacity: 1; }
	to   { transform: none; opacity: 1; }
}

/* every client logo drawn in one dark ink, whatever its own colours */
.opal-trusted__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	filter: brightness(0);
	opacity: .72;
}
/* the professionals' row: every logo grows to fill its slot, so small
   source files sit as large as the rest */
.opal-trusted__track--pros .opal-trusted__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* the list is two identical sets, so half its width is one loop */
@keyframes opal-trusted-roll {
	to { transform: translateX(-50%); }
}

/* phone: the label keeps clear of the screen edges, in a narrower measure */
@media (max-width: 767px) {
	/* a touch tighter, so the label still sets in two lines beside the search button */
	.opal-trusted__head { gap: 6px; padding-inline: 12px; }
	.opal-trusted__label {
		max-width: 326px;
		letter-spacing: .06em;
		text-wrap: balance;
	}
}

@media (max-width: 767px) {
	.opal-trusted__lane:nth-of-type(2) .opal-trusted__track {
		animation-duration: calc(var(--opal-count) * 2.8s);
	}
}

@media (min-width: 768px) {
	.opal-trusted { padding-bottom: 40px; }
	.opal-trusted__head { margin-bottom: 16px; }
	.opal-trusted__lane + .opal-trusted__lane { margin-top: 12px; }
	.opal-trusted__track { animation-duration: calc(var(--opal-count) * 4.3s); }
	.opal-trusted__lane:nth-of-type(2) .opal-trusted__track {
		animation-duration: calc(var(--opal-count) * 2.8s);
	}
	.opal-trusted__logo {
		width: 152px;
		height: 56px;
		margin-right: 48px;
	}
	.opal-trusted__logo--wide { width: 232px; }
}

@media (min-width: 1024px) {
	.opal-trusted { padding-bottom: 48px; }
	.opal-trusted__lane {
		max-width: 1170px;
		margin: 0 auto;
	}
	.opal-trusted__lane + .opal-trusted__lane { margin-top: 16px; }
	.opal-trusted__track { animation-duration: calc(var(--opal-count) * 6s); }
	.opal-trusted__lane:nth-of-type(2) .opal-trusted__track {
		animation-duration: calc(var(--opal-count) * 3.9s);
	}
	.opal-trusted__logo {
		width: 168px;
		height: 64px;
		margin-right: 64px;
	}
	.opal-trusted__logo--wide { width: 261px; }
}

@media (prefers-reduced-motion: reduce) {
	.opal-trusted__track,
	.opal-trusted__logo { animation: none; }
}

/* hands-on (script.js): drag a row with the mouse, or swipe it. Swipes up
   and down stay the page's, so a scroll that starts on the logos scrolls
   on as usual; pinch-zoom stays too */
.opal-trusted.is-draggable .opal-trusted__lane {
	touch-action: pan-y pinch-zoom;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
}
.opal-trusted.is-draggable .opal-trusted__logo img { -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) {
	.opal-trusted.is-draggable .opal-trusted__lane { cursor: grab; }
	.opal-trusted.is-draggable .opal-trusted__lane.is-dragging { cursor: grabbing; }
}

/* Company search — the round button at the end of the label pops a small
   search card up above it. Once the typing narrows to one company, its row
   glides that logo to the middle and stops (script.js), and every other
   logo fades back. The script unhides the widget, so without it the label
   simply stands alone. */
.opal-find {
	position: relative;
	flex: none;
	text-align: left;
}
.opal-find[hidden] { display: none; }

/* a 48px hit area around a 36px ring, pulled in so it doesn't
   push the label row taller */
.opal-find__toggle {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: -12px -6px;
	padding: 0;
	border: 0;
	background: none;
	color: #0A4058;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.opal-find__toggle::before {
	content: "";
	grid-area: 1 / 1;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid rgba(10, 64, 88, .4);
	background: rgba(255, 255, 255, .55);
	transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.opal-find__toggle svg {
	grid-area: 1 / 1;
	position: relative;
	transition: color .25s ease;
}
.opal-find__toggle:hover::before,
.opal-find__toggle[aria-expanded="true"]::before {
	background: #0A4058;
	border-color: #0A4058;
}
.opal-find__toggle:hover,
.opal-find__toggle[aria-expanded="true"] { color: #fff; }
.opal-find__toggle:active::before { transform: scale(.92); }
.opal-find__toggle:focus-visible { outline: none; }
.opal-find__toggle:focus-visible::before {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #0A4058;
}

.opal-find__panel {
	position: absolute;
	/* --nudge: how far the card reaches past the button's right side;
	   its pointer always sits over the button's centre */
	--nudge: 14px;
	right: calc(-1 * var(--nudge));
	bottom: calc(100% + 18px);
	z-index: 3;
	display: flex;
	flex-direction: column-reverse;
	width: min(300px, calc(100vw - 32px));
	padding: 4px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 40px -12px rgba(10, 64, 88, .45), 0 2px 6px rgba(10, 64, 88, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(.94);
	transform-origin: calc(100% - 18px - var(--nudge)) 100%;
	transition: opacity .22s ease, transform .32s cubic-bezier(.2, .9, .3, 1.15), visibility 0s linear .32s;
}
/* the card's little pointer down to the button */
.opal-find__panel::after {
	content: "";
	position: absolute;
	right: calc(12px + var(--nudge));
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: rotate(45deg);
	border-radius: 0 0 3px 0;
}
.opal-find.is-open .opal-find__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .22s ease, transform .32s cubic-bezier(.2, .9, .3, 1.15), visibility 0s;
}

.opal-find__field {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-left: 12px;
	border-radius: 10px;
	background: #f1f5f8;
	color: #0A4058;
}
.opal-find__icon { flex: none; opacity: .6; }
.opal-find__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 4px;
	border: 0;
	background: none;
	font: 500 16px/1.3 Montserrat, sans-serif;
	color: #0A4058;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.opal-find__input::placeholder { color: rgba(10, 64, 88, .5); }
.opal-find__input::-webkit-search-cancel-button { display: none; }
.opal-find__field:focus-within { box-shadow: inset 0 0 0 2px rgba(10, 64, 88, .35); }
.opal-find__close {
	flex: none;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: none;
	color: #0A4058;
	cursor: pointer;
}
.opal-find__close:hover { background: rgba(10, 64, 88, .08); }

.opal-find__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.opal-find__list:not(:empty) { padding-bottom: 4px; }
.opal-find__option,
.opal-find__empty {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 6px 12px;
	border-radius: 8px;
	font: 500 15px/1.3 Montserrat, sans-serif;
	color: #0A4058;
}
.opal-find__option { cursor: pointer; }
.opal-find__option mark {
	padding: 0;
	background: none;
	color: inherit;
	font-weight: 700;
}
.opal-find__option:hover,
.opal-find__option.is-active { background: #f1f5f8; }
.opal-find__option[aria-selected="true"] { background: #0A4058; color: #fff; }
.opal-find__empty { color: rgba(10, 64, 88, .65); }
/* phone: the card keeps 12px clear of the screen edge, like the label */
@media (max-width: 767px) {
	.opal-find__panel { --nudge: 0px; }
}
@media (min-width: 1024px) {
	.opal-find__option,
	.opal-find__empty { min-height: 40px; }
}

.opal-find__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* a company found: everything else steps back */
.opal-trusted__logo img { transition: opacity .7s ease; }
.opal-trusted.is-finding .opal-trusted__logo img { opacity: .1; }
.opal-trusted.is-finding .opal-trusted__logo.is-found img { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.opal-find__panel,
	.opal-find.is-open .opal-find__panel,
	.opal-find__toggle::before,
	.opal-trusted__logo img { transition: none; }
}

/* ------------------------------------------------------------
   Home — job-type photo cards under the intro line.
   Every size: one sideways lane across the full screen width, the first
   card lined up with the text column. Phone: about 1¾ cards in view.
   Tablet: about 2½. Desktop: 4, looping, with the edge-hover spin.
   ------------------------------------------------------------ */
.opal-jobs-lane {
	--jobs-vw: calc(100vw - var(--sbw, 0px));
	--jobs-cw: calc(var(--jobs-vw) - 30px);
	--jobs-gap: 12px;
	position: relative;
	width: var(--jobs-vw);
	margin: 16px 0 28px calc(50% - var(--jobs-vw) / 2);
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scroll-padding-inline: calc((var(--jobs-vw) - var(--jobs-cw)) / 2);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	/* the right edge fades out — the cue that more cards wait off-screen */
	-webkit-mask-image: linear-gradient(to right, #000 82%, rgba(0,0,0,.35) 94%, transparent);
	mask-image: linear-gradient(to right, #000 82%, rgba(0,0,0,.35) 94%, transparent);
}
.opal-jobs-lane::-webkit-scrollbar { display: none; }

.opal-jobs {
	list-style: none;
	margin: 0;
	padding: 12px calc((var(--jobs-vw) - var(--jobs-cw)) / 2);
	display: flex;
	gap: var(--jobs-gap);
	width: max-content;
}

.opal-jobs__item {
	flex: none;
	width: calc((var(--jobs-cw) - var(--jobs-gap)) / 1.75);
	min-width: 0;
	margin: 0;
	/* swipes settle with a photo centred, the same place the chevrons put it */
	scroll-snap-align: center;
	/* the same turning drum as desktop, gentler: script.js sets --jobs-t */
	transform: perspective(900px) rotateY(calc(var(--jobs-t, 0) * 16deg)) scale(calc(1 - var(--jobs-t, 0) * var(--jobs-t, 0) * .05));
}

.entry-content .opal-jobs__card,
.opal-jobs__card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: #0A4058;
	text-decoration: none;
	transition: opacity .3s ease;
}

/* dimmed until hovered — only where a pointer can hover, so touch screens show full colour */
@media (hover: hover) {
	.opal-jobs__card { opacity: .8; }
	.opal-jobs__card:hover,
	.opal-jobs__card:focus-visible { opacity: 1; }
}

.opal-jobs__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

/* keyed to each card's link, not its position, so the desktop loop's copies
   (script.js) crop exactly like the cards they stand in for */
.opal-jobs__card[href="projects-leed-projects.html"] .opal-jobs__img { object-position: 70% 30%; }
.opal-jobs__card[href="projects-civic-and-recreational.html"] .opal-jobs__img { object-position: 40% 35%; }
.opal-jobs__card[href="projects-institutional.html"] .opal-jobs__img { object-position: 0% 40%; }

.opal-jobs__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(6, 40, 56, .85), rgba(6, 40, 56, 0) 65%);
}

.opal-jobs__label {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	z-index: 1;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

/* Design Philosophy — bold navy panel to carry the weight of the job cards above */
.entry-content [data-mb="p-6d46b"] {
	margin: 0 0 24px;
	padding: 24px 16px;
	background: linear-gradient(135deg, #0A4058, #062838);
	border-left: 4px solid #5AB4DC;
	color: rgba(255, 255, 255, .92);
	font-size: 14px;
	line-height: 1.45;
}

.entry-content [data-mb="p-6d46b"] strong {
	display: block;
	margin-bottom: 8px;
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-size: clamp(20px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.entry-content .opal-philosophy__btn {
	display: flex;
	align-items: center;
	width: fit-content;
	max-width: 100%;
	min-height: 48px;
	margin: 24px auto 8px;
	padding: 0 24px;
	background: #5AB4DC;
	color: #062838;
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.entry-content .opal-philosophy__btn:hover,
.entry-content .opal-philosophy__btn:focus-visible {
	background: #fff;
	color: #062838;
	text-decoration: none;
}

.entry-content .opal-philosophy__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.entry-content .opal-philosophy__btn { transition: none; }
}

/* caps on the title only — the copy sharing its <strong> stays sentence case */
.entry-content [data-mb="p-6d46b"] strong > span + span {
	text-transform: none;
	letter-spacing: 0;
}

/* phone: keep the panel to one screen — tighter padding */
@media (max-width: 767px) {
	.entry-content [data-mb="p-6d46b"] { padding: 16px; }
}

@media (min-width: 768px) {
	.entry-content [data-mb="p-6d46b"] {
		padding: 32px 40px;
		font-size: 16px;
		line-height: 1.6;
	}
}

/* Philosophy row — animated 3D electrical plan on the left, joined to the
   panel across a small gap by three "wires"; panel picks up an opal wash on its left */
.opal-philosophy {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin: 0 0 24px;
}

.entry-content .opal-philosophy [data-mb="p-6d46b"] {
	margin: 0;
	background:
		linear-gradient(90deg, rgba(79, 175, 179, .55) 0%, rgba(57, 124, 154, .28) 16%, rgba(10, 64, 88, 0) 42%),
		linear-gradient(135deg, #0A4058, #062838);
}

.opal-plan {
	position: relative;
	margin: 0;
	height: 120px;
	background:
		radial-gradient(ellipse at 50% 60%, rgba(79, 175, 179, .22), rgba(6, 40, 56, 0) 70%),
		repeating-linear-gradient(0deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(90deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px),
		#062838;
	border-top: 4px solid #4fafb3;
}

/* Combined philosophy band — plan and panel share one full-bleed navy band,
   the opal gradient running down its left side; no gap, no wires */
.site-content { container: opal-page / inline-size; }

.opal-philosophy {
	gap: 0;
	margin-inline: calc(50% - 50cqw);
	background:
		linear-gradient(90deg, rgba(79, 175, 179, .55) 0%, rgba(57, 124, 154, .28) 16%, rgba(10, 64, 88, 0) 42%),
		linear-gradient(135deg, #0A4058, #062838);
}

.entry-content .opal-philosophy [data-mb="p-6d46b"] {
	background: none;
	border-left: 0;
}

.opal-philosophy .opal-plan {
	background: radial-gradient(ellipse at 50% 60%, rgba(79, 175, 179, .22), rgba(6, 40, 56, 0) 70%);
	border: 0;
}

/* blueprint grid fades into the panel instead of stopping at a hard edge */
.opal-philosophy .opal-plan::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(0deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(90deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px);
	-webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
	mask-image: linear-gradient(180deg, #000 60%, transparent);
	pointer-events: none;
}

@media (min-width: 1024px) {
	.opal-philosophy .opal-plan::before {
		-webkit-mask-image: linear-gradient(90deg, #000 60%, transparent);
		mask-image: linear-gradient(90deg, #000 60%, transparent);
	}
}

.opal-philosophy .opal-plan::after { content: none; }

/* the wires crossing the gap: below the plan on phone, beside it from tablet up */
.opal-plan::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 30%;
	width: 40%;
	height: 8px;
	background: repeating-linear-gradient(90deg, #4fafb3 0 2px, transparent 2px 33%);
	background-position: 16.5% 0;
}

.opal-plan__canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

/* Entrance. Script adds .is-intro before the band comes into view: the plan
   waits larger (--intro-s), centred on the band (--intro-x/y, measured by
   script) and transparent, with the copy hidden. Taking the class off as the
   build starts plays it: the plan glides and shrinks into its column as it
   fades in, and the copy fades in after it. Only transform and opacity move,
   so the browser runs it off the main thread. Without script, or under
   prefers-reduced-motion, none of it applies. */
.opal-philosophy {
	position: relative;
	overflow: hidden;
	overflow: clip;
	--intro-s: 1.45;
}
@media (min-width: 1024px) {
	.opal-philosophy { --intro-s: 1.3; }
}
.opal-philosophy .opal-plan {
	transition: transform 1.6s cubic-bezier(.22, 1, .36, 1), opacity 1.1s ease-out;
}
.opal-philosophy > :not(.opal-plan) {
	position: relative;
	z-index: 1;
	transition: opacity .9s ease .6s;
}
.opal-philosophy.is-intro .opal-plan,
.opal-philosophy.is-gliding .opal-plan { will-change: transform, opacity; }
.opal-philosophy.is-intro .opal-plan {
	opacity: 0;
	transform: translate(var(--intro-x, 0px), var(--intro-y, 0px)) scale(var(--intro-s));
	transition: none;
}
.opal-philosophy.is-intro > :not(.opal-plan) {
	opacity: 0;
	transition: none;
}
@media (prefers-reduced-motion: reduce) {
	.opal-philosophy .opal-plan,
	.opal-philosophy > :not(.opal-plan) { transition: none; }
}

@media (max-width: 767px) {
	.entry-content .opal-philosophy [data-mb="p-6d46b"] {
		padding: 12px 16px;
		line-height: 1.35;
	}
	.entry-content .opal-philosophy [data-mb="p-6d46b"] strong {
		margin-bottom: 4px;
		line-height: 1.05;
	}
	.entry-content .opal-philosophy [data-mb="p-6d46b"] strong > span + span {
		font-size: 14px !important;
		line-height: 1.3;
	}
	/* centred with room above and below; the plan gives up a little height
	   (below) so the band stays one screen */
	.entry-content .opal-philosophy .opal-philosophy__btn { margin: 24px auto 12px; }
}

/* phone & tablet: the panel's heading sits above the plan (its in-panel copy,
   and the blank line after it, are hidden), and the plan gets more height */
.entry-content .opal-philosophy .opal-philosophy__kicker { display: none; }
@media (max-width: 1023px) {
	.entry-content .opal-philosophy .opal-philosophy__kicker {
		display: block;
		margin: 0;
		padding: 16px 16px 0;
		color: #fff;
		font-family: Montserrat, sans-serif;
		font-size: 20px;
		line-height: 1.1;
		letter-spacing: .4px;
		overflow-wrap: anywhere;
	}
	.entry-content .opal-philosophy [data-mb="p-6d46b"] strong > span:first-child,
	.entry-content .opal-philosophy [data-mb="p-6d46b"] strong > span + span > br:first-child { display: none; }
	.opal-philosophy .opal-plan { height: clamp(150px, 48vw, 200px); }
	/* glow and grid run on past the plan's box, behind the copy, and fade out there */
	.opal-philosophy .opal-plan { background: none; }
	.opal-philosophy .opal-plan::before {
		bottom: -50%;
		background:
			radial-gradient(ellipse 70% 55% at 50% 40%, rgba(79, 175, 179, .22), rgba(6, 40, 56, 0)),
			repeating-linear-gradient(0deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px),
			repeating-linear-gradient(90deg, rgba(90, 180, 220, .08) 0 1px, transparent 1px 24px);
		-webkit-mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .6) 70%, transparent);
		mask-image: linear-gradient(180deg, #000 45%, rgba(0, 0, 0, .6) 70%, transparent);
	}
}
@media (min-width: 768px) and (max-width: 1023px) {
	.entry-content .opal-philosophy .opal-philosophy__kicker { padding: 40px 40px 0; }
	.opal-philosophy .opal-plan { height: 360px; }
}
@media (max-width: 767px) {
	.opal-philosophy .opal-plan { height: 156px; }
}

/* tablet: the plan is a wide strip above the panel */
@media (min-width: 768px) {
	.opal-philosophy { margin-bottom: 32px; }
	.opal-plan { height: 240px; }
	.opal-plan::after { height: 12px; }
	.entry-content .opal-philosophy [data-mb="p-6d46b"] { padding: 40px; }
}

/* desktop: plan on the left, panel on the right, one band */
@media (min-width: 1024px) {
	.opal-philosophy {
		grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
	}
	/* right edge of the copy lines up with the page container */
	.entry-content .opal-philosophy [data-mb="p-6d46b"] {
		min-height: 560px;
		padding: 56px max(48px, calc(50cqw - 570px)) 56px 56px;
	}
	.opal-plan {
		height: auto;
		min-height: 320px;
		border-top: 0;
		border-left: 4px solid #4fafb3;
	}
	.opal-plan::after {
		top: 30%;
		left: 100%;
		width: 16px;
		height: 40%;
		background: repeating-linear-gradient(180deg, #4fafb3 0 2px, transparent 2px 33%);
		background-position: 0 16.5%;
	}
}

.opal-jobs__card:hover .opal-jobs__img,
.opal-jobs__card:focus-visible .opal-jobs__img {
	transform: scale(1.06);
}

.opal-jobs__card:focus-visible {
	outline: 3px solid #5AB4DC;
	outline-offset: 2px;
}

@media (min-width: 768px) and (max-width: 1023px) {
	.opal-jobs-lane {
		--jobs-gap: 18px;
		margin-top: 28px;
		margin-bottom: 44px;
	}
	.opal-jobs__item { width: calc((var(--jobs-cw) - 2 * var(--jobs-gap)) / 2.5); }
	.opal-jobs__label { left: 14px; right: 14px; bottom: 14px; font-size: 15px; }
}

/* phone & tablet: chevrons either side of the lane step it one card at a
   time (script.js shows them; without it the lane still swipes). Desktop
   keeps its edge-hover spin instead. */
.opal-jobs-wrap { position: relative; }
.opal-jobs-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: -24px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #0A4058;
	box-shadow: 0 4px 14px rgba(6, 40, 56, .28);
	cursor: pointer;
	transition: opacity .25s ease, transform .2s ease;
}
.opal-jobs-nav[hidden] { display: none; }
.opal-jobs-nav--prev { left: calc(50% - 50vw + 6px); }
.opal-jobs-nav--next { right: calc(50% - 50vw + 6px); }
.opal-jobs-nav:active { transform: scale(.94); }
.opal-jobs-nav:focus-visible { outline: 3px solid #5AB4DC; outline-offset: 2px; }
.opal-jobs-nav:disabled { opacity: .35; cursor: default; }
@media (min-width: 768px) {
	.opal-jobs-nav { width: 52px; height: 52px; margin-top: -26px; }
}
@media (min-width: 1024px) {
	.opal-jobs-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.opal-jobs-nav { transition: none; }
	.opal-jobs-nav:active { transform: none; }
}

/* clones only exist for the desktop loop (script.js) */
.opal-jobs__item--clone { display: none; }

/* desktop: four cards across the text column, the rest waiting on either
   side under the same edge fade as the Trusted-by logos; hovering an edge
   spins the lane (script.js) */
@media (min-width: 1024px) {
	.opal-jobs-lane {
		--jobs-vw: calc(100vw - var(--sbw, 0px));
		--jobs-cw: min(1140px, calc(var(--jobs-vw) - 84px));
		position: relative;
		--jobs-gap: 48px;
		width: var(--jobs-vw);
		/* the list's 24px top/bottom padding gives the tilted edge cards room,
		   so the lane still sits 24px / 32px from its neighbours */
		margin: 0 0 8px calc(50% - var(--jobs-vw) / 2);
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		/* the loop and spin (script.js) steer the scroll here, not snapping */
		scroll-snap-type: none;
		scrollbar-width: none;
		-webkit-mask-image: linear-gradient(to right, transparent, rgba(0,0,0,.35) 9%, #000 22%, #000 78%, rgba(0,0,0,.35) 91%, transparent);
		mask-image: linear-gradient(to right, transparent, rgba(0,0,0,.35) 9%, #000 22%, #000 78%, rgba(0,0,0,.35) 91%, transparent);
	}
	.opal-jobs-lane::-webkit-scrollbar { display: none; }
	/* click-and-drag (script.js) */
	.opal-jobs-lane { cursor: grab; }
	.opal-jobs-lane.is-dragging,
	.opal-jobs-lane.is-dragging .opal-jobs__card { cursor: grabbing; user-select: none; }
	.opal-jobs__img { -webkit-user-drag: none; }
	.opal-jobs {
		display: flex;
		gap: var(--jobs-gap);
		width: max-content;
		margin: 0;
		padding: 24px calc((var(--jobs-vw) - var(--jobs-cw)) / 2);
	}
	/* cards stand on a turning carousel: script.js sets --jobs-t (-1 at the
	   left edge, 0 centred, 1 at the right) and the cards toward the edges
	   swing away round the drum */
	.opal-jobs__item {
		flex: none;
		width: calc((var(--jobs-cw) - 3 * var(--jobs-gap)) / 4);
		scroll-snap-align: none;
		transform: perspective(1400px) rotateY(calc(var(--jobs-t, 0) * 24deg)) scale(calc(1 - var(--jobs-t, 0) * var(--jobs-t, 0) * .06));
	}
	.opal-jobs__item--clone { display: block; }
	/* while the lane spins, cards sliding under the pointer don't flash brighter */
	.opal-jobs-lane.is-spinning .opal-jobs__card { opacity: .8; }
	.opal-jobs-lane.is-spinning .opal-jobs__img { transform: none; }
	.entry-content .opal-jobs__card,
	.opal-jobs__card { aspect-ratio: 4 / 5; }
	.opal-jobs__label { left: 16px; right: 16px; bottom: 16px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.opal-jobs__img,
	.opal-jobs__card { transition: none; }
	.opal-jobs__item { transform: none; }
	.opal-jobs__card:hover .opal-jobs__img,
	.opal-jobs__card:focus-visible .opal-jobs__img { transform: none; }
}

/* Home: the lane slides flat, side to side (no drum tilt), and keeps its
   chevrons on desktop too — there they sit over the edge-hover spin zones and
   grow as the pointer moves into one (script.js sets --jobs-near, 0 to 1) */
.opal-jobs-wrap--flat .opal-jobs__item { transform: none; }
@media (min-width: 1024px) {
	.opal-jobs-wrap--flat .opal-jobs-nav {
		display: flex;
		width: 52px;
		height: 52px;
		margin-top: -26px;
		transform: scale(calc(1 + var(--jobs-near, 0) * .45));
		transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
	}
	.opal-jobs-wrap--flat .opal-jobs-nav[hidden] { display: none; }
	.opal-jobs-wrap--flat .opal-jobs-nav--prev { left: calc(50% - 50vw + var(--sbw, 0px) / 2 + 24px); }
	.opal-jobs-wrap--flat .opal-jobs-nav--next { right: calc(50% - 50vw + var(--sbw, 0px) / 2 + 24px); }
	.opal-jobs-wrap--flat .opal-jobs-nav.is-near { box-shadow: 0 8px 22px rgba(6, 40, 56, .36); }
	.opal-jobs-wrap--flat .opal-jobs-nav:active { transform: scale(calc((1 + var(--jobs-near, 0) * .45) * .94)); }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
	.opal-jobs-wrap--flat .opal-jobs-nav,
	.opal-jobs-wrap--flat .opal-jobs-nav:active { transition: none; }
}

/* the closed phone menu waits off-screen; keep its links inside its own panel */
#mobile-menu-wrap {
	overflow-x: hidden;
}

/* ------------------------------------------------------------
   Menus (a-6d42u and siblings) set in the logo's ENGINEERING face
   ------------------------------------------------------------ */
#site-branding div.navigation div#primary-menu > ul > li > a,
#site-branding div.navigation ul#primary-menu > li > a,
#site-branding div.navigation ul#primary-menu ul.sub-menu a,
div#mobile-menu-wrap ul#mobile-menu > li,
div#mobile-menu-wrap ul#mobile-menu a {
	font-family: Jost, Futura, "Century Gothic", sans-serif;
	text-transform: uppercase;
}

/* larger top-level links */
#site-branding div.navigation ul#primary-menu > li > a {
	font-size: 18px;
	letter-spacing: .04em;
}
div#mobile-menu-wrap ul#mobile-menu > li > a {
	font-size: 18px;
	letter-spacing: .04em;
}
div#mobile-menu-wrap ul#mobile-menu .sub-menu a {
	font-size: 15px;
}
#site-branding ul#primary-menu ul.sub-menu li a {
	font-size: 15px;
	width: auto;
	min-width: 200px;
	padding-right: 24px;
	white-space: nowrap;
}

/* underline draws from the middle outwards, right under the text;
   the current page keeps it drawn. Replaces the theme's bottom bar. */
header#masthead ul#primary-menu > li > a,
header#masthead ul#primary-menu > li:hover > a,
.main-navigation ul#primary-menu > li.current_page_item > a,
.main-navigation ul#primary-menu > li.current-menu-item > a,
.main-navigation ul#primary-menu > li.current_page_parent > a {
	position: relative;
	border-bottom: 0;
}
header#masthead ul#primary-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(50% + .8em);
	height: 2px;
	background: #397C9A;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}
header#masthead ul#primary-menu > li:hover > a::after,
header#masthead ul#primary-menu > li > a:focus-visible::after,
header#masthead ul#primary-menu > li.current-menu-item > a::after,
header#masthead ul#primary-menu > li.current_page_item > a::after,
header#masthead ul#primary-menu > li.current_page_parent > a::after,
header#masthead ul#primary-menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* dropdowns fade and glide down instead of snapping open */
#site-branding ul#primary-menu ul.sub-menu {
	display: block;
	left: 0;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-10px);
	box-shadow: 0 12px 28px rgba(10, 64, 88, .14), 0 2px 6px rgba(0, 0, 0, .06);
	/* closing waits a beat, so a cursor that strays on its way down can come back */
	transition: opacity .28s ease .15s, transform .32s cubic-bezier(.22, .61, .36, 1) .15s, visibility 0s linear .47s;
}
/* invisible bridge over the gap between the link and its dropdown,
   so moving the cursor down keeps the menu open */
#site-branding ul#primary-menu ul.sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 24px;
}
#site-branding ul#primary-menu > li.menu-item-has-children:hover > ul.sub-menu,
#site-branding ul#primary-menu > li.menu-item-has-children:focus-within > ul.sub-menu {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity .28s ease, transform .32s cubic-bezier(.22, .61, .36, 1), visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
	header#masthead ul#primary-menu > li > a::after,
	#site-branding ul#primary-menu ul.sub-menu,
	#site-branding ul#primary-menu > li.menu-item-has-children:hover > ul.sub-menu,
	#site-branding ul#primary-menu > li.menu-item-has-children:focus-within > ul.sub-menu,
	#site-branding ul#primary-menu ul.sub-menu li a {
		transition: none;
	}
	#site-branding ul#primary-menu ul.sub-menu { transform: none; }
}

/* ------------------------------------------------------------
   Custom cursor — logo-turquoise dot with two trailing logo-colour dots.
   Only switched on by script.js for a mouse/trackpad with motion
   allowed; touch screens and reduced-motion keep the normal pointer.
   ------------------------------------------------------------ */
html.has-opal-cursor,
html.has-opal-cursor * { cursor: none !important; }

.opal-cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483647;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s ease;
	will-change: transform;
}
html.has-opal-cursor.opal-cursor-on .opal-cursor { opacity: 1; }
.opal-cursor--lead {
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	background: #4fafb3;
	box-shadow: 0 0 0 1.5px #fff, 0 1px 4px rgba(0, 0, 0, .3);
}
.opal-cursor--teal {
	width: 11px;
	height: 11px;
	margin: -5.5px 0 0 -5.5px;
	background: #ade6c8;
}
.opal-cursor--blue {
	width: 9px;
	height: 9px;
	margin: -4.5px 0 0 -4.5px;
	background: #397c9a;
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
	.opal-cursor { display: none; }
}

/* ------------------------------------------------------------
   Page transitions — the nav bar holds still while the page
   underneath slides across: forward along the menu slides in from
   the right, backward from the left (direction set by
   transitions.js). Native cross-document view transitions, so the
   old page stays on screen until the new one is ready — no blank
   frame — and browsers without them simply load the page.
   Phones get a short vertical rise instead of a sideways slide.
   ------------------------------------------------------------ */
@view-transition {
	navigation: auto;
}

html {
	background: #fff;
}

/* The bar is pinned from the first frame. The theme's sticky.js only fixes
   it after the page has scrolled past it, then plays fadeInDown — the bar
   rode up with the page, snapped off-screen and slid back down. Fixed from
   the start, its wrapper keeps the space and nothing moves on scroll. */
#site-branding-sticky-wrap-sticky-wrapper #site-branding-sticky-wrap {
	position: fixed;
	top: 0;
	animation: none !important;
}
/* The wrapper is in each page's markup (sticky.js used to add it after load,
   restarting the logo intro and shifting the page), so it holds the bar's
   space before the script measures it. Under 992px the theme's head styles
   already size it. */
@media (min-width: 992px) {
	#site-branding-sticky-wrap-sticky-wrapper { height: 127px; }
}
#site-branding-sticky-wrap { left: 0; right: 0; }

#site-branding-sticky-wrap { view-transition-name: opal-bar; }
#site-branding { view-transition-name: opal-nav; }
.opal-cursor--lead { view-transition-name: opal-cursor-lead; }
.opal-cursor--teal { view-transition-name: opal-cursor-teal; }
.opal-cursor--blue { view-transition-name: opal-cursor-blue; }
html.opal-vt-unpinned #site-branding-sticky-wrap,
html.opal-vt-unpinned #site-branding { view-transition-name: none; }

::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
	animation-duration: .72s;
	animation-timing-function: cubic-bezier(.76, 0, .24, 1);
}

::view-transition-old(root) { animation-name: opal-page-out; }
::view-transition-new(root) { animation-name: opal-page-in; }
html:active-view-transition-type(opal-back)::view-transition-old(root) { animation-name: opal-page-out-back; }
html:active-view-transition-type(opal-back)::view-transition-new(root) { animation-name: opal-page-in-back; }

@keyframes opal-page-out      { to   { transform: translateX(-100%); } }
@keyframes opal-page-in       { from { transform: translateX(100%); } }
@keyframes opal-page-out-back { to   { transform: translateX(100%); } }
@keyframes opal-page-in-back  { from { transform: translateX(-100%); } }

/* the bar: the white card glides between the home page's inset card and
   the full-width bar of the inner pages; the logo and menu stay put and
   only the active underline changes — old one fades, new one draws in */
::view-transition-old(opal-nav) { animation: opal-vt-fade-out .3s ease both; }
::view-transition-new(opal-nav) { animation: none; }
@keyframes opal-vt-fade-out { to { opacity: 0; } }

html.opal-vt-in header#masthead ul#primary-menu > li.current-menu-item > a::after,
html.opal-vt-in header#masthead ul#primary-menu > li.current_page_item > a::after,
html.opal-vt-in header#masthead ul#primary-menu > li.current_page_parent > a::after,
html.opal-vt-in header#masthead ul#primary-menu > li.current-menu-ancestor > a::after {
	animation: opal-underline-in .5s cubic-bezier(.22, .61, .36, 1) .22s both;
}
@keyframes opal-underline-in { from { transform: scaleX(0); } }

/* the home logo intro plays on arrival at the site, not on every return to Home */
html.opal-vt-in .opal-logo-intro::before,
html.opal-vt-in .opal-logo-intro::after,
html.opal-intro-seen .opal-logo-intro::before,
html.opal-intro-seen .opal-logo-intro::after { display: none; }
html.opal-vt-in .opal-logo-intro img,
html.opal-intro-seen .opal-logo-intro img { animation: none; }

/* the cursor stays exactly under the pointer */
html.opal-vt-in .opal-cursor { transition: none; }
::view-transition-group(opal-cursor-lead),
::view-transition-group(opal-cursor-teal),
::view-transition-group(opal-cursor-blue),
::view-transition-new(opal-cursor-lead),
::view-transition-new(opal-cursor-teal),
::view-transition-new(opal-cursor-blue) { animation: none; }
::view-transition-old(opal-cursor-lead),
::view-transition-old(opal-cursor-teal),
::view-transition-old(opal-cursor-blue) { display: none; }

@media (max-width: 767px) {
	::view-transition-old(root),
	html:active-view-transition-type(opal-back)::view-transition-old(root) { animation: opal-page-lift-out .24s cubic-bezier(.4, 0, 1, 1) both; }
	::view-transition-new(root),
	html:active-view-transition-type(opal-back)::view-transition-new(root) { animation: opal-page-lift-in .5s cubic-bezier(.2, .7, .2, 1) .16s both; }
	@keyframes opal-page-lift-out { to   { opacity: 0; transform: translateY(-12px); } }
	@keyframes opal-page-lift-in  { from { opacity: 0; transform: translateY(28px); } }
}

@media (prefers-reduced-motion: reduce) {
	@view-transition { navigation: none; }
	html.opal-vt-in header#masthead ul#primary-menu > li > a::after { animation: none; }
}

/* Footer bar: white with the Opal logo on the left */
.site-footer .site-info {
	background-color: #fff;
	color: #111;
	border-top: 1px solid #e6e6e6;
	padding: 16px 0;
}
/* home: the philosophy band sits directly on the footer, no empty strip */
.home #content .frontpage { padding-bottom: 0; }
.home .entry-content .opal-philosophy { margin-bottom: 0; }
.home .entry-content > .gallery:not(:has(img)) { margin: 0; }
.home .frontpage > .pagination-links:not(:has(a)) { padding: 0; margin: 0; min-height: 0; }
/* phone: logo and arrow on one line, copyright beneath */
@media (max-width: 767px) {
	.site-footer .site-info .col-xs-3 { margin-left: auto; }
	.site-footer .site-info .col-xs-9 {
		order: 3;
		flex-basis: 100%;
		margin-left: 0;
		text-align: left;
	}
}
.site-footer .site-info .avenue-copyright { margin-bottom: 0; }
@media (min-width: 768px) {
	.site-footer .site-info { padding: 24px 0; }
}
.site-footer .site-info .row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}
.site-footer .site-info .row::before,
.site-footer .site-info .row::after {
	display: none;
}
.site-footer .site-info .row > [class*="col-xs-"] {
	float: none;
	width: auto;
}
.site-footer .site-info .col-xs-9 {
	margin-left: auto;
}
/* back-to-top arrow sits at the far right, after the copyright */
.site-footer .site-info .col-xs-3 {
	order: 2;
}
/* the copyright lines stay in the bar: cancels a desktop nudge that pushed them off-screen */
.site-footer .site-info .col-xs-9 > .avenue-copyright[data-mb],
.site-footer .site-info .col-xs-9 > a.rel[data-mb] {
	translate: none !important;
}
.site-info__logo {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 15px;
}
.site-info__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 44px;
}
.site-footer .site-info,
.site-footer .site-info .avenue-copyright,
.site-footer .site-info .col-xs-9.text-right a,
.site-footer .site-info .scroll-top {
	color: #111;
}
.site-footer .site-info .scroll-top {
	border-color: #111;
}

/* ------------------------------------------------------------
   Full-screen menu (btn-menu-trigger, div-6d43m and its links)
   Below the desktop nav the menu button is two bars that cross
   into an X; the menu covers the screen in white with the Opal
   logo on top, a teal circle sliding in from the right edge and
   a mint one rising from the bottom edge. script.js sets
   html.opal-menu-open.
   ------------------------------------------------------------ */
.mobile-trigger-wrap {
	position: relative;
	z-index: 10000; /* above the open menu, so the X closes it */
}
.mobile-trigger-wrap #mobile-menu-trigger.opal-burger {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 48px;
	min-height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	vertical-align: middle;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.opal-burger__bar {
	display: block;
	width: 28px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
html.opal-menu-open .opal-burger__bar:first-child { transform: translateY(5px) rotate(45deg); }
html.opal-menu-open .opal-burger__bar:last-child  { transform: translateY(-5px) rotate(-45deg); }
html.opal-menu-open body #site-branding-sticky-wrap #site-branding #mobile-menu-trigger { color: #0a4058; }

/* the menu itself: closed, it is invisible and out of the tab order */
div#mobile-menu-wrap {
	position: fixed;
	inset: 0;
	z-index: 9999;
	width: 100% !important;
	height: 100%;
	overflow: hidden;
	background: #fff;
	visibility: hidden;
	opacity: 0;
	transition: opacity .45s ease, visibility 0s linear .45s;
}
html.opal-menu-open div#mobile-menu-wrap {
	visibility: visible;
	opacity: 1;
	transition: opacity .45s ease;
}
html.opal-menu-open,
html.opal-menu-open body { overflow: hidden; }
#mobile-overlay,
div#mobile-menu-wrap #mobile-menu-close { display: none !important; }

div#mobile-menu-wrap nav#menu {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 0 24px calc(32px + env(safe-area-inset-bottom));
	overflow-x: hidden;
	overflow-y: auto;
	background: transparent;
}
div#mobile-menu-wrap nav#menu > .menu-main-menu-container {
	position: relative;
	z-index: 1;
	margin: auto 0;
	width: 100%;
}

/* the Opal logo across the top, in the header bar's band */
.opal-menu__logo {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	flex: none;
	/* centred on the X: script.js measures it as --opal-menu-mid */
	height: calc(var(--opal-menu-mid, 44px) * 2);
	min-height: calc(64px + env(safe-area-inset-top));
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .4s ease, transform .4s ease;
}
.opal-menu__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 52px;
}
html.opal-menu-open .opal-menu__logo {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease .15s, transform .6s cubic-bezier(.2, .8, .2, 1) .15s;
}

/* links: large, centred, rising in one after another */
div#mobile-menu-wrap ul#mobile-menu {
	padding: 24px 0;
	text-align: center;
}
div#mobile-menu-wrap ul#mobile-menu > li {
	margin: 0 0 4px;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(1) { transition-delay: .2s; }
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(2) { transition-delay: .26s; }
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(3) { transition-delay: .32s; }
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(4) { transition-delay: .38s; }
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(5) { transition-delay: .44s; }
html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li:nth-child(6) { transition-delay: .5s; }

#menu div#mobile-menu-wrap ul#mobile-menu a,
div#mobile-menu-wrap nav#menu ul#mobile-menu a {
	color: #0a4058;
	transition: color .2s ease;
}
div#mobile-menu-wrap nav#menu ul#mobile-menu a:hover,
div#mobile-menu-wrap nav#menu ul#mobile-menu a:focus-visible,
div#mobile-menu-wrap nav#menu ul#mobile-menu .current-menu-item > a { color: #00b2b5; }
div#mobile-menu-wrap ul#mobile-menu > li > a {
	display: inline-block;
	min-height: 48px;
	line-height: 48px;
	font-size: 28px;
	font-weight: 500;
	letter-spacing: .06em;
}
/* Projects is a plain link in the burger menu: no + toggle, no dropdown */
div#mobile-menu-wrap ul#mobile-menu > li.menu-item-has-children { padding-left: 0; }
div#mobile-menu-wrap ul#mobile-menu li.menu-item-has-children .submenu-button-wrap,
div#mobile-menu-wrap ul#mobile-menu li.menu-item-has-children > ul.sub-menu { display: none !important; }

/* the logo's two circles, peeking in from the right and bottom edges */
.opal-menu__orb {
	position: absolute;
	z-index: 0;
	border-radius: 50%;
	pointer-events: none;
	transition: transform .4s cubic-bezier(.5, 0, .75, 0);
}
.opal-menu__orb--teal {
	top: 14%;
	right: 0;
	width: min(60vw, 38svh, 360px);
	aspect-ratio: 1;
	background: #00b2b5;
	transform: translateX(100%);
}
.opal-menu__orb--mint {
	bottom: 0;
	left: 6%;
	width: min(72vw, 44svh, 420px);
	aspect-ratio: 1;
	background: #9ce8c6;
	transform: translateY(100%);
}
html.opal-menu-open .opal-menu__orb {
	transition: transform 1s cubic-bezier(.16, 1, .3, 1) .1s;
}
html.opal-menu-open .opal-menu__orb--teal { transform: translateX(62%); }
html.opal-menu-open .opal-menu__orb--mint {
	transform: translateY(64%);
	transition-delay: .22s;
}

@media (min-width: 768px) {
	div#mobile-menu-wrap nav#menu { padding-left: 40px; padding-right: 40px; }
	.opal-menu__logo img { height: 64px; }
	div#mobile-menu-wrap ul#mobile-menu > li > a { font-size: 40px; line-height: 64px; min-height: 64px; }
	div#mobile-menu-wrap ul#mobile-menu .sub-menu a { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.opal-burger__bar,
	div#mobile-menu-wrap,
	html.opal-menu-open div#mobile-menu-wrap,
	.opal-menu__logo,
	html.opal-menu-open .opal-menu__logo,
	div#mobile-menu-wrap ul#mobile-menu > li,
	html.opal-menu-open div#mobile-menu-wrap ul#mobile-menu > li,
	.opal-menu__orb,
	html.opal-menu-open .opal-menu__orb { transition: none; }
}

/* ------------------------------------------------------------
   Projects page (projects.html) — sector photo tiles, then the
   featured clients: Tap & Barrel and the grocery stores.
   Phone first; each block fits one screen at 390×664 and 820×1180.
   ------------------------------------------------------------ */
.opal-pj {
	margin: 0 0 32px;
}

.opal-pj__intro {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.4;
}

.entry-content h2.opal-pj__kicker {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #397c9a;
}

/* sector tiles — the home page's job cards exactly (.opal-jobs-lane above):
   same cards, photo crops, gaps, swipe, chevrons and desktop loop (script.js) */
.entry-content .opal-pj__sectors .opal-jobs__item { margin: 0; }

/* featured client: picture frame + details */
.opal-pj--feature {
	display: grid;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid #dfe8ec;
}

/* until project photos arrive the frame is a navy panel with the logo's
   teal and mint circles; an <img class="opal-pj__photo"> dropped inside
   fills it and the stat sits over the photo */
.opal-pj__media {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 136px;
	margin: 0;
	padding: 16px;
	overflow: hidden;
	background:
		radial-gradient(circle at 90% 18%, #00b2b5 0 20%, transparent 20.3%),
		radial-gradient(circle at 100% 100%, #9ce8c6 0 14%, transparent 14.3%),
		linear-gradient(135deg, #0A4058, #062838);
	color: #fff;
}
.opal-pj__media--grocery {
	background:
		radial-gradient(circle at 74% 0%, #9ce8c6 0 13%, transparent 13.3%),
		radial-gradient(circle at 100% 88%, #00b2b5 0 22%, transparent 22.3%),
		linear-gradient(225deg, #397c9a, #0A4058 70%);
}
.opal-pj__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
}
.opal-pj__media:has(.opal-pj__photo)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(6, 40, 56, .85), rgba(6, 40, 56, 0) 60%);
}

.opal-pj__stat {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: baseline;
	gap: 8px;
	max-width: 70%;
}
.opal-pj__num {
	font-family: Montserrat, sans-serif;
	font-size: 48px;
	font-weight: 700;
	line-height: 1;
}
.opal-pj__unit {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.opal-pj__body {
	min-width: 0;
}
.opal-pj__eyebrow {
	display: block;
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #397c9a;
}
.entry-content h2.opal-pj__title {
	margin: 0 0 8px;
	font-size: clamp(22px, 1.2rem + 1.5vw, 34px);
	line-height: 1.15;
	color: #0A4058;
	overflow-wrap: anywhere;
}
.opal-pj__text {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.4;
}

.opal-pj__places,
.opal-pj__counts,
.opal-pj__stores {
	list-style: none;
	margin: 0;
	padding: 0;
}

.opal-pj__places {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.opal-pj__places li {
	min-width: 0;
	margin: 0;
	padding: 8px 0 0;
	border-top: 2px solid #00b2b5;
	font-size: 14px;
	line-height: 1.3;
}
.opal-pj__places li:first-child {
	grid-column: 1 / -1;
}
.opal-pj__places strong {
	display: block;
	color: #0A4058;
}
.opal-pj__note {
	color: #555;
}

.opal-pj__counts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}
.opal-pj__counts li {
	min-width: 0;
	margin: 0;
	padding: 8px 0 0;
	border-top: 2px solid #00b2b5;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #0A4058;
}
.opal-pj__count-num {
	display: block;
	font-family: Montserrat, sans-serif;
	font-size: 28px;
	line-height: 1.1;
	color: #397c9a;
}

/* store list: one section per brand, every store its own tile */
.opal-pj--stores {
	margin-bottom: 0;
	padding-top: 16px;
	border-top: 1px solid #dfe8ec;
}
.opal-pj--brand {
	padding-top: 24px;
	border-top: 0;
}
.entry-content h3.opal-pj__brand-name {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid #dfe8ec;
	font-size: 18px;
	line-height: 1.2;
	color: #0A4058;
}
.opal-pj__brand-name span {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #397c9a;
	white-space: nowrap;
}
.opal-pj__stores {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}
.opal-pj__store {
	min-width: 0;
	margin: 0;
	padding: 6px 0 0;
	border-top: 2px solid #00b2b5;
	font-size: 14px;
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.opal-pj__store strong {
	display: block;
	color: #0A4058;
}
.opal-pj__store span {
	display: block;
	font-size: 13px;
	color: #555;
}
.opal-pj__also {
	margin: -4px 0 8px;
	font-size: 14px;
	line-height: 1.35;
	color: #555;
}
.opal-pj__cta {
	margin: 24px 0 32px;
}
.entry-content .opal-pj__cta a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 20px;
	background: #397c9a;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease;
}
.entry-content .opal-pj__cta a:hover,
.entry-content .opal-pj__cta a:focus-visible {
	background: #0A4058;
	color: #fff;
}

/* About page reuses the featured-client layout: photo frame + split copy */
.opal-ab .opal-pj__places { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opal-ab .opal-pj__places li:first-child { grid-column: auto; }
.opal-ab .opal-pj__text + .opal-pj__text { margin-top: -4px; }
.opal-ab .opal-pj__counts { margin-top: 4px; }
.opal-ab .opal-pj__media .opal-pj__photo { object-position: 50% 35%; }
/* phone: a photo with no caption can sit lower, so its section keeps to one screen */
@media (max-width: 767px) {
	.opal-ab .opal-pj__media:not(:has(.opal-pj__stat)) { min-height: 120px; }
}

/* condensed copy below desktop */
.opal-pj__long { display: none; }

@media (min-width: 768px) {
	.opal-pj { margin-bottom: 48px; }
	.opal-pj__intro { font-size: 16px; margin-bottom: 24px; }
	.opal-pj__cta { margin-bottom: 48px; }
	.opal-pj--feature,
	.opal-pj--stores { padding-top: 40px; }
	.opal-pj--feature { gap: 24px; }
	.opal-pj__media { min-height: 240px; padding: 24px; }
	.opal-pj__num { font-size: 72px; }
	.opal-pj__unit { font-size: 16px; }
	.opal-pj__text { font-size: 16px; line-height: 1.5; margin-bottom: 16px; }
	.opal-pj__places { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
	.opal-pj__places li,
	.opal-pj__counts li { font-size: 15px; }
	.opal-pj__count-num { font-size: 40px; }
	.opal-pj--stores { margin-bottom: 0; }
	.opal-pj--brand { padding-top: 32px; }
	.entry-content h3.opal-pj__brand-name { font-size: 22px; margin-bottom: 12px; }
	.opal-pj__stores { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
	.opal-pj__store { padding-top: 8px; font-size: 15px; }
	.opal-pj__store span { font-size: 14px; }
}

@media (min-width: 1024px) {
	.opal-pj__long { display: inline; }
	.opal-pj__short { display: none; }
	.opal-pj--feature {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		align-items: center;
		gap: 48px;
	}
	.opal-pj--flip .opal-pj__media { order: 2; }
	.opal-pj__media { min-height: 380px; padding: 32px; }
	.opal-pj__num { font-size: 96px; }
	.opal-pj__stores { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 20px; }
}

/* Every inner page: the same floating header card as the home page (the bar stays
   in the flow here, there is no hero photo under it). */
body:not(.home) div#site-branding-sticky-wrap {
	margin: 8px 8px 0;
	border: 1px solid #e6e6e6;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
body:not(.home) #site-branding-sticky-wrap-sticky-wrapper #site-branding-sticky-wrap {
	left: 8px;
	right: 8px;
	width: auto !important;
	margin-left: 0;
	margin-right: 0;
	animation-fill-mode: none;
}
@media (min-width: 768px) {
	body:not(.home) div#site-branding-sticky-wrap { margin: 16px 16px 0; }
	body:not(.home) #site-branding-sticky-wrap-sticky-wrapper #site-branding-sticky-wrap { left: 16px; right: 16px; }
}
body:not(.home) .mobile-trigger-wrap #mobile-menu-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
}
@media (max-width: 767px) {
	body:not(.home) header#masthead,
	body:not(.home) #site-branding,
	body:not(.home) #site-branding-sticky-wrap-sticky-wrapper,
	body:not(.home) #site-branding-sticky-wrap-sticky-wrapper #site-branding-sticky-wrap {
		height: 72px !important;
		min-height: 72px !important;
	}
	body:not(.home) #site-branding img { max-height: 52px; }
}

/* Footer: Privacy Policy link on the line under the copyright */
.site-footer .site-info .site-info__privacy + a {
	margin-left: 16px;
}

/* ------------------------------------------------------------
   Privacy policy (privacy-policy.html): one readable column,
   each question a short ruled block
   ------------------------------------------------------------ */
.opal-legal {
	max-width: 720px;
	margin: 0 auto;
	padding: 16px 0 32px;
}
.opal-legal .entry-content p,
.opal-legal .entry-content li {
	margin: 0 0 8px;
	font-size: 15px;
	line-height: 1.5;
}
.opal-legal .entry-content p.opal-legal__date {
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	color: #397c9a;
}
.opal-legal .entry-content p.opal-legal__lead {
	font-size: 16px;
}
.opal-legal__part {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e6e6e6;
}
.opal-legal .entry-content h2 {
	margin: 0 0 8px;
	font-size: clamp(20px, 1.1rem + .8vw, 26px);
	line-height: 1.2;
	color: #0A4058;
	overflow-wrap: anywhere;
}
.opal-legal .entry-content ul {
	margin: 0;
	padding-left: 20px;
}
/* links inside sentences need their underline (the theme strips it with !important) */
.opal-legal .entry-content a {
	color: #0A4058;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}
.opal-legal__card {
	margin: 0 0 12px;
	padding: 12px 16px;
	border-left: 3px solid #397c9a;
	background: #f3f7f9;
	font-style: normal;
	font-size: 15px;
	line-height: 1.5;
}
/* phone: links grow to a full touch target without opening up the lines around them */
@media (max-width: 767px) {
	.opal-legal .entry-content p a {
		display: inline-block;
		padding: 12px 0;
		margin: -12px 0;
	}
	.opal-legal__card a {
		display: inline-flex;
		align-items: center;
		min-height: 48px;
	}
}
@media (min-width: 768px) {
	.opal-legal { padding: 24px 0 48px; }
	.opal-legal .entry-content p,
	.opal-legal .entry-content li { font-size: 16px; }
	.opal-legal .entry-content p.opal-legal__lead { font-size: 18px; }
	.opal-legal__part { margin-top: 24px; padding-top: 24px; }
	.opal-legal__card { padding: 16px 24px; font-size: 16px; }
}

/* Contact copy — the About page's type: teal eyebrow over a navy Montserrat
   line, 15/16px text, teal links, and the same 2px teal rule over each office.
   Phone: the head office runs full width and the other two sit side by side;
   three across from tablet up. */
.opal-ct__lead { margin: 0 0 24px; }
.entry-content p.opal-ct__email { margin: 0; }
.entry-content .opal-ct__email a {
	font-family: Montserrat, sans-serif;
	font-size: clamp(22px, 1.2rem + 1.5vw, 34px);
	font-weight: 500;
	line-height: 1.15;
	color: #0A4058;
	text-decoration: none !important;
	overflow-wrap: anywhere;
	transition: color .2s ease;
}
.entry-content .opal-ct__email a:hover,
.entry-content .opal-ct__email a:focus-visible { color: #397c9a; }

.entry-content .opal-ct__offices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 12px;
	margin: 0;
}
.entry-content .opal-ct__office {
	min-width: 0;
	padding-top: 8px;
	border-top: 2px solid #00b2b5;
}
.entry-content .opal-ct__office:first-child { grid-column: 1 / -1; }
/* "Other offices" under the map: Langley and Okanagan side by side */
.opal-ct__others { margin: 0 0 24px; }
.entry-content .opal-ct__offices--others .opal-ct__office:first-child { grid-column: auto; }
.entry-content .opal-ct__office p {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
}
.entry-content .opal-ct__office strong {
	font-family: Montserrat, sans-serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	color: #0A4058;
}
.opal-ct__tel {
	display: block;
	color: #555;
}
.entry-content .opal-ct__office a {
	font-weight: 700;
	color: #397c9a;
	white-space: nowrap;
	transition: color .2s ease;
}
.entry-content .opal-ct__office a:hover,
.entry-content .opal-ct__office a:focus-visible { color: #0A4058; }

.entry-content p.opal-ct__note {
	font-size: 15px;
	line-height: 1.4;
}
.opal-ct__note strong { color: #0A4058; }
.entry-content .opal-ct__note a {
	font-weight: 700;
	text-decoration: underline 2px #00b2b5 !important;
	text-underline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
	.entry-content .opal-ct__email a,
	.entry-content .opal-ct__office a { transition: none; }
}

/* phone: the email grows to a full touch target and each number becomes a
   ruled 48px row, label left, number right */
@media (max-width: 767px) {
	.entry-content .opal-ct__email a {
		display: inline-block;
		padding: 12px 0;
		margin: -12px 0;
	}
	.opal-ct__tel {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
		min-height: 48px;
		border-top: 1px solid #dfe8ec;
	}
	.opal-ct__tel:first-of-type { margin-top: 4px; }
	.entry-content .opal-ct__tel a {
		display: flex;
		align-items: center;
		align-self: stretch;
	}
}
@media (min-width: 768px) {
	.entry-content .opal-ct__offices {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}
	.entry-content .opal-ct__office { padding-top: 12px; }
	.entry-content .opal-ct__office:first-child { grid-column: auto; }
	.entry-content .opal-ct__office p,
	.entry-content p.opal-ct__note {
		font-size: 16px;
		line-height: 1.5;
	}
	.entry-content .opal-ct__office strong { font-size: 19px; }
}
@media (min-width: 1024px) {
	.opal-ct__lead { margin-bottom: 32px; }
	.entry-content .opal-ct__offices { gap: 48px; }
	.entry-content .opal-ct__office strong { font-size: 22px; }
}

/* Contact map —the Google map re-skinned in the site's teal and navy on the
   page's own white, full-bleed like the home philosophy band, a drawing title
   strip beneath it. The embed takes no map style, so the skin is a filter and
   two blend layers: the map goes grey and its contrast is pulled hard (the
   ground clips to white, streets and footprints settle into light greys,
   labels go black), a turquoise colour layer at a little over a quarter
   strength tints the greys (any stronger and the pale ones clip to cyan), and
   a navy screen lifts the black labels and pin to navy, leaving white white. The view's own ground is white too, so before the map has
   loaded, and round the 3D model intro (script.js, on the canvas above the
   map, which the script hides only while it plays), it is simply the page.
   The map reaches --bleed past the text column (to the screen's edge on a
   phone, 50px out on wider screens) and its top and sides fade into the page
   (--fade-x, --fade-t); the bottom stays crisp on the title strip so Google's
   attribution stays legible. Google's place card sits in the top-left corner,
   so both fades leave a soft-edged patch round it (--card-w × --card-h) at
   full strength and the card reads crisp; the strip carries the same two
   links. The view's height sets the map's zoom (script.js reads the same
   rule): 280, 340 and 360px all open at zoom 17 (anything from 272 to 542px
   does). */
.opal-map {
	--map-h: 280px;
	--fade-x: 24px;
	--fade-t: 28px;
	--card-w: 168px;
	--card-h: 68px;
	/* the place card's patch: two soft bands, intersected in the masks below */
	--card-x: linear-gradient(to right, #000 var(--card-w), transparent calc(var(--card-w) + 16px));
	--card-y: linear-gradient(to bottom, #000 var(--card-h), transparent calc(var(--card-h) + 16px));
	position: relative;
	margin: 24px max(calc(50% - 50cqw), -50px);
	background: #fff;
}
.opal-map__view {
	position: relative;
	height: var(--map-h);
	overflow: hidden;
	isolation: isolate;
	background: #fff;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent), var(--card-x), var(--card-y);
	mask-image: linear-gradient(to right, transparent, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent), var(--card-x), var(--card-y);
	-webkit-mask-composite: source-over, source-in;
	mask-composite: add, intersect;
}
.entry-content .opal-map__frame {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
	filter: grayscale(1) brightness(.648) contrast(4.23);
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-t)), var(--card-x), var(--card-y);
	mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-t)), var(--card-x), var(--card-y);
	-webkit-mask-composite: source-over, source-in;
	mask-composite: add, intersect;
}
.opal-map__view::before,
.opal-map__view::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}
.opal-map__view::before {
	background: #4fafb3;
	mix-blend-mode: color;
	opacity: .28;
}
.opal-map__view::after {
	background: #0a4058;
	mix-blend-mode: screen;
}
.opal-map__model {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: none;
	width: 100%;
	height: 100%;
	/* mist at the drawing's edges; script opens it (--fog 0 → 1) as the camera comes down onto the map */
	-webkit-mask-image: radial-gradient(calc(60% + var(--fog, 0) * 250%) calc(80% + var(--fog, 0) * 250%) at 50% 50%, #000 50%, transparent);
	mask-image: radial-gradient(calc(60% + var(--fog, 0) * 250%) calc(80% + var(--fog, 0) * 250%) at 50% 50%, #000 50%, transparent);
}
.opal-map.is-modelling .opal-map__model { display: block; cursor: pointer; }
.opal-map.is-modelling .opal-map__frame { opacity: 0; }
.opal-map.is-mapped .opal-map__frame {
	opacity: 1;
	transition: opacity 1s ease;
}
.opal-map.is-mapped .opal-map__model {
	opacity: 0;
	transition: opacity 1s ease;
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.opal-map .opal-map__model { display: none; }
	.opal-map .opal-map__frame { opacity: 1; transition: none; }
}

/* title strip, as on the home plan's drawing: firm, sheet, address, then the
   map links; its rule fades out at the ends with the map's sides */
.entry-content .opal-map__title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	padding: 8px 16px 12px;
	background: linear-gradient(to right, transparent, rgba(57, 124, 154, .3) var(--fade-x), rgba(57, 124, 154, .3) calc(100% - var(--fade-x)), transparent) top / 100% 1px no-repeat;
	font-family: Montserrat, sans-serif;
	font-size: 11px;
	line-height: 1.3;
	letter-spacing: .6px;
	text-transform: uppercase;
}
.opal-map__firm {
	flex-basis: 100%;
	color: #397c9a;
	font-weight: 600;
}
.opal-map__sheet {
	color: #0a4058;
	font-weight: 700;
	font-size: 12px;
}
.opal-map__addr {
	margin-left: auto;
	color: #397c9a;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}
.opal-map__links {
	display: flex;
	flex-basis: 100%;
	gap: 24px;
}
.entry-content .opal-map__links a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	color: #0a4058;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: #4fafb3;
	text-underline-offset: 4px;
}
.entry-content .opal-map__links a:hover { color: #397c9a; }

/* phone: the Team page link under the map grows to a full touch target */
@media (max-width: 767px) {
	.entry-content [data-mb="a-6dd9m"] {
		display: inline-block;
		padding: 12px 0;
		margin: -12px 0;
	}
}

/* phone: the Restaurants page's awards link likewise, without opening up its lines */
@media (max-width: 767px) {
	.entry-content [data-mb="a-6dm2j"] {
		display: inline-block;
		padding: 14px 0;
		margin: -14px 0;
	}
}

@media (min-width: 768px) {
	.opal-map {
		--map-h: 340px;
		--fade-x: 56px;
		--fade-t: 40px;
		--card-w: 270px;
		--card-h: 120px;
		margin-block: 32px;
	}
	/* strip text lines up with the page's column */
	.entry-content .opal-map__title { padding: 12px 50px 16px; }
	.opal-map__links {
		flex-basis: auto;
		margin-left: 8px;
	}
	/* still a 48px touch target, without opening up the strip */
	.entry-content .opal-map__links a {
		min-height: 0;
		padding: 17px 0;
		margin: -17px 0;
	}
}
@media (min-width: 1024px) {
	.opal-map {
		--map-h: 360px;
		--fade-x: 110px;
		--fade-t: 48px;
	}
}

/* ------------------------------------------------------------
   Pull to refresh — touch screens. The page no longer slides down
   with the finger and the browser's own reload pull is off; instead
   script.js draws a pinwheel of ten slanted blades out from under the
   nav bar. A teal highlight runs round it — each blade straightens up
   as the highlight reaches it, then leans back through blue to mint
   as it passes. The pull itself drives the highlight; let go past the
   mark and it keeps going round, slowly, while the page reloads.
   ------------------------------------------------------------ */
html { overscroll-behavior-y: none; }

.opal-ptr {
	position: fixed;
	top: 0;
	left: 50%;
	z-index: 998; /* just under the bar (999), so it slides out from beneath it */
	width: 52px;
	height: 52px;
	margin-left: -26px;
	pointer-events: none;
	opacity: var(--ptr-o, 0);
	visibility: hidden;
	transform: translate3d(0, var(--ptr-y, -60px), 0);
	transition: transform .34s cubic-bezier(.2, .7, .2, 1), opacity .24s ease, visibility 0s linear .34s;
	will-change: transform, opacity;
}
.opal-ptr.is-shown { visibility: visible; transition-delay: 0s; }
.opal-ptr.is-pulling { transition: visibility 0s; }
.opal-ptr__wheel {
	position: relative;
	width: 100%;
	height: 100%;
	transform: scale(var(--ptr-s, .6));
	transition: transform .18s ease-out;
	/* a soft edge so the pale blades still read over the home photo */
	filter: drop-shadow(0 1px 1.5px rgba(6, 40, 56, .3));
}
.opal-ptr__arm {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	transform: rotate(var(--ptr-a, 0deg));
}
.opal-ptr__blade {
	position: absolute;
	top: -24px;
	left: -3px;
	width: 6px;
	height: 13px;
	border-radius: 1px;
	/* one lap of the highlight; script.js holds it paused on the frame
	   the pull has reached, then lets it run while the page reloads */
	animation: opal-ptr-blade 2s linear infinite paused;
}
.opal-ptr.is-loading .opal-ptr__blade { animation-play-state: running; }

/* a blade's lap: lifted upright and teal as the highlight reaches it
   (10%), leaning back through blue (40%) to rest as mint (70%) */
@keyframes opal-ptr-blade {
	0%, 70%, 100% { background: #9ce8c6; opacity: .85; transform: rotate(34deg) skewX(-16deg); }
	10% { background: #00b2b5; opacity: 1; transform: rotate(0deg) skewX(-16deg); }
	40% { background: #397c9a; opacity: .9; transform: rotate(17deg) skewX(-16deg); }
}

@media (prefers-reduced-motion: reduce) {
	.opal-ptr,
	.opal-ptr__wheel { transition: none; }
	/* the blades stay as the pull left them */
	.opal-ptr.is-loading .opal-ptr__blade { animation-play-state: paused; }
}
