/* ==========================================================================
   Markslag — main stylesheet
   Built on the 1600px Figma frame (container 1360, gutter 120). Sizes scale with
   clamp(min, px/1600*100vw, max). Breakpoints: 1199 / 767 / 480.
   Order: tokens → base → utilities → components → layout → sections → templates → forms → motion → responsive
   ========================================================================== */

/* ---------- Tokens (Figma colours; no variables in the file) ---------- */
:root {
	--blueprint-opacity: 0.06; /* visibility of the blueprint drawing, everywhere */
	--red: #ae3133;
	--red-dark: #8f2729;
	--blue: #3f479a;
	--blue-light: #8c91c2; /* #3F479A at 60% on white */
	--blue-tip: rgba(63, 71, 154, 0.9);
	--grey: #ededed;
	--field: #f7f7f7; /* #D9D9D9 at 20% on white */
	--ink: #000;
	--ink-soft: #313131;
	--dark: #202e31;
	--white: #fff;
	--line: rgba(0, 0, 0, 0.3);

	--font: "alfabet", "Helvetica Neue", Arial, sans-serif;

	--gutter: clamp(20px, 7.5vw, 120px);
	--container: 1360px;
	--container-text: 1200px;

	--sp-140: clamp(72px, 8.75vw, 140px);
	--sp-120: clamp(64px, 7.5vw, 120px);
	--sp-100: clamp(56px, 6.25vw, 100px);
	--sp-80: clamp(44px, 5vw, 80px);
	--sp-60: clamp(36px, 3.75vw, 60px);
	--sp-40: clamp(24px, 2.5vw, 40px);
	--sp-30: clamp(20px, 1.875vw, 30px);
	/* Slider cards (projects, photos, examples): one size system for the whole site. Landscape 3:2 as in the design. */
	--slide-w: clamp(260px, 28.125vw, 450px);
	--slide-ratio: 3 / 2;
	--slide-h: calc(var(--slide-w) * 2 / 3);
	--slide-pad: clamp(18px, 2.5vw, 40px);
	--slide-title: clamp(20px, 1.875vw, 30px);

	--fs-hero: clamp(38px, 4.0625vw, 65px);
	--fs-h1: clamp(34px, 3.4375vw, 55px);
	--fs-h2: clamp(30px, 3.125vw, 50px);
	--fs-big: clamp(26px, 2.8125vw, 45px);
	--fs-h3: clamp(22px, 1.875vw, 30px);
	--fs-h4: clamp(20px, 1.5vw, 24px);
	--fs-body: clamp(16px, 1.125vw, 18px);
	--fs-lead: clamp(17px, 1.25vw, 20px);

	--radius: 5px;
	--radius-lg: 10px;
	--header-h: 140px;
	--ease: cubic-bezier(0.215, 0.61, 0.355, 1); /* power2.out-ish */
	--dur: 0.3s;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scrollbar-gutter: stable;
	background: var(--white);
	overflow-x: hidden; /* safety net: nothing may widen the page on phones (iOS ignores clip on body) */
	overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
	margin: 0;
	font-family: var(--font);
	font-weight: 500;
	font-size: var(--fs-body);
	line-height: 1.333;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
img, video { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; } /* images can't be selected or dragged */
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
strong, b { font-weight: 700; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link {
	position: fixed; z-index: 1000; left: 16px; top: -60px;
	padding: 12px 18px; border-radius: var(--radius);
	background: var(--blue); color: var(--white);
	font-weight: 600; text-decoration: none;
	transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Typography ---------- */
.h1, .h2, .h3, .h4 { font-weight: 800; letter-spacing: 0; }
.h1 { font-size: var(--fs-h1); line-height: 1.091; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; }
.h3 { font-size: var(--fs-h3); line-height: 1.167; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; font-weight: 700; }
.eyebrow {
	font-size: var(--fs-lead);
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--dark);
}
.u-red { color: var(--red); }

.rich p + p, .rich p + ul, .rich ul + p { margin-top: 1.333em; }
.rich ul { padding-left: 1.2em; }
.rich a { text-decoration: underline; text-underline-offset: 2px; }
.rich--bullets ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.rich--bullets li { position: relative; padding-left: 30px; font-weight: 600; font-size: clamp(15px, 1.0625vw, 17px); line-height: 1.2; }
.rich--bullets li::before {
	content: ""; position: absolute; left: 0; top: -1px;
	width: 20px; height: 20px; border-radius: 4px; background: var(--red);
}

.text-link {
	font-size: var(--fs-lead);
	line-height: 1;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1.5px;
	transition: color var(--dur) var(--ease);
}
.text-link:hover { color: var(--red); }

/* ---------- Components ---------- */
/* Button (Osmo button 084): on hover a second layer slides up over the label, which shrinks a little. */
.button {
	--btn-bg: var(--red); --btn-color: var(--white);
	--btn-hover-bg: var(--red-dark); --btn-hover-color: var(--white);
	--btn-pad: 25px;
	--btn-ease: cubic-bezier(0.32, 0.72, 0, 1);
	position: relative; display: inline-grid;
	min-height: 60px; padding: 0;
	border: 0; border-radius: var(--radius);
	background: transparent; color: var(--btn-color);
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1;
	text-decoration: none; white-space: nowrap; cursor: pointer;
	-webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
	transition: transform var(--dur) var(--ease);
}
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.button__container { display: grid; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; overflow: clip; }
.button__hover,
.button__default {
	grid-area: 1 / 1; display: flex; align-items: center; justify-content: center;
	padding: 0 var(--btn-pad); border-radius: inherit;
}
.button__default {
	background: var(--btn-bg); color: var(--btn-color);
	transform-origin: 50% 95%;
	transition: scale 0.35s var(--btn-ease);
}
.button__hover {
	z-index: 1; background: var(--btn-hover-bg); color: var(--btn-hover-color);
	translate: 0 101%;
	transition: translate 0.45s var(--btn-ease);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.button:is(:hover, :focus-visible) .button__hover { translate: 0 0; transition-delay: 0.05s; }
	.button:is(:hover, :focus-visible) .button__default { scale: 0.9; transition-delay: 0.05s; }
}
.button--blue { --btn-bg: var(--blue); --btn-hover-bg: #333a80; }
.button--white { --btn-bg: var(--white); --btn-color: var(--red); --btn-hover-bg: var(--grey); --btn-hover-color: var(--red); }
.button-row { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }

.pill, .label {
	display: inline-flex; align-items: center; justify-content: center;
	height: 42px; padding: 0 25px;
	border: 0; border-radius: var(--radius);
	font-size: 11px; font-weight: 600; letter-spacing: 0.2em; line-height: 1;
	text-transform: uppercase; text-decoration: none; white-space: nowrap;
	color: var(--white);
}
.label { background: var(--red); }
.pill {
	background: var(--blue-light); cursor: pointer;
	transition: background-color var(--dur) var(--ease);
}
.pill:hover { background: #7a80b8; }
.pill.is-active, .pill[aria-pressed="true"] { background: var(--blue); }

.round-button {
	display: grid; place-items: center;
	width: 50px; height: 50px; padding: 0;
	border: 0; border-radius: 50%;
	background: var(--red); color: var(--white); cursor: pointer;
	transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.round-button:hover { background: var(--red-dark); transform: scale(1.06); }
.round-button .icon { width: 14px; height: 15px; }
.round-button .icon--play { margin-left: 3px; }

.social-button {
	display: grid; place-items: center;
	width: 50px; height: 50px; border-radius: var(--radius);
	background: var(--red); color: var(--white);
	transition: background-color var(--dur) var(--ease);
}
.social-button:hover { background: var(--red-dark); }
.social-button .icon { width: 20px; height: 20px; }

.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--text { width: min(100% - 2 * var(--gutter), var(--container-text)); }
.container--wide { width: min(100% - 2 * var(--gutter), 1240px); }
.section { margin-top: var(--sp-140); }
.main > :last-child { margin-bottom: var(--sp-140); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(28px, 2.8125vw, 45px); }
.section-head--center { justify-content: center; text-align: center; }
.section-head__link { margin-left: auto; transform: translateY(-4px); }

/* ---------- Header ---------- */
.header {
	position: absolute; z-index: 50; inset: 0 0 auto;
	padding-top: 40px;
	color: var(--white);
}
.menu-open .header { position: fixed; }
.admin-bar .header { top: 32px; }
.header__inner { display: flex; align-items: center; gap: 40px; min-height: 60px; }
.header__logo { flex: none; display: block; margin-left: 4px; }
.header__logo img { width: 234px; height: auto; filter: brightness(0) invert(1); }
.header__nav { flex: 1; display: flex; justify-content: center; }
.header__cta { flex: none; min-height: 60px; --btn-pad: 30px; }
.header__toggle { display: none; }

.nav__list { display: flex; gap: 50px; }
.nav__item { position: relative; }
.nav__link {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 0;
	font-size: 20px; line-height: 1.2; text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size var(--dur) var(--ease);
}
.nav__link:hover, .nav__item--current > .nav__link { background-size: 100% 2px; }
.nav__caret { width: 10px; height: 6px; transition: transform var(--dur) var(--ease); }
.nav__item--has-children:hover .nav__caret,
.nav__item--has-children.is-open .nav__caret { transform: rotate(180deg); }
.nav__submenu {
	position: absolute; top: 100%; left: 50%;
	min-width: 270px; padding: 12px;
	border-radius: var(--radius-lg);
	background: var(--white); color: var(--ink);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
	opacity: 0; visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav__submenu::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }
.nav__item--has-children:hover > .nav__submenu,
.nav__item--has-children.is-open > .nav__submenu,
.nav__item--has-children:focus-within > .nav__submenu { opacity: 1; visibility: visible; transform: translate(-50%, 12px); }
.nav__sublink {
	display: block; padding: 11px 14px; border-radius: var(--radius);
	font-size: 17px; text-decoration: none; white-space: nowrap;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__sublink:hover, .nav__subitem.nav__item--current .nav__sublink { background: var(--grey); color: var(--red); }

/* Mobile menu: full-height red panel. Big main items, services always visible as pills, contact at the bottom. */
.mobile-menu {
	position: fixed; z-index: 45; inset: 0;
	display: flex;
	padding-top: calc(var(--header-mobile, 96px) + clamp(12px, 3dvh, 32px));
	background: var(--red); color: var(--white);
	clip-path: inset(0 0 100% 0);
	transition: clip-path 0.5s var(--ease);
	overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu__inner {
	display: flex; flex-direction: column; justify-content: space-between; gap: clamp(20px, 4dvh, 40px);
	min-height: 100%; padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.mobile-nav__list { display: grid; gap: clamp(2px, 1dvh, 10px); }
.mobile-nav__link {
	display: inline-flex; align-items: center; gap: 14px;
	font-size: clamp(28px, min(5.4dvh, 10.5vw), 46px); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em;
	white-space: nowrap; text-decoration: none;
}
.mobile-nav__item--current > .mobile-nav__link::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--white); }
.mobile-nav__caret { display: none; }
.mobile-nav__submenu { display: flex; flex-wrap: wrap; gap: 8px; margin: clamp(8px, 1.5dvh, 14px) 0 clamp(4px, 1dvh, 10px); }
.mobile-nav__sublink {
	display: inline-flex; align-items: center;
	height: clamp(32px, 4.6dvh, 42px); padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, 0.45); border-radius: var(--radius);
	font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mobile-nav__sublink:hover, .mobile-nav__subitem.mobile-nav__item--current .mobile-nav__sublink { background: var(--white); border-color: var(--white); color: var(--red); }
.mobile-menu__bottom { display: grid; gap: 16px; padding-top: clamp(16px, 2.5dvh, 24px); border-top: 1px solid rgba(255, 255, 255, 0.25); }
.mobile-menu .contact-list { margin: 0; gap: 6px; }
.mobile-menu .contact-list li:nth-child(3) { display: none; } /* address: in the footer, not needed here */
.mobile-menu__cta { width: 100%; --btn-bg: var(--white); --btn-color: var(--red); --btn-hover-bg: var(--grey); --btn-hover-color: var(--red); }
@media (max-height: 700px) {
	.mobile-menu .contact-list { display: none; }
	.mobile-menu__bottom { border-top: 0; padding-top: 0; }
}
.mobile-menu [data-stagger] { opacity: 0; transform: translateY(16px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.mobile-menu.is-open [data-stagger] { opacity: 1; transform: none; }

/* ---------- Hero (home) ---------- */
.hero {
	position: relative; isolation: isolate;
	min-height: clamp(560px, 43.75vw, 700px);
	display: flex; align-items: flex-end;
	padding-bottom: clamp(56px, 4.75vw, 76px);
	color: var(--white); background: #3a1112;
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(174, 49, 51, 0.7) 0%, rgba(174, 49, 51, 0.2) 100%);
}
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 0.6s var(--ease); }
.hero__video.is-playing { opacity: 1; }
.hero__inner { display: flex; flex-direction: column; gap: 2px; }
.hero__title { max-width: 900px; font-size: var(--fs-hero); font-weight: 800; line-height: 1.077; }
.hero__text { align-self: flex-end; max-width: 750px; font-size: var(--fs-lead); line-height: 1.2; text-align: right; }
.hero__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--grey); }
.hero__progress span { display: block; width: 100%; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* ---------- Page header (sub pages) ---------- */
.page-header {
	position: relative; isolation: isolate;
	min-height: clamp(300px, 28.125vw, 450px);
	display: flex; align-items: flex-end;
	padding: 150px 0 clamp(44px, 5vw, 80px);
	background: #6e1f21; color: var(--white);
	overflow: hidden; text-align: center;
}
.page-header::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(174, 49, 51, 0.7) 0%, rgba(174, 49, 51, 0.2) 100%);
}
.page-header__image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-header__title { font-size: var(--fs-hero); font-weight: 800; line-height: 1.077; text-wrap: balance; }
.page-header--project .page-header__title { font-size: var(--fs-h1); }
.page-header--404 { background: var(--red); } /* without a photo */
.page-header__eyebrow { color: var(--white); margin-bottom: 12px; }

/* ---------- Intro (centred) ---------- */
.intro__inner { text-align: center; }
.intro__title { margin-bottom: 25px; }
.intro__text { max-width: 1200px; margin-inline: auto; }
.intro__buttons { margin-top: 25px; }
.intro--home { margin-top: var(--sp-120); }
.intro--archive .filter { margin-top: 25px; }
.intro--standard { margin-top: var(--sp-120); }
.projects--examples .intro__inner { margin-bottom: var(--sp-40); }
.projects--examples .intro__title { margin-bottom: 25px; }

/* ---------- Split intro (title left, text right) ---------- */
.split-intro__inner {
	display: grid;
	grid-template-columns: minmax(0, 600fr) minmax(0, 650fr);
	gap: 40px clamp(40px, 6.875vw, 110px);
	align-items: start;
}
.split-intro__text { padding-top: 12px; }
.split-intro--narrow-title .split-intro__inner { grid-template-columns: minmax(0, 430fr) minmax(0, 850fr); gap: 40px clamp(40px, 5vw, 80px); }

/* ---------- Services block ---------- */
.services__inner {
	position: relative;
	display: grid;
	grid-template-columns: 500fr 676fr;
	gap: 0 clamp(40px, 5vw, 80px);
	width: min(100% - 2 * var(--gutter), 1256px);
	align-items: start;
}
.services__media {
	position: relative;
	aspect-ratio: 500 / 470;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--grey);
}
.services__image {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	opacity: 0; transition: opacity 0.4s var(--ease);
}
.services__image.is-active { opacity: 1; }
.services__content { padding-top: 40px; }
.services__title { margin-bottom: 25px; } /* title to text is 25px on every page */
.services__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.services--home .services__buttons {
	position: absolute; left: 50%; bottom: 40px;
	transform: translateX(-50%);
	justify-content: center; width: max-content; max-width: 100%;
}
.services__item { position: relative; }
.tooltip {
	position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 19px);
	width: 350px; padding: 20px;
	border-radius: var(--radius-lg);
	background: var(--blue-tip); color: var(--white);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	font-size: 15px; line-height: 1.467;
	opacity: 0; visibility: hidden;
	transform: translate(calc(-50% + var(--tip-shift)), 8px);
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
	pointer-events: none;
}
.tooltip { --tip-shift: 0px; }
/* Closed tooltips take no room, otherwise the ones near the screen edge widen the page on phones. */
.services__item:not(.is-tip-open) .tooltip { display: none; }
@media (hover: hover) and (min-width: 1200px) { .services__item:not(.is-tip-open) .tooltip { display: block; } }
.tooltip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; } /* hover bridge */
.tooltip.is-below { top: calc(100% + 19px); bottom: auto; } /* no room above the button */
.tooltip.is-below::after { top: auto; bottom: 100%; }
.services__item.is-tip-open .tooltip { opacity: 1; visibility: visible; transform: translate(calc(-50% + var(--tip-shift)), 0); pointer-events: auto; }
.services__hint { margin-top: 1.333em; font-weight: 700; }
@media (hover: hover) { .u-touch-only { display: none; } }
@media (hover: none) { .u-hover-only { display: none; } }
.tooltip__link { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Variant "other": grey blueprint block */
.split-grey { position: relative; isolation: isolate; margin-top: 0; padding-top: var(--sp-100); }
/* The slider above runs half over the grey block (as in the design). */
.projects { position: relative; z-index: 1; }
.projects + .split-grey { margin-top: calc((var(--slide-h) / 2 + var(--nav-h, 0px)) * -1); padding-top: calc(var(--slide-h) / 2 + var(--nav-h, 0px) + var(--sp-100)); }
.split-grey::before,
.split-grey::after {
	content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0;
	bottom: clamp(40px, 3.9375vw, 63px);
	background: var(--grey);
}
.split-grey::after { background: url("../img/blueprint.jpg") center / cover no-repeat; opacity: var(--blueprint-opacity); }
.services--other .services__inner,
.split-grey__inner {
	display: grid;
	grid-template-columns: minmax(0, 620fr) minmax(0, 500fr);
	gap: 40px clamp(40px, 5vw, 80px);
	width: min(100% - 2 * var(--gutter), 1200px);
	align-items: start;
}
.services--other .services__media { grid-column: 2; grid-row: 1 / span 2; aspect-ratio: 500 / 600; }
.services--other .services__content { grid-column: 1; grid-row: 1; padding-top: 20px; }
.services--other .services__inner { grid-template-rows: auto 1fr; } /* the photo's extra height goes below the buttons */
.services--other .services__buttons { grid-column: 1; grid-row: 2; max-width: 500px; align-self: start; margin-top: -15px; }
.services__more { position: absolute; right: 30px; bottom: 30px; z-index: 2; }

/* About + video */
.split-grey__content { padding-top: 20px; }
.split-grey__title { margin-bottom: 25px; }
.video-block { position: relative; aspect-ratio: 500 / 600; border-radius: var(--radius-lg); overflow: hidden; background: #0d0d0d; }
.video-block__video { width: 100%; height: 100%; object-fit: cover; }
.video-block__controls { position: absolute; right: 30px; bottom: 30px; display: flex; gap: 8px; }
.video-block .is-paused, .video-block .is-unmuted { display: none; }
.video-block.is-paused .is-playing { display: none; }
.video-block.is-paused .is-paused { display: block; }
.video-block.is-unmuted .is-muted { display: none; }
.video-block.is-unmuted .is-unmuted { display: block; }

/* ---------- Slider ---------- */
.slider { position: relative; }
.slider__viewport {
	overflow: hidden;
	padding-left: calc(max(var(--gutter), (100vw - var(--container)) / 2) - 5px);
	touch-action: pan-y;
	user-select: none; -webkit-user-select: none;
}
.slider__track { display: flex; gap: 10px; width: max-content; will-change: transform; }
.slider__slide { flex: none; width: var(--slide-w); }
.slide {
	position: relative; display: block; width: 100%;
	aspect-ratio: var(--slide-ratio, 3 / 2);
	padding: 0; border: 0; border-radius: var(--radius-lg);
	overflow: hidden; background: var(--grey);
	color: var(--white); text-align: left; text-decoration: none;
	-webkit-user-drag: none;
}
button.slide { cursor: pointer; }
.slide__media { position: absolute; inset: 0; overflow: hidden; }
.slide__image { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform 0.5s var(--ease); }
.slide--overlay .slide__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(32, 46, 49, 0) 0%, rgba(32, 46, 49, 0.6) 100%);
}
.slide__label { position: absolute; left: var(--slide-pad); top: var(--slide-pad); z-index: 1; max-width: calc(100% - 2 * var(--slide-pad)); }
.slide__title {
	position: absolute; left: var(--slide-pad); right: var(--slide-pad); bottom: var(--slide-pad); z-index: 1;
	font-size: var(--slide-title); font-weight: 800; line-height: 1.167;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: normal;
	padding-bottom: 0.15em; margin-bottom: -0.15em; /* room for descenders (g, j) inside the clamp */
}
.slider.is-dragging .slide { pointer-events: none; }
/* Grid slider (service pages): three newest projects side by side; below 1024px it is a normal slider again. */
@media (min-width: 1024px) {
	.slider--grid .slider__viewport { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; padding-left: 0; overflow: visible; }
	.slider--grid .slider__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: auto; transform: none !important; }
	.slider--grid .slider__slide { width: auto; }
	.slider--grid .slider__nav { display: none; }
	.slider--grid .slider__viewport { cursor: auto !important; }
	/* card height in the grid, for the grey block that runs halfway under it */
	.projects--grid + .split-grey { --slide-h: calc((min(100vw - 2 * var(--gutter), var(--container)) - 40px) / 3 * 2 / 3); }
}
/* Card sliders on touch devices and small screens: arrows below the slider, next to "Alle projecten bekijken"
   (which moves there from next to the title). Photo sliders have no arrows: they run by themselves. */
.slider__nav { display: none; align-items: center; gap: 10px; margin-top: 16px; }
.slider__nav-link { margin-right: auto; }
.slider__arrow { flex: none; }
.slider__arrow .icon { width: 14px; height: 9px; }
.slider__arrow--prev { margin-left: auto; }
.slider__nav-link + .slider__arrow--prev { margin-left: 0; }
.slider__arrow--prev .icon { transform: rotate(90deg); }
.slider__arrow--next .icon { transform: rotate(-90deg); }
.slider.is-static .slider__arrow { visibility: hidden; }
@media (hover: none), (max-width: 767px) {
	.slider__nav { display: flex; }
	.section-head__link { display: none; }
	:root { --nav-h: 66px; } /* height of that row, for the grey block below */
}
.slider__track { position: relative; touch-action: pan-y; } /* item offsets are measured from the track; vertical swipes keep scrolling the page */
/* Touch devices and small screens: photo sliders only run by themselves; touches go straight to the page. */
@media (hover: none), (max-width: 767px) {
	.slider--static .slider__viewport, .media-strip__container { pointer-events: none; }
}
.projects__empty { padding: 40px; border-radius: var(--radius-lg); background: var(--grey); text-align: center; }
.projects__list { transition: opacity 0.3s var(--ease); }
.projects__list.is-loading { opacity: 0.3; }

/* Sleep cursor */
.drag-cursor {
	position: fixed; z-index: 60; left: 0; top: 0;
	display: grid; place-items: center;
	width: 90px; height: 90px; margin: -45px 0 0 -45px;
	border-radius: 50%;
	background: var(--blue); color: var(--white);
	font-size: 19px; font-weight: 800;
	pointer-events: none;
	transform: scale(0);
	transition: none;
}
.drag-cursor span { transition: transform 0.2s var(--ease); }

/* ---------- Hover title ---------- */
.hover-title { position: relative; }
.hover-title__inner { max-width: 1240px; text-align: center; }
.hover-title__eyebrow { margin-bottom: 15px; }
.hover-title__title { font-size: var(--fs-big); font-weight: 800; line-height: 1.111; }
.hover-title__word { cursor: default; outline-offset: 4px; border-radius: 4px; }
.hover-title__buttons { margin-top: 30px; }
.hover-card {
	position: fixed; z-index: 40; left: 0; top: 0;
	width: 280px; aspect-ratio: 280 / 360;
	margin: -180px 0 0 -140px;
	border-radius: var(--radius-lg); overflow: hidden;
	background: #111;
	pointer-events: none;
	opacity: 0;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.hover-card__item { position: absolute; inset: 0; opacity: 0; }
.hover-card__item.is-active { opacity: 1; }
.hover-card video, .hover-card img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Draggable photo strip (MWG effect 088) ---------- */
.media-strip {
	position: relative;
	margin-top: var(--sp-120);
	display: grid; align-items: center;
	overflow: hidden;
	outline-offset: -4px;
}
.media-strip__container {
	position: relative; /* item offsets are measured from here */
	display: flex; gap: 10px; /* same gap as the other sliders */
	width: max-content;
	padding: 0; /* runs edge to edge, no white space on the left */
	white-space: nowrap;
	cursor: grab;
	touch-action: pan-y; /* vertical swipes keep scrolling the page */
	user-select: none; -webkit-user-select: none;
}
.media-strip__item { width: 22vw; transform-style: preserve-3d; }
.media-strip__media {
	display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; /* a little lower than square */
	border-radius: var(--radius-lg);
	user-select: none; -webkit-user-drag: none; pointer-events: none;
	transform-style: preserve-3d;
}
@media (hover: hover) { .media-strip__container { cursor: none; } }
@media (max-width: 767px) {
	.media-strip__item { width: 78vw; }
}

/* ---------- Media + text ---------- */
.media-text__inner {
	display: grid;
	grid-template-columns: minmax(0, 600fr) minmax(0, 620fr);
	gap: 40px clamp(40px, 5vw, 80px);
	align-items: center;
}
.media-text__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.media-text__image { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.media-text__title { margin-bottom: 25px; }
.media-text__subtitle { margin: 40px 0 16px; }
.media-text .button-row { justify-content: flex-start; margin-top: 30px; }
.media-text--about .container, .media-text--vacancy .container { width: min(100% - 2 * var(--gutter), 1300px); }
.media-text--about .media-text__inner { grid-template-columns: minmax(0, 600fr) minmax(0, 620fr); }
.media-text--vacancy .media-text__inner { grid-template-columns: minmax(0, 500fr) minmax(0, 720fr); }
.media-text--vacancy .media-text__image { aspect-ratio: 5 / 4; }
.media-text--reverse .media-text__inner { grid-template-columns: minmax(0, 780fr) minmax(0, 500fr); align-items: start; }
.media-text--reverse .media-text__media { order: 2; }
.media-text--plaza { margin-top: var(--sp-120); }
.media-text--plaza .media-text__content { padding-top: 50px; }
.media-text--plaza .media-text__image { aspect-ratio: 500 / 432; }
.media-text__logo {
	position: absolute; right: 20px; bottom: 20px;
	display: grid; place-items: center;
	width: min(305px, 60%); height: 100px; padding: 20px 30px;
	border-radius: var(--radius); background: var(--white);
}
.media-text__logo img { max-height: 60px; width: auto; }
.media-text--transport .media-text__inner { grid-template-columns: minmax(0, 500fr) minmax(0, 780fr); }
.media-text--transport .media-text__image { aspect-ratio: 500 / 512; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 0; padding: clamp(60px, 8.75vw, 140px) 0 var(--sp-140); --line-x: 42.5%; }
/* The line runs all the way down to the footer. */
.main > .timeline:last-child { margin-bottom: 0; }
body:has(.main > .timeline:last-child) .footer { margin-top: 0; }
.timeline__line { position: absolute; top: 0; bottom: 0; left: var(--line-x); width: 2px; margin-left: -1px; background: var(--line); }
.timeline__fill { position: absolute; inset: 0 0 auto; height: 100%; background: var(--red); transform: scaleY(0); transform-origin: 50% 0; }
.timeline__list { position: relative; display: grid; gap: clamp(50px, 5.625vw, 90px); width: 100%; max-width: none; }
.timeline__list + .timeline__slider, .timeline__slider + .timeline__list { margin-top: clamp(60px, 7vw, 110px); }
.timeline__item { position: relative; display: grid; grid-template-columns: var(--line-x) minmax(0, 450px) 1fr; align-items: center; }
.timeline__year {
	justify-self: end; margin-right: clamp(36px, 4.4375vw, 71px);
	font-size: clamp(48px, 5vw, 80px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink-soft);
}
.timeline__dot {
	position: absolute; left: var(--line-x); top: 50%;
	width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
	background: var(--red); transform: scale(0); transition: transform 0.3s var(--ease);
}
.timeline__item.is-reached .timeline__dot { transform: scale(1); } /* appears once the red line has passed */
.timeline__text { grid-column: 2; padding-left: clamp(36px, 4.3125vw, 69px); font-size: 16px; font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink-soft); }
.timeline__slider { position: relative; z-index: 1; }

/* ---------- Projects archive ---------- */
.filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.projects--archive { margin-top: var(--sp-40); }

/* ---------- Project detail ---------- */
.project-info { margin-top: var(--sp-80); }
.project-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.project-meta__card { min-width: 190px; padding: 40px; border-radius: var(--radius); background: var(--grey); }
.project-meta__label { font-size: clamp(20px, 1.5625vw, 25px); font-weight: 800; line-height: 1.2; }
.project-meta__value { margin-top: 10px; font-size: var(--fs-lead); line-height: 1.25; }
.project-meta__value a { text-decoration: none; }
.project-meta__value a:hover { color: var(--red); }
.project-intro { max-width: 1100px; margin: var(--sp-80) auto 0; }
.project-gallery { margin-top: var(--sp-80); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery__link { display: block; aspect-ratio: 400 / 280; border-radius: var(--radius); overflow: hidden; background: var(--grey); cursor: zoom-in; }
.gallery__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.before-after-section { margin-top: var(--sp-140); }
.before-after {
	position: relative; aspect-ratio: 1240 / 500;
	border-radius: var(--radius-lg); overflow: hidden;
	background: var(--grey); user-select: none; touch-action: pan-y;
	cursor: ew-resize;
}
.before-after__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.before-after__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.before-after__label { position: absolute; top: 30px; z-index: 2; pointer-events: none; }
.before-after__label--before { left: 30px; }
.before-after__label--after { right: 30px; }
.before-after__handle {
	position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3;
	width: 6px; margin-left: -3px; background: var(--white);
	cursor: ew-resize;
}
.before-after__knob {
	position: absolute; left: 50%; top: 50%;
	display: grid; place-items: center;
	width: 50px; height: 50px; margin: -25px 0 0 -25px;
	border-radius: 50%; background: var(--white); color: #131313;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.before-after__knob .icon { width: 21px; height: 14px; }
.lightbox { width: min(92vw, 1400px); max-width: none; max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius-lg); background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.lightbox__image { width: 100%; max-height: 88vh; object-fit: contain; border-radius: var(--radius-lg); }
.lightbox__close, .lightbox__nav {
	position: absolute; z-index: 2;
	display: grid; place-items: center;
	width: 50px; height: 50px; border: 0; border-radius: 50%;
	background: var(--white); color: var(--ink); cursor: pointer;
}
.lightbox__close { top: -60px; right: 0; }
.lightbox__close .icon { width: 14px; height: 14px; }
.lightbox__nav { top: 50%; margin-top: -25px; }
.lightbox__nav .icon { width: 14px; height: 10px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--prev .icon { transform: rotate(90deg); }
.lightbox__nav--next { right: 16px; }
.lightbox__nav--next .icon { transform: rotate(-90deg); }

/* ---------- Werken bij ---------- */
.split-intro--careers .vacancies { margin-top: clamp(40px, 3.125vw, 50px); }
.vacancies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vacancy-card { min-height: clamp(260px, 18.75vw, 300px); }
.vacancy-card__link {
	position: relative; isolation: isolate;
	display: flex; flex-direction: column; justify-content: flex-end;
	height: 100%; padding: 30px;
	border-radius: var(--radius); overflow: hidden;
	background: var(--grey); color: var(--ink); text-decoration: none;
}
.vacancy-card__link::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: url("../img/blueprint.jpg") center / cover no-repeat;
	opacity: 0; transform: scale(1.06);
	transition: opacity var(--dur) var(--ease), transform 0.5s var(--ease);
}
.vacancy-card__body { display: grid; transform: translateY(32px); transition: transform var(--dur) var(--ease); }
.vacancy-card__title { margin-bottom: 15px; }
.vacancy-card__text { font-size: 16px; line-height: 1.375; }
.vacancy-card__more { margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--red); opacity: 0; transform: translateY(8px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.vacancy-card--open .vacancy-card__link { background: var(--red); color: var(--white); }
.vacancy-card--open .vacancy-card__link::before { content: none; }
.vacancy-card--open .vacancy-card__more { color: var(--white); }
.projects--workplace .section-head { margin-bottom: var(--sp-40); }

/* ---------- Accordion ---------- */
.accordion-section { margin-top: var(--sp-140); }
.accordion { display: grid; gap: 20px; width: min(100% - 2 * var(--gutter), 1300px); }
.accordion__item { border-radius: var(--radius-lg); background: var(--grey); }
.accordion__heading { font-size: inherit; }
.accordion__button {
	display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: clamp(96px, 9.375vw, 150px); padding: 30px;
	border: 0; background: none; cursor: pointer;
	font-size: var(--fs-big); font-weight: 800; line-height: 1.1;
	transition: color var(--dur) var(--ease);
}
.accordion__button:hover { color: var(--red); }
.accordion__button[aria-expanded="true"] { color: var(--red); }
.accordion__panel { overflow: hidden; }
.accordion__content { padding: 0 clamp(24px, 5.625vw, 90px) clamp(36px, 3.75vw, 60px); max-width: 1120px; margin-inline: auto; }

/* ---------- Popup ---------- */
.popup { width: min(92vw, 650px); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.popup::backdrop { background: rgba(0, 0, 0, 0.4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.popup__card { position: relative; padding: 50px; border-radius: var(--radius-lg); background: var(--white); }
.popup__close {
	position: absolute; right: 22px; top: 22px;
	display: grid; place-items: center;
	width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: none; cursor: pointer;
	transition: background-color var(--dur) var(--ease);
}
.popup__close:hover { background: var(--grey); }
.popup__close .icon { width: 12px; height: 12px; }
.popup__title { padding-right: 30px; margin-bottom: 20px; font-size: clamp(26px, 2.5vw, 40px); font-weight: 800; line-height: 1.125; }
.popup[open] .popup__card { animation: popup-in 0.3s var(--ease); }
.popup[open]::backdrop { animation: fade-in 0.3s var(--ease); }
@keyframes popup-in { from { opacity: 0; transform: scale(0.95); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Text page ---------- */
.text-page { margin-top: var(--sp-120); }
.text-page__content h2 { font-size: var(--fs-h2); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.text-page__content h3 { margin-top: 1.333em; font-size: var(--fs-body); font-weight: 700; }
.text-page__content p { margin-top: 0; }

/* ---------- Contact rows ---------- */
.contact-list { display: grid; gap: 8px; margin-top: 25px; }
.contact-list__row {
	display: inline-flex; align-items: center; gap: 17px;
	font-size: clamp(18px, 1.375vw, 22px); font-weight: 800; line-height: 1.2;
	text-decoration: none; transition: color var(--dur) var(--ease);
}
.contact-list__row:hover { color: var(--red); }
.contact-list__icon { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: var(--radius); background: var(--red); color: var(--white); }
.contact-list__icon .icon { width: 22px; height: 22px; }
.contact-list--light .contact-list__row { font-size: 17px; font-weight: 600; }
.contact-list--light .contact-list__icon { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.16); }
.contact-list--light .contact-list__row:hover { color: inherit; opacity: 0.8; }

/* ---------- Forms ---------- */
.form-section { margin-top: var(--sp-120); }
.form-section__inner { display: grid; grid-template-columns: minmax(0, 620fr) minmax(0, 654fr); gap: 40px clamp(40px, 5.375vw, 86px); align-items: start; }
.form-section__title { margin-bottom: 25px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form__field { display: flex; flex-direction: column; margin-bottom: 23px; min-width: 0; }
.form__field--full { grid-column: 1 / -1; }
.form__field > label { margin: 0 0 11px 22px; font-size: var(--fs-body); line-height: 1.5; }
.form__req { margin-left: 6px; color: var(--red); }
.wpcf7-form-control-wrap { display: block; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
	width: 100%; height: 50px; padding: 0 22px;
	border: 1px solid transparent; border-radius: var(--radius);
	background: var(--field); color: var(--ink);
	font: inherit; font-size: 16px;
	transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
	appearance: none;
}
.form textarea { display: block; height: auto; min-height: 133px; max-height: 360px; padding: 14px 22px; resize: vertical; field-sizing: content; }
.form ::placeholder { color: rgba(0, 0, 0, 0.49); font-weight: 300; font-style: italic; opacity: 1; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); background: var(--white); }
.form .wpcf7-not-valid { border-color: var(--red) !important; }
.wpcf7-not-valid-tip, .file-input__error { display: block; margin: 7px 0 0 22px; font-size: 14px; font-weight: 600; color: var(--red); }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.form__footer .form__note { margin: 0 0 0 22px; }
.form__footer .wpcf7-submit, .form__footer .button { margin-left: auto; }
.form__footer .button { min-width: 204px; }
.form__note { margin: -6px 0 18px 22px; font-size: 14px; color: rgba(0, 0, 0, 0.6); }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wpcf7-spinner { display: none; }
.wpcf7-form.submitting .wpcf7-submit { opacity: 0.6; pointer-events: none; }
.hidden-fields-container { display: none; }
.screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpcf7-response-output { margin: 16px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--grey); font-size: 15px; }
.wpcf7-form.init .wpcf7-response-output, .wpcf7-form.sent .wpcf7-response-output, .wpcf7-response-output:empty { display: none; }
.wpcf7-form.invalid .wpcf7-response-output, .wpcf7-form.failed .wpcf7-response-output, .wpcf7-form.spam .wpcf7-response-output { border-left: 4px solid var(--red); }
.form-success { padding: 40px; border-radius: var(--radius-lg); background: var(--grey); }
.form-success h3 { margin-bottom: 10px; color: var(--red); }
.form-fallback a { color: var(--red); font-weight: 700; }

/* File input (PDF) */
.file-input {
	position: relative;
	display: flex; align-items: center; gap: 8px;
	height: 50px; padding: 0 5px 0 22px;
	border: 1px solid transparent; border-radius: var(--radius);
	background: var(--field);
}
.file-input:focus-within { border-color: var(--blue); }
.file-input.has-error { border-color: var(--red); }
.file-input__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: rgba(0, 0, 0, 0.49); font-weight: 300; font-style: italic; }
.file-input.has-file .file-input__name { color: var(--ink); font-weight: 500; font-style: normal; }
.file-input__button {
	flex: none; display: inline-flex; align-items: center; height: 39px; padding: 0 25px;
	border-radius: 2.5px; background: var(--blue); color: var(--white);
	font-size: 14px; font-weight: 600; pointer-events: none;
}
.file-input__clear { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--white); color: var(--red); font-size: 18px; line-height: 1; cursor: pointer; position: relative; z-index: 2; }
.file-input .wpcf7-form-control-wrap { position: static; }
.file-input__control { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-input .wpcf7-not-valid-tip { position: absolute; top: calc(100% + 1px); left: 0; margin-left: 22px; }
.form__field--file { padding-bottom: 0; }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: var(--sp-140); min-height: 507px; }
.footer__panel {
	position: relative; z-index: 1;
	width: 70.25%; min-height: 507px;
	padding: 50px clamp(40px, 5vw, 80px) 40px var(--gutter);
	border-top-right-radius: 40px;
	background: var(--grey);
}
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer__logo img { width: 259px; height: auto; }
.footer__social { display: flex; align-items: center; gap: 8px; }
.footer__social-label { margin-right: 9px; font-size: clamp(18px, 1.375vw, 22px); font-weight: 800; }
.footer__columns { display: grid; grid-template-columns: 315fr 347fr 262fr; gap: 30px 0; margin-top: 40px; }
.footer__title { margin-bottom: 15px; font-size: clamp(19px, 1.375vw, 22px); font-weight: 800; line-height: 1; }
.footer__list li, .footer-nav__item { line-height: 1.333; }
.footer__list a, .footer-nav__link { text-decoration: none; transition: color var(--dur) var(--ease); }
.footer__list a:hover, .footer-nav__link:hover { color: var(--red); }
.footer-nav__list { display: grid; grid-template-columns: repeat(2, max-content); grid-auto-flow: column; grid-template-rows: repeat(3, auto); gap: 0 40px; }
.footer__logos { --logo-scale: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 50px; }
/* --logo-h is set per logo in footer.php (from its proportions), so all logos look equally heavy. */
.footer__logo-item img { height: calc(var(--logo-h, 50px) * var(--logo-scale)); width: auto; max-width: none; object-fit: contain; filter: grayscale(1); }
.footer__credit { margin-top: 50px; font-weight: 800; }
.footer__credit a { text-decoration: none; }
.footer__credit a:hover { color: var(--red); }
.footer__address {
	position: absolute; z-index: 2; left: 46.3125%; right: 26.625%; bottom: 0;
	display: flex; flex-direction: column; justify-content: center;
	min-height: 150px; padding: 25px clamp(24px, 3.125vw, 50px);
	border-top-left-radius: 40px;
	background: var(--red); color: var(--white);
	font-size: var(--fs-h3); font-weight: 800; line-height: 1.167; text-decoration: none;
}
.footer__address:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.footer__photos {
	position: absolute; z-index: 3; right: 0; top: 50px; bottom: 0;
	width: 26.625%;
	border-top-left-radius: 20px; overflow: hidden; background: var(--grey);
}
.footer__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease); }
.footer__photo.is-active { opacity: 1; }
.footer__address-inline { display: none; }

/* ---------- Motion ---------- */
/* Same-site navigations: the browser keeps the old page on screen until the new one has painted (no white
   flash between the two covered pages of the page transition), without its own cross-fade. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
/* Page transition (Osmo "Double Wipe"): two panels wipe up over the page on leave; the second one wipes
   off the new page on enter. .is-entering (set in <head>) keeps the new page covered until main.js runs. */
.transition { position: fixed; inset: 0; z-index: 2000; overflow: hidden; overflow: clip; pointer-events: none; }
.transition__panels { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; }
.transition__panel-1,
.transition__panel-2 { position: absolute; top: 100%; width: 100%; height: 100%; will-change: transform; backface-visibility: hidden; }
.transition__panel-1 { background: var(--blue); }
.transition__panel-2 { background: linear-gradient(90deg, var(--red), var(--red-dark)); }
.is-entering .transition__panel-2 { transform: translateY(-100%); }
.js [data-reveal] { opacity: 0; transform: translateY(30px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }

@media (hover: hover) {
	.slide--overlay:hover .slide__image, .slider--static .slide:hover .slide__image, .gallery__link:hover .gallery__image { transform: scale(1.05); }
	.slider[data-slider]:not(.is-static) .slider__viewport { cursor: none; }
	.vacancy-card__link:hover::before { opacity: var(--blueprint-opacity); transform: none; }
	.vacancy-card__link:hover .vacancy-card__body { transform: none; }
	.vacancy-card__link:hover .vacancy-card__more { opacity: 1; transform: none; }
}
@media (hover: none) {
	.drag-cursor { display: none; }
	.hover-card { width: 200px; margin: 0; }
	/* No hover state on touch: cards show their default state. */
	.vacancy-card__body, .vacancy-card--open .vacancy-card__body { transform: none; }
	.vacancy-card__more { display: none; }
}
.vacancy-card__link:focus-visible .vacancy-card__body { transform: none; }
.vacancy-card__link:focus-visible .vacancy-card__more { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
	.drag-cursor, .hover-card { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	:root { --header-h: 96px; --slide-w: 44vw; --slide-title: clamp(20px, 2.6vw, 26px); } /* tablets: about two cards in view */
	.header { padding-top: 24px; }
	.header__nav, .header__cta { display: none; }
	.header__inner { justify-content: space-between; min-height: 56px; }
	.header__logo img { width: 180px; }
	.header__toggle {
		position: relative; z-index: 2;
		display: grid; place-items: center;
		width: 56px; height: 56px; padding: 0;
		border: 0; border-radius: var(--radius);
		background: var(--blue); color: var(--white); cursor: pointer;
	}
	.header__toggle-lines { position: relative; width: 24px; height: 16px; }
	.header__toggle-lines span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
	.header__toggle-lines span:nth-child(1) { top: 0; }
	.header__toggle-lines span:nth-child(2) { top: 7px; }
	.header__toggle-lines span:nth-child(3) { top: 14px; }
	.menu-open .header__toggle-lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.menu-open .header__toggle-lines span:nth-child(2) { opacity: 0; }
	.menu-open .header__toggle-lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	.hero__inner { gap: 20px; }
	.hero__text { align-self: flex-start; text-align: left; max-width: 620px; }

	.services__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
	.services--home .services__buttons { position: static; transform: none; grid-column: 1 / -1; justify-content: flex-start; width: auto; margin-top: 24px; }
	.services__content { padding-top: 0; }
	.tooltip { width: min(300px, calc(100vw - 2 * var(--gutter))); }

	/* The footer layout no longer fits: address moves under Contact, photo and red block go. */
	.footer { min-height: 0; }
	.footer__panel { width: 100%; min-height: 0; padding-right: var(--gutter); padding-bottom: 50px; }
	.footer__address, .footer__photos { display: none; }
	.footer__address-inline { display: list-item; }
}

@media (max-width: 1023px) {
	.split-intro__inner, .split-intro--narrow-title .split-intro__inner,
	.media-text__inner, .media-text--about .media-text__inner, .media-text--vacancy .media-text__inner,
	.media-text--reverse .media-text__inner, .media-text--transport .media-text__inner,
	.form-section__inner, .split-grey__inner, .services--other .services__inner { grid-template-columns: minmax(0, 1fr); }
	.media-text--reverse .media-text__media { order: 0; }
	.media-text--about .media-text__content { order: -1; } /* text first, the photo leads into the timeline */
	.media-text--plaza .media-text__content { padding-top: 0; }
	.split-intro__text { padding-top: 0; }
	/* Title to text: 25px everywhere once columns stack (same as the centred intros). */
	.split-intro__inner, .split-intro--narrow-title .split-intro__inner { row-gap: 25px; }
	.services--other .services__media, .services--other .services__content, .services--other .services__buttons { grid-column: 1; grid-row: auto; }
	.services--other .services__media { order: 3; aspect-ratio: 4 / 3; }
	.services--other .services__buttons { margin-top: 0; }
	.split-grey__media { aspect-ratio: 4 / 3; max-height: 70vh; width: 100%; }
	.vacancies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.timeline { --line-x: 30%; }
	.footer__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.footer__logos { --logo-scale: 0.85; gap: 16px 24px; }
	.section-head { flex-direction: column; align-items: flex-start; }
	.section-head__link { margin-left: 0; transform: none; }
	.section-head--center { align-items: center; }
	.button { min-height: 54px; }
	.hero { min-height: min(72svh, 520px); }
	.page-header { padding-top: 120px; }
	.services__inner { grid-template-columns: minmax(0, 1fr); }
	.services__media { aspect-ratio: 4 / 3; }
	.services--home .services__content { order: -1; margin-bottom: 24px; }
	.services__buttons { gap: 8px; }
	/* Phones: one card fills most of the screen, slightly less wide than tall-ish 4:3 so title and label have room. */
	:root { --slide-w: min(85vw, 460px); --slide-ratio: 4 / 3; --slide-h: calc(min(85vw, 460px) * 3 / 4); --slide-title: 22px; }
	.services__item.is-tip-open .tooltip { background: var(--blue); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); } /* opaque on phones: buttons would show through */
	.slider__viewport { padding-left: var(--gutter); }
	.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.before-after { aspect-ratio: 4 / 3; }
	.project-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.project-meta__card { min-width: 0; padding: 22px; }
	.vacancies { grid-template-columns: minmax(0, 1fr); }
	.form__grid { grid-template-columns: minmax(0, 1fr); }
	.form__field > label { margin-left: 0; }
	.form__footer .button { width: 100%; }
	.popup__card { padding: 40px 24px 28px; }
	.timeline { --line-x: calc(var(--gutter) + 24px); }
	.timeline__item { grid-template-columns: minmax(0, 1fr); padding-left: calc(var(--line-x) + 30px - var(--gutter)); gap: 8px; }
	.timeline__year { justify-self: start; margin: 0; font-size: 44px; }
	.timeline__dot { top: 22px; left: calc(var(--line-x) - var(--gutter)); } /* items sit inside the gutter, the line does not */
	.timeline__text { grid-column: 1; padding-left: 0; }
	.timeline__list { width: 100%; padding-inline: var(--gutter); }
	.footer__top { flex-direction: column; align-items: flex-start; }
	.footer__columns { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.footer__logo img { width: 210px; }
	.accordion__content { padding-inline: 20px; }
}

@media (max-width: 360px) {
	:root { --slide-title: 19px; } /* long titles stay within three lines on the smallest phones */
}

@media (max-width: 480px) {
	.project-meta { grid-template-columns: minmax(0, 1fr); }
	.gallery { grid-template-columns: minmax(0, 1fr); }
	.pill { padding-inline: 16px; letter-spacing: 0.14em; }
	.footer__social { flex-wrap: wrap; }
}
