/* Minimal modern reset */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure {
	margin: 0;
}

html,
body {
	height: 100%;
}

body {
	background: var(--color-bg);
	color: var(--color-fg);
	font-family: var(--font-body);
	font-size: var(--size-body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
picture,
video {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.015em;
}

/* ---- Editorial rich text ----

   Wrappers whose contents come from a WYSIWYG field using the "BannerJoy Copy"
   toolbar. The reset above strips link and list styling site-wide — correct for
   navigation and for the theme's own composed lists, which supply their own —
   but it leaves editor-written prose with invisible links and bullet-less
   lists. This puts back exactly what that toolbar can produce (bold, italic,
   link, bulleted and numbered lists) and nothing else, so the reset keeps doing
   its job everywhere else.

   Typography deliberately stays on the wrapper and is never moved onto a child
   <p>. A value that has never been through the editor arrives as a bare string
   with no <p> around it — the hard-coded CTA fallback in
   bannerjoy_get_resolved_cta() is exactly that — and has to look identical to
   one that has. Only spacing and the formatting marks live here.

   Link treatment matches .privacy-page__body, which is the site's existing
   prose-link convention rather than a new one. */
.service-hero__statement p + p,
.service-hero__statement ul + p,
.service-hero__statement ol + p,
.service-section__copy p + p,
.service-section__copy ul + p,
.service-section__copy ol + p,
.service-process__desc p + p,
.service-process__desc ul + p,
.service-process__desc ol + p,
.service-reasons__desc p + p,
.service-reasons__desc ul + p,
.service-reasons__desc ol + p,
.final-cta__copy p + p,
.final-cta__copy ul + p,
.final-cta__copy ol + p {
	margin-top: var(--space-sm);
}

.service-hero__statement strong,
.service-section__copy strong,
.service-process__desc strong,
.service-reasons__desc strong,
.final-cta__copy strong {
	font-weight: 700;
}

.service-hero__statement em,
.service-section__copy em,
.service-process__desc em,
.service-reasons__desc em,
.final-cta__copy em {
	font-style: italic;
}

.service-hero__statement a,
.service-section__copy a,
.service-process__desc a,
.service-reasons__desc a,
.final-cta__copy a {
	color: var(--color-fg);
	border-bottom: 1px solid var(--color-accent);
	padding-bottom: 0.05em;
	transition: color var(--duration-fast) var(--ease-out);
	overflow-wrap: anywhere;
}

.service-hero__statement a:hover,
.service-hero__statement a:focus-visible,
.service-section__copy a:hover,
.service-section__copy a:focus-visible,
.service-process__desc a:hover,
.service-process__desc a:focus-visible,
.service-reasons__desc a:hover,
.service-reasons__desc a:focus-visible,
.final-cta__copy a:hover,
.final-cta__copy a:focus-visible {
	color: var(--color-accent);
}

.service-hero__statement ul,
.service-hero__statement ol,
.service-section__copy ul,
.service-section__copy ol,
.service-process__desc ul,
.service-process__desc ol,
.service-reasons__desc ul,
.service-reasons__desc ol,
.final-cta__copy ul,
.final-cta__copy ol {
	margin: var(--space-sm) 0 0;
	padding-left: 1.25em;
}

.service-hero__statement ul,
.service-section__copy ul,
.service-process__desc ul,
.service-reasons__desc ul,
.final-cta__copy ul {
	list-style: disc;
}

.service-hero__statement ol,
.service-section__copy ol,
.service-process__desc ol,
.service-reasons__desc ol,
.final-cta__copy ol {
	list-style: decimal;
}

.service-hero__statement li + li,
.service-section__copy li + li,
.service-process__desc li + li,
.service-reasons__desc li + li,
.final-cta__copy li + li {
	margin-top: var(--space-2xs);
}

/* Visible, accessible focus state throughout */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 4px;
}

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

.container {
	width: 100%;
	max-width: var(--content-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Skip link */
.skip-link {
	position: fixed;
	top: -100px;
	left: var(--space-xs);
	z-index: 1000;
	background: var(--color-fg);
	color: var(--color-bg);
	padding: var(--space-2xs) var(--space-sm);
	border-radius: var(--radius-sm);
	transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
	top: var(--space-xs);
}

/* ---------------------------------------------------------------------------
   Scroll reveal — assets/js/main.js, "Scroll reveal".

   Calm and once only: a content block fades in from 12px below over 500ms as
   it enters the viewport; a thin divider draws left to right. Page titles,
   heroes and section headings never move.

   Nothing here hides anything on its own. The hidden states belong to classes
   the script adds — only to blocks below the fold, only once it has an
   observer to reveal them, and never under reduced motion — so content is
   visible whenever JavaScript or animation is unavailable. The script removes
   the classes again once a reveal has played, so hover transitions and
   layouts are back to exactly what they were.

   Movement uses the `translate` property, not `transform`, so it composes with
   any transform a block already owns (hover nudges, tilts) instead of
   replacing it. `.reveal` in the templates no longer animates anything by
   itself: only the blocks listed in main.js move, so a section's heading and
   intro always stay still.
   --------------------------------------------------------------------------- */

:root {
	--reveal-duration: 500ms;
	--reveal-line-duration: 700ms;
	--reveal-distance: 12px;
	--reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* `!important` because these classes live only for the length of one reveal
   and must win over the component's own rules while they do: a card, a pill
   button or a panel declares its own `transition` (for its hover) in a
   stylesheet that loads after this one, and without it the block would
   simply snap into view. The block's own transitions are not lost: main.js
   reads them first into --reveal-own-transition and they run alongside the
   fade, so a hover mid-reveal eases exactly as it always does. The classes
   are removed as soon as the reveal has played. */
.reveal-item {
	opacity: 0 !important;
	translate: 0 var(--reveal-distance) !important;
	transition: var(--reveal-own-transition, opacity 0s),
		opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms),
		translate var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms) !important;
}

.reveal-item.is-revealed {
	opacity: 1 !important;
	translate: 0 0 !important;
}

/* A divider: the element's own top (or bottom) border is hidden while a
   pseudo-element of the same colour and weight draws over exactly where it
   sits. Swapped back to the real border when the line has finished. */
.reveal-line--top {
	border-top-color: transparent !important;
}

.reveal-line--bottom {
	border-bottom-color: transparent !important;
}

.reveal-line--before::before,
.reveal-line--after::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: var(--reveal-line-width, 1px);
	background: var(--reveal-line-color, currentColor);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--reveal-line-duration) var(--reveal-ease) var(--reveal-delay, 0ms);
	pointer-events: none;
}

.reveal-line--top.reveal-line--before::before,
.reveal-line--top.reveal-line--after::after {
	top: calc(-1 * var(--reveal-line-width, 1px));
}

.reveal-line--bottom.reveal-line--before::before,
.reveal-line--bottom.reveal-line--after::after {
	bottom: calc(-1 * var(--reveal-line-width, 1px));
}

.reveal-line.is-revealed::before,
.reveal-line.is-revealed::after {
	transform: scaleX(1);
}

/* Revealed at once — reached by keyboard focus or an anchor link. */
/* Focus or an anchor: no transition at all for one frame, which also cancels
   a fade already running, then main.js removes the reveal classes so the
   block's own transitions are back straight away. */
.reveal-item.reveal-instant {
	transition: none !important;
}

.reveal-line.reveal-instant::before,
.reveal-line.reveal-instant::after {
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.reveal-item {
		opacity: 1 !important;
		translate: none !important;
		transition: none !important;
	}

	.reveal-line--before::before,
	.reveal-line--after::after {
		transform: none;
		transition: none;
	}
}

@media print {
	.reveal-item {
		opacity: 1 !important;
		translate: none !important;
	}
}

/* ---------------------------------------------------------------------------
   Micro-parallax: depth, not drift.

   Opt-in only. An element participates by carrying [data-parallax]; there are
   no broad descendant selectors, so nothing moves by accident.

   Every target was chosen because it does NOT already own `transform`. The
   reveal system, the showcase items, the ad-frame scale and every hover
   transition keep sole ownership of theirs — this system never composes with
   another transform on the same element.

   The whole thing is gated on `.has-parallax`, which only PHP adds, so with the
   setting off these rules cannot match and the custom property is never read.
   --------------------------------------------------------------------------- */

.has-parallax [data-parallax] {
	transform: translate3d(0, var(--parallax-y, 0px), 0);
	will-change: transform;
}

/* Media layers sit at inset:0 and are clipped by their container's existing
   overflow:hidden. Translating them would expose a strip of background at one
   edge, so under parallax they are over-drawn past the clip by more than the
   maximum travel. Absolutely positioned, so this changes no layout. */
.has-parallax .project-hero__media[data-parallax] {
	top: -16px;
	bottom: -16px;
}

/* Below the tablet breakpoint the engine never initialises, so the property is
   never written; this simply guarantees the resting position even if a stale
   value survived a resize. */
@media (max-width: 768px) {
	.has-parallax [data-parallax] {
		transform: none;
		will-change: auto;
	}

	.has-parallax .project-hero__media[data-parallax] {
		top: 0;
		bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.has-parallax [data-parallax] {
		transform: none;
		will-change: auto;
	}

	.has-parallax .project-hero__media[data-parallax] {
		top: 0;
		bottom: 0;
	}
}
