:root {
    --navy: #0a517d;
    --navy-dark: #073a5a;
    --blue: #069bcc;
    --blue-light: #3cc0ea;
    --ink: #1c2b36;
    --muted: #5b6b78;
    --line: #dde5ea;
    --tint: #f3f7fa;
    --white: #fff;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(10, 60, 90, .10);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy-dark); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* Buttons */
.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: 999px; border: 2px solid var(--navy); background: var(--navy); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--navy-dark); }
.btn-light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy-dark); }
.btn-small { padding: .45rem 1.1rem; font-size: .95rem; }
.link { font-weight: 600; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-dark); }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; letter-spacing: .04em; }
.brand-text small { font-size: .72rem; color: var(--muted); }
.site-nav ul { display: flex; align-items: center; gap: .25rem; }
.site-nav a { display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink); }
.site-nav a:hover { background: var(--tint); color: var(--navy); }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.site-nav .lang a { border: 2px solid var(--line); padding: .35rem .7rem; font-size: .9rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 24px; height: 2px; background: var(--navy-dark); margin-inline: auto; position: relative; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1rem; }
    .site-nav .lang { margin-top: .5rem; align-self: flex-start; }
    .brand-text small { display: none; }
}

/* Hero */
.hero { position: relative; height: clamp(360px, 62vh, 620px); background: var(--navy-dark); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; display: grid; place-items: center; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 58, 90, .55), rgba(7, 58, 90, .78)); }
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; }
.hero-pause { position: absolute; right: 1rem; bottom: 1rem; z-index: 3; width: 2.75rem; height: 2.75rem; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%; background: rgba(7, 20, 40, .35); color: #fff; cursor: pointer; display: grid; place-items: center; }
.hero-pause[hidden] { display: none; }
.hero-pause:hover, .hero-pause:focus-visible { background: rgba(7, 20, 40, .6); outline: 3px solid rgba(255, 255, 255, .5); outline-offset: 2px; }
.hero-pause::before { content: ""; width: .8rem; height: .9rem; border-left: .28rem solid #fff; border-right: .28rem solid #fff; box-sizing: border-box; }
.hero-pause[aria-pressed="true"]::before { width: 0; height: 0; border-style: solid; border-width: .5rem 0 .5rem .8rem; border-color: transparent transparent transparent #fff; margin-left: .2rem; }
.hero-title { font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; line-height: 1.1; margin: 0 0 1.25rem; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } html { scroll-behavior: auto; } }

/* Sections */
.section { padding: clamp(2.75rem, 7vw, 5rem) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--navy-dark); color: #e6f1f7; }
.section-dark h2 { color: #fff; }
.section-dark .lead { color: #b9d3e2; }
.section-dark a:not(.btn) { color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose { margin-bottom: 1.5rem; }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1em; }
.prose ol { list-style: decimal; padding-left: 1.3rem; margin-bottom: 1em; }

.page-head { background: linear-gradient(135deg, var(--navy-dark), var(--navy) 60%, var(--blue)); color: #fff; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head .lead { color: #d5e8f2; max-width: 760px; margin: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; margin-bottom: 1rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.breadcrumbs a { color: #d5e8f2; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 2.25rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem 1.25rem 1.4rem; border-top: 3px solid var(--blue); flex: 1; }
.card-body p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Services list */
.service-row { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 2rem; align-items: center; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.service-row:first-child { padding-top: 0; }
.service-row:last-child { border-bottom: 0; padding-bottom: 0; }
.service-row:not(:has(.service-media)) { grid-template-columns: 1fr; }
.service-media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-text h2 { font-size: 1.5rem; }
.service-text h2 a { text-decoration: none; }
.service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0; }
@media (max-width: 700px) { .service-row { grid-template-columns: 1fr; gap: 1rem; } }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: start; }
.split:not(:has(.split-media)) { grid-template-columns: minmax(0, 820px); }
.split-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

.pill-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill-list a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.pill-list a:hover { border-color: var(--blue); }
.pill-list a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.count { font-size: .8rem; background: var(--tint); color: var(--navy); border-radius: 999px; padding: 0 .5rem; }
.filter { margin-bottom: 2rem; }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; margin-bottom: 2.25rem; }
.project-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--tint); cursor: zoom-in; overflow: hidden; }
.project-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.project-photo:hover img { transform: scale(1.04); }
.project-photo-empty { cursor: default; background: linear-gradient(135deg, var(--tint), #dfeaf1); }
.photo-count { position: absolute; right: .6rem; bottom: .6rem; background: rgba(7, 58, 90, .85); color: #fff; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; }
.project-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.project-body p { margin: 0; font-size: .97rem; color: var(--muted); }
.project-title { font-size: 1.12rem; margin: 0; }
.project-body .project-value { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .4rem; }
.tags a { font-size: .8rem; font-weight: 600; text-decoration: none; background: var(--tint); padding: .2rem .65rem; border-radius: 999px; }

/* Documents (licences, awards) */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.doc { display: block; width: 100%; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: zoom-in; transition: box-shadow .15s; }
.doc:hover { box-shadow: var(--shadow); }
.doc img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }

/* Offices and map */
.office-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; margin: 1.5rem 0 2rem; }
.office { display: flex; flex-direction: column; gap: .2rem; max-width: 340px; }
.office strong { color: #fff; font-size: 1.15rem; }
.office-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.office-card { border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 1.5rem; }
.office-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.office-card dt { color: var(--muted); }
.office-card dd { margin: 0; }
.map { height: clamp(320px, 50vh, 480px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint); z-index: 0; overflow: hidden; }
.office-actions { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; }
.office-card .map-link { padding: 0; border: 0; background: none; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.office-card .map-link:hover, .office-card .map-link:focus-visible { color: var(--blue); }
.office-card .map-link::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .45em; border-radius: 50% 50% 50% 0; background: currentColor; transform: rotate(-45deg); vertical-align: -.05em; }
.office-card .directions-link { font-weight: 600; text-underline-offset: 3px; }
.office-card .directions-link::after, .map-directions::after { content: " ↗"; }
.map .map-reset { display: flex; align-items: center; justify-content: center; color: #333; }
/* MapLibre moves the marker with a transform, so the tilted pin is a child of the button. */
.map-marker { display: flex; align-items: flex-end; justify-content: center; width: 32px; height: 34px; padding: 0 0 5px; border: 0; background: none; cursor: pointer; }
.map-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--navy); border: 3px solid #fff; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .15s; }
.map-marker:hover .map-pin, .map-marker:focus-visible .map-pin { transform: rotate(-45deg) scale(1.15); }
.map .maplibregl-popup-content { padding: .75rem 2rem .8rem .9rem; border-radius: 8px; font: inherit; font-size: .95rem; line-height: 1.45; box-shadow: var(--shadow); }
.map .maplibregl-popup-close-button { width: 28px; height: 28px; font-size: 1.25rem; }
.map-directions { display: inline-block; margin-top: .4rem; font-weight: 600; }

/* Forms */
.contact-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form input[type="password"], .contact-form textarea {
    width: 100%; padding: .7rem .9rem; border: 1px solid #b9c7d1; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); outline: 3px solid rgba(6, 155, 204, .25); }
.contact-form ul { color: #b3261e; font-size: .92rem; margin-top: .3rem; }
.contact-form input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-right: .5rem; vertical-align: -3px; accent-color: var(--navy); }
.contact-form div:has(> input[type="checkbox"]) label { display: inline; font-weight: 400; }
.contact-form .consent-row { display: flex; align-items: flex-start; gap: .6rem; }
.contact-form .consent-row input[type="checkbox"] { flex: none; margin: .2rem 0 0; }
.contact-form .consent-row label { margin: 0; cursor: pointer; }
.contact-form .cf-turnstile { margin: 1rem 0; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.form-note { font-size: .9rem; color: var(--muted); margin: 0; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .9rem 1.1rem; border-radius: 8px; font-weight: 600; }
.alert-success { background: #e3f5ea; color: #17643a; }
.alert-error { background: #fde8e6; color: #9a231c; }

/* Footer */
.site-footer { background: #0b2231; color: #b8c9d4; font-size: .97rem; padding-top: 3rem; }
.site-footer a { color: #e3eef4; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2rem; }
.footer-brand, .footer-title { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .4rem; }
.footer-tagline { color: var(--blue-light); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer p { margin-bottom: .5em; }
.memberships { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; padding: 1.75rem 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.membership-group p { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.membership-group ul { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.membership-group img { height: 48px; width: auto; background: #fff; border-radius: 6px; padding: 4px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.1rem 0; font-size: .88rem; }
.footer-bottom p { margin: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 20, 30, .92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 3.5rem 2rem; gap: .75rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox figcaption { color: #dbe7ee; text-align: center; font-size: .95rem; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 2; }
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox[data-single] .lightbox-prev, .lightbox[data-single] .lightbox-next { display: none; }

/* Error pages */
.error-code { font-size: 5rem; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: .2em; }
