/* Arcsi – land surveying, cadastre and design, Sofia. Dark, with motion; a light theme through the switch.
   The idea is terrain: a wireframe terrain model in the hero and contour lines behind the page heads,
   coloured the way a relief map is – teal lowlands, wheat slopes, warm peaks. Those three colours are the
   whole accent palette. Everything that moves does so in CSS only and stands still under
   prefers-reduced-motion; the scroll-driven parts sit behind @supports and show their end state without it.
   Every colour that differs between the dark theme and the light one is a custom property below.
   Fonts: Unbounded (headings) and Onest (text), both SIL OFL 1.1, self-hosted, Latin + Cyrillic. */

@font-face {
    font-family: "Unbounded";
    src: url("../fonts/unbounded.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Onest";
    src: url("../fonts/onest.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* Dark is the design's own theme. The footer and the lightbox keep it in the light theme too. */
:root,
:root[data-theme="light"] .foot,
:root[data-theme="light"] .lightbox {
    color-scheme: dark;
    --bg: #0a1412;
    --deep: #0e1b18;
    --pit: #070e0d;
    --card: rgba(255, 255, 255, 0.045);
    --card-hover: rgba(255, 255, 255, 0.07);
    --field: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.11);
    --veil: 255, 255, 255;
    --text: #e9f1ed;
    --muted: #a3b8af;
    --bright: #ffffff;
    --placeholder: #92a89f;
    --error: #ffb199;
    --mint: #5fe3cf;
    --mint-rgb: 95, 227, 207;
    --teal: #2cc4ad;
    --teal-rgb: 44, 196, 173;
    --leaf: #a6d98b;
    --wheat-ink: #f2c64f;
    --coral: #ff8f5e;
    --glass: rgba(10, 20, 18, 0.74);
    --chip: rgba(10, 20, 18, 0.55);
    --tag: rgba(10, 20, 18, 0.82);
    --shadow: rgba(0, 0, 0, 0.5);
    --land: #10302a;
    --label: #dcebe5;
    --sheet: #0c1917;
    --title: linear-gradient(105deg, #ffffff 35%, #b8f5ea 70%, #f2c64f);
}

/* The light theme (js/theme.js sets data-theme): the same relief colours, deepened to read on paper. */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f7f3;
    --deep: #e8efe9;
    --pit: #dfe8e2;
    --card: #ffffff;
    --card-hover: #ffffff;
    --field: #ffffff;
    --stroke: rgba(10, 20, 18, 0.16);
    --veil: 10, 20, 18;
    --text: #10201c;
    --muted: #4a5d56;
    --bright: #06100e;
    --placeholder: #5d6f68;
    --error: #b3261e;
    --mint: #0a7566;
    --mint-rgb: 10, 117, 102;
    --teal: #12917f;
    --teal-rgb: 18, 145, 127;
    --leaf: #5d9a3f;
    --wheat-ink: #8f6200;
    --coral: #c94a18;
    --glass: rgba(244, 247, 243, 0.82);
    --chip: rgba(255, 255, 255, 0.72);
    --tag: rgba(255, 255, 255, 0.9);
    --shadow: rgba(10, 20, 18, 0.2);
    --land: #cfe6df;
    --label: #10201c;
    --sheet: #ffffff;
    --title: linear-gradient(105deg, #06100e 35%, #0a6a5d 70%, #8f6200);
}

/* The same in both themes: the dark ink on wheat and on the relief band, the wheat itself, type, measures. */
:root {
    --night: #0a1412;
    --wheat: #f2c64f;
    --display: "Unbounded", "Arial Black", Arial, sans-serif;
    --body: "Onest", "Segoe UI", Roboto, Arial, sans-serif;
    --gutter: clamp(18px, 4vw, 32px);
    --radius: 24px;
    --relief: linear-gradient(100deg, #2cc4ad, #a6d98b 50%, #f2c64f 78%, #ff8f5e);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

h1,
h2,
h3 {
    margin: 0;
    text-wrap: balance;
}

h1,
h2 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2rem, 6.2vw, 4.3rem);
    line-height: 1.04;
}

h2 {
    font-size: clamp(1.45rem, 3.2vw, 2.15rem);
    line-height: 1.14;
}

h3,
.h3 {
    font-family: var(--body);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

p {
    margin: 0 0 1em;
    max-width: 66ch;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 600;
}

a {
    color: var(--mint);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--bright);
}

:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 3px;
    border-radius: 4px;
}

[id] {
    scroll-margin-top: 110px;
}

.wrap {
    position: relative;
    width: 100%;
    max-width: calc(1120px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.narrow > * {
    max-width: 68ch;
}

.muted {
    color: var(--muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 12px;
    top: -70px;
    z-index: 40;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--wheat);
    color: var(--night);
}

.skip:focus {
    top: 12px;
}

/* ---- header: glass bar that stays on top ---- */

.top {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--stroke);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding-top: 10px;
    padding-bottom: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
}

/* The firm's own logo, 269 x 65 px in the file: shown smaller, never larger. */
.brand img {
    flex: none;
    width: auto;
    height: 40px;
}

.call {
    display: inline-flex;
    order: 2;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--wheat);
    color: var(--night);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.call:hover {
    background: #ffd970;
    color: var(--night);
}

.nav {
    display: flex;
    flex: 1 1 calc(100% - 50px);
    gap: 2px;
    min-width: 0;
    order: 3;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav a {
    flex: none;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}

.nav a:first-child {
    margin-left: -12px;
}

.nav a:hover {
    color: var(--text);
}

.nav a[aria-current="page"] {
    background: rgba(var(--veil), 0.1);
    color: var(--bright);
}

.nav a:focus-visible {
    outline-offset: -3px;
}

.lang {
    display: inline-flex;
    flex: none;
    order: 1;
    padding: 3px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
}

.lang a,
.lang span {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
}

.lang span {
    background: rgba(var(--veil), 0.12);
    color: var(--bright);
}

.lang a:hover {
    color: var(--bright);
}

/* The theme switch (js/theme.js): shows the sun in the dark theme and the moon in the light one. On
   phones it stands at the end of the navigation row. */
.theme {
    display: inline-grid;
    flex: none;
    order: 4;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--stroke);
    border-radius: 50%;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.theme[hidden] {
    display: none;
}

.theme:hover {
    border-color: var(--mint);
    color: var(--bright);
}

.theme:focus-visible {
    border-radius: 50%;
}

.theme svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-moon,
:root[data-theme="light"] .theme-sun {
    display: none;
}

:root[data-theme="light"] .theme-moon {
    display: block;
}

/* Pictures that exist once per theme, such as the logo in white and in black ink. */
.on-light,
:root[data-theme="light"] .on-dark {
    display: none;
}

:root[data-theme="light"] .on-light {
    display: inline;
}

/* ---- buttons ---- */

.btn {
    display: inline-block;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--wheat);
    color: var(--night);
    font: inherit;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.25s ease, translate 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    background: #ffd970;
    color: var(--night);
    box-shadow: 0 10px 34px rgba(242, 198, 79, 0.32);
    translate: 0 -2px;
}

.btn-ghost {
    border-color: rgba(var(--veil), 0.28);
    background: rgba(var(--veil), 0.04);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--mint);
    background: rgba(var(--mint-rgb), 0.1);
    color: var(--bright);
    box-shadow: none;
}

.btn-night,
.btn-night:hover {
    background: var(--night);
    color: #ffffff;
}

.btn-night:hover {
    box-shadow: 0 10px 34px rgba(10, 20, 18, 0.4);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin-top: 28px;
}

/* ---- pills and chips ---- */

.chips,
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips {
    margin-top: 26px;
}

.chips li,
.pills li {
    padding: 6px 13px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: var(--chip);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.35;
}

.pills {
    margin-bottom: 1.1em;
}

.pills-big li {
    padding: 8px 16px;
    border-color: rgba(var(--mint-rgb), 0.35);
    font-size: 1rem;
    font-weight: 500;
}

.coords {
    font-variant-numeric: tabular-nums;
}

/* ---- hero ---- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 6vw, 76px) 0 clamp(230px, 37vw, 470px);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 70%;
    aspect-ratio: 1;
    background: radial-gradient(closest-side, rgba(var(--teal-rgb), 0.2), rgba(var(--teal-rgb), 0));
    pointer-events: none;
}

.hero-art {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: clamp(270px, 41vw, 520px);
    object-fit: cover;
    object-position: center bottom;
    pointer-events: none;
}

.hero-inner {
    z-index: 1;
}

.hero h1 {
    max-width: 13ch;
    background: var(--title);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--bright);
    -webkit-text-fill-color: transparent;
}

.lead {
    margin-top: 22px;
    max-width: 58ch;
    color: var(--text);
    font-size: clamp(1.08rem, 1.9vw, 1.24rem);
    line-height: 1.55;
}

/* ---- ticker of services ---- */

.ticker {
    display: flex;
    overflow: hidden;
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    background: var(--pit);
}

.ticker-track {
    display: flex;
    flex: none;
    margin: 0;
    padding: 13px 0;
    list-style: none;
    font-family: var(--display);
    font-size: 0.86rem;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-track li {
    display: flex;
    align-items: center;
    color: var(--text);
}

.ticker-track li::after {
    content: "";
    width: 9px;
    height: 8px;
    margin: 0 24px;
    background: var(--wheat-ink);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ---- page heads ---- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 7vw, 84px) 0 clamp(34px, 5vw, 60px);
}

.page-art {
    position: absolute;
    top: -30%;
    right: -18%;
    width: min(1100px, 120%);
    max-width: none;
    height: auto;
    opacity: 0.2;
    pointer-events: none;
}

.page-hero h1 {
    max-width: 16ch;
    font-size: clamp(1.9rem, 5.2vw, 3.5rem);
}

/* ---- sections ---- */

.band {
    position: relative;
    padding: clamp(46px, 8vw, 96px) 0;
}

.band-deep {
    background: var(--deep);
}

.band-tight {
    padding-top: 0;
}

.band h2 {
    margin-bottom: 18px;
}

.band h3,
.band .h3 {
    margin-bottom: 8px;
}

.section-head {
    max-width: 66ch;
    margin-bottom: 30px;
}

.section-head p {
    color: var(--muted);
}

.duo,
.map-grid {
    display: grid;
    gap: 24px;
}

.field {
    position: relative;
    margin: 0 0 clamp(40px, 7vw, 72px);
}

.page-hero .field {
    margin: clamp(30px, 5vw, 48px) 0 0;
}

.band > .wrap > .field:last-child {
    margin-bottom: 0;
}

.field img {
    display: block;
    width: 100%;
    height: clamp(200px, 30vw, 300px);
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px var(--stroke), 0 30px 80px var(--shadow);
    object-fit: cover;
    object-position: 72% center;
}

.field figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--tag);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.35;
}

/* ---- cards ---- */

.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background-color: var(--card);
    transition: border-color 0.3s ease, background-color 0.3s ease, translate 0.3s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 18% auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--mint-rgb), 0), rgba(var(--mint-rgb), 0.75), rgba(var(--mint-rgb), 0));
}

.card:hover {
    border-color: rgba(var(--mint-rgb), 0.45);
    background-color: var(--card-hover);
    translate: 0 -4px;
}

.card-body,
.task {
    padding: clamp(20px, 3vw, 30px);
}

.card h2 {
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
}

.cards,
.bento {
    display: grid;
    gap: 18px;
}

.icon {
    display: block;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    fill: none;
    stroke: var(--mint);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-hi {
    stroke: var(--wheat-ink);
}

.icon-dot {
    fill: var(--bg);
    stroke: var(--wheat-ink);
}

.task ul {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.task li {
    padding: 10px 0;
    border-top: 1px solid var(--stroke);
    color: var(--muted);
}

.task a {
    font-weight: 600;
}

/* the drone card: a plot flown over in parallel lines */

.drone {
    display: grid;
    align-items: center;
}

.drone h3 {
    margin-bottom: 12px;
    font-family: var(--display);
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    letter-spacing: -0.025em;
}

.flight {
    display: block;
    width: 100%;
    height: auto;
    padding: 0 18px 18px;
}

.flight-plot {
    fill: rgba(var(--teal-rgb), 0.1);
    stroke: var(--teal);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.flight-path {
    fill: none;
    stroke: var(--wheat-ink);
    stroke-width: 1.6;
    stroke-dasharray: 2 7;
    stroke-linecap: round;
}

.flight-drone {
    transform: translate(240px, 62px);
}

.flight-drone circle {
    fill: var(--bg);
    stroke: var(--wheat-ink);
    stroke-width: 2;
}

.flight-drone path {
    fill: none;
    stroke: var(--wheat-ink);
    stroke-width: 2;
    stroke-linecap: round;
}

/* ---- figures ---- */

.figures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
    margin: 26px 0 0;
}

.figure {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--stroke);
}

.figure dd {
    margin: 0 0 6px;
    color: var(--wheat-ink);
    font-family: var(--display);
    font-size: clamp(1.9rem, 5vw, 3.3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.figure dt {
    color: var(--muted);
    font-size: 0.97rem;
    line-height: 1.4;
}

/* ---- the projects map ---- */

.band-map {
    background: radial-gradient(90% 70% at 78% 40%, rgba(var(--teal-rgb), 0.16), rgba(var(--teal-rgb), 0) 70%), var(--bg);
}

.band-map h1 {
    max-width: 12ch;
}

.highlights {
    margin: 22px 0 26px;
    padding: 0;
    list-style: none;
}

.highlights li {
    padding: 11px 0;
    border-top: 1px solid var(--stroke);
    color: var(--muted);
}

.highlights strong {
    display: block;
    color: var(--bright);
}

.map-figure {
    margin: 0;
}

.map {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.map-land {
    fill: var(--land);
    stroke: var(--mint);
    stroke-width: 1.2;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(var(--mint-rgb), 0.4));
}

.map-mark > *,
.map-key > * {
    stroke: var(--bg);
    stroke-width: 1.2;
}

.map-plan circle {
    fill: var(--wheat-ink);
}

.map-survey rect {
    fill: var(--mint);
}

.map-design rect {
    fill: var(--coral);
}

.map-office path {
    fill: var(--bright);
}

.map-office .map-office-dot {
    fill: var(--bg);
    stroke: none;
}

.map-office .map-pulse {
    fill: none;
    stroke: var(--bright);
    stroke-width: 1.4;
    opacity: 0.4;
}

.map text {
    display: none;
    fill: var(--label);
    color: var(--label);
    font-family: var(--body);
    font-size: 13px;
    font-weight: 500;
    paint-order: stroke;
    stroke: var(--bg);
    stroke-width: 3.5px;
    stroke-linejoin: round;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.9rem;
}

.map-legend li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.map-key {
    flex: none;
}

/* ---- drawings: line work shown light-on-dark, the original on hover ---- */

.sheet {
    display: block;
    overflow: hidden;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: var(--sheet);
}

.sheet img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
    transition: filter 0.35s ease;
}

.sheet:hover {
    border-color: rgba(var(--mint-rgb), 0.5);
}

.sheet:hover img,
.sheet:focus-visible img,
.sheet-shot img {
    filter: none;
    mix-blend-mode: normal;
}

.sheet-card {
    margin: 0;
}

.sheet-card figcaption {
    margin-top: 12px;
    color: var(--text);
    font-weight: 500;
}

.reel {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 4px max(var(--gutter), calc((100% - 1120px) / 2)) 20px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--gutter), calc((100% - 1120px) / 2));
    scrollbar-color: rgba(var(--mint-rgb), 0.5) transparent;
    scrollbar-width: thin;
}

.reel li {
    flex: 0 0 min(80%, 430px);
    scroll-snap-align: start;
}

.reel:focus-visible {
    outline-offset: -3px;
}

/* ---- services ---- */

.service .sheet {
    margin: 12px 12px 0;
}

.service-accent {
    display: grid;
    align-items: center;
    border-color: rgba(242, 198, 79, 0.4);
    background-image: linear-gradient(140deg, rgba(242, 198, 79, 0.16), rgba(var(--teal-rgb), 0.08));
}

.service-accent::before {
    background: linear-gradient(90deg, rgba(242, 198, 79, 0), rgba(242, 198, 79, 0.8), rgba(242, 198, 79, 0));
}

/* ---- lists with a survey mark ---- */

.marks,
.videos {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.marks li {
    position: relative;
    padding: 6px 0 6px 24px;
}

.marks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.92em;
    width: 11px;
    height: 10px;
    background: var(--mint);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.mini {
    margin: 18px 0 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.videos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.videos a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 12px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.93rem;
    text-decoration: none;
}

.videos a::before {
    content: "";
    width: 9px;
    height: 11px;
    background: var(--coral);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.videos a:hover {
    border-color: var(--coral);
    color: var(--bright);
}

/* ---- projects: a trail of numbered points ---- */

.trail {
    position: relative;
    max-width: 780px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: project;
}

.trail::before,
.trail::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: var(--stroke);
}

.trail::after {
    background: linear-gradient(180deg, var(--teal), var(--leaf) 45%, var(--wheat-ink) 75%, var(--coral));
    transform-origin: top;
}

.trail li {
    position: relative;
    padding: 0 0 30px 66px;
    counter-increment: project;
}

.trail li:last-child {
    padding-bottom: 0;
}

.trail li::before {
    content: counter(project);
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid var(--mint);
    border-radius: 50%;
    background: var(--deep);
    color: var(--bright);
    font-family: var(--display);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.trail h3 {
    margin-bottom: 4px;
    padding-top: 8px;
}

.trail p {
    color: var(--muted);
}

/* ---- about: the years ---- */

.years {
    display: grid;
    gap: 14px;
    margin: 26px 0 28px;
    padding: 0;
    list-style: none;
}

.years li {
    padding: 18px 20px 20px;
    border: 1px solid var(--stroke);
    border-radius: 20px;
    background: var(--card);
    color: var(--muted);
    font-size: 0.97rem;
    line-height: 1.5;
}

.years strong {
    display: block;
    margin-bottom: 8px;
    color: var(--wheat-ink);
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.promise {
    max-width: 30ch;
    margin-top: clamp(34px, 6vw, 60px);
    color: var(--bright);
    font-family: var(--display);
    font-size: clamp(1.2rem, 2.8vw, 1.8rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* ---- call to action: the relief gradient ---- */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(46px, 7vw, 84px) 0;
    background: var(--relief);
    color: var(--night);
}

.cta-band :focus-visible {
    outline-color: var(--night);
}

.cta-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    filter: brightness(0);
    opacity: 0.13;
    pointer-events: none;
}

.cta {
    display: grid;
    gap: 26px;
    align-items: center;
}

.cta h2 {
    margin-bottom: 12px;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.cta p {
    max-width: 56ch;
    font-size: 1.08rem;
    font-weight: 500;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.link-night,
.link-night:hover {
    color: var(--night);
    font-weight: 700;
}

/* ---- contact ---- */

.big-phone-line {
    margin-bottom: 18px;
}

.big-phone {
    color: var(--wheat-ink);
    font-family: var(--display);
    font-size: clamp(1.5rem, 4.6vw, 2.3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-decoration: none;
}

.big-phone:hover {
    color: var(--bright);
}

.contact-list {
    margin: 0 0 28px;
}

.contact-list > div {
    padding: 12px 0;
    border-top: 1px solid var(--stroke);
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-list dd {
    margin: 2px 0 0;
}

.contact-form > div {
    margin-bottom: 16px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid rgba(var(--veil), 0.24);
    border-radius: 14px;
    background: var(--field);
    color: var(--text);
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form ::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    border-color: var(--mint);
    outline: 3px solid rgba(var(--mint-rgb), 0.45);
    outline-offset: 0;
}

.contact-form ul {
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
    color: var(--error);
    font-weight: 500;
}

.form-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-sent {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(var(--mint-rgb), 0.5);
    border-radius: 14px;
    background: rgba(var(--mint-rgb), 0.1);
}

.contact-sent strong {
    display: block;
}

/* ---- footer ---- */

.foot {
    overflow: hidden;
    padding: clamp(40px, 7vw, 72px) 0 22px;
    background: var(--pit);
    color: var(--text);
    font-size: 0.97rem;
}

.foot-grid {
    display: grid;
    gap: 28px;
}

.foot h2 {
    margin-bottom: 8px;
    color: var(--muted);
    font-family: var(--body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0;
}

.foot address {
    margin-bottom: 0.6em;
    font-style: normal;
}

.foot p {
    margin-bottom: 0.6em;
}

.foot-logo {
    width: auto;
    max-width: 100%;
    height: auto;
    margin-bottom: 18px;
}

.foot-name {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.foot-phone {
    color: var(--wheat-ink);
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.foot-small,
.foot-bottom {
    color: var(--muted);
    font-size: 0.875rem;
}

.wordmark {
    max-width: none;
    margin: clamp(26px, 5vw, 50px) 0 0;
    overflow: hidden;
    color: transparent;
    font-family: var(--display);
    font-size: clamp(4.4rem, 21vw, 17rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.86;
    text-align: center;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(var(--veil), 0.2);
    user-select: none;
}

.foot-bottom {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--stroke);
}

/* ---- documents: a carousel. The strip is swiped, scrolled or moved with the keyboard, and every scan
   opens at full size. /js/carousel.js adds the arrows and the markers and the scrollbar is then hidden;
   without the script the scrollbar stays. ---- */

.docs {
    margin-top: clamp(30px, 5vw, 52px);
}

.doc-list {
    display: flex;
    gap: clamp(16px, 2.4vw, 26px);
    margin: 0 -4px;
    padding: 4px 4px 16px;
    overflow-x: auto;
    list-style: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scrollbar-color: rgba(var(--mint-rgb), 0.5) transparent;
    scrollbar-width: thin;
}

.doc-list:focus-visible {
    outline-offset: -3px;
}

.doc-list > li {
    flex: 0 0 min(78%, 400px);
    scroll-snap-align: start;
}

.doc-list a {
    display: block;
}

.doc-list img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--stroke);
    border-radius: 6px;
}

.doc-list p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.doc-list strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.doc-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.875rem;
}

.doc-file span {
    color: var(--muted);
    font-size: 0.92rem;
}

@media (prefers-reduced-motion: no-preference) {
    .doc-list {
        scroll-behavior: smooth;
    }
}

/* The controls that /js/carousel.js adds: arrows beside the heading, one marker per document below. */

.has-carousel-controls {
    position: relative;
}

.has-carousel-controls > :first-child {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 14px;
    padding-right: 110px;
}

.has-carousel-controls > .doc-list {
    padding-bottom: 4px;
    scrollbar-width: none;
}

.has-carousel-controls > .doc-list::-webkit-scrollbar {
    display: none;
}

.carousel-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

.carousel-arrow {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(var(--veil), 0.28);
    border-radius: 50%;
    background: rgba(var(--veil), 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9f1ed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.carousel-prev {
    rotate: 180deg;
}

.carousel-arrow:hover {
    border-color: var(--mint);
    background-color: rgba(var(--mint-rgb), 0.1);
}

.carousel-arrow:focus-visible {
    border-radius: 50%;
}

.carousel-arrow[aria-disabled="true"] {
    opacity: 0.35;
    cursor: default;
}

.carousel-markers {
    display: flex;
    gap: 6px;
    margin: 10px 0 8px;
}

.carousel-markers[hidden],
.carousel-nav[hidden] {
    display: none;
}

.carousel-marker {
    width: 26px;
    height: 24px;
    padding: 0;
    border: 0;
    background: linear-gradient(rgba(var(--veil), 0.4), rgba(var(--veil), 0.4)) center / 100% 4px no-repeat;
    cursor: pointer;
    transition: width 0.25s ease;
}

.carousel-marker[aria-current="true"] {
    width: 52px;
    background-image: linear-gradient(var(--mint), var(--mint));
}

/* ---- lightbox: /js/lightbox.js opens a linked image enlarged over the page, in a <dialog> ---- */

[data-lightbox] {
    cursor: zoom-in;
}

html:has(.lightbox[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 68px 12px 14px;
    border: 0;
    background: rgba(7, 14, 13, 0.95);
    color: var(--text);
    overscroll-behavior: contain;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
}

.lightbox::backdrop {
    background: none;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lightbox-stage img {
    display: block;
    max-width: none;
    border-radius: 4px;
    background: #fff;
}

.lightbox-caption {
    display: grid;
    place-items: center;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0 56px;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: center;
}

.lightbox-button {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lightbox-button:hover {
    border-color: #ffffff;
    background-color: rgba(var(--mint-rgb), 0.16);
}

.lightbox-button:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 3px;
    border-radius: 50%;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lightbox-prev,
.lightbox-next {
    bottom: 14px;
}

.lightbox-prev {
    left: 12px;
    rotate: 180deg;
}

.lightbox-next {
    right: 12px;
}

@media (min-width: 760px) {
    .lightbox {
        padding: 24px 84px 18px;
    }

    .lightbox-caption {
        padding: 0;
    }

    .lightbox-prev,
    .lightbox-next {
        top: calc(50% - 22px);
        bottom: auto;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next,
    .lightbox-close {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.2s ease;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }
}

/* ---- EU project notice: the firm's own document on a white sheet, with its text beside it ---- */

.eu {
    display: grid;
    gap: clamp(22px, 4vw, 44px);
    align-items: start;
}

.eu-doc {
    max-width: 600px;
    margin: 0;
    padding: clamp(10px, 2vw, 18px);
    border-radius: var(--radius);
    background: #fff;
}

.eu-doc img {
    display: block;
    width: 100%;
    height: auto;
}

.eu-text > p {
    max-width: 62ch;
    color: var(--muted);
}

.eu-facts {
    display: grid;
    gap: 4px 20px;
    max-width: 62ch;
    margin: 20px 0 0;
}

.eu-facts dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.eu-facts dd {
    margin: 0 0 10px;
}

@media (min-width: 900px) {
    .eu {
        grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
    }
}

/* ---- light theme: what the colour tokens do not cover ---- */

/* the drawings are black on white already */
:root[data-theme="light"] .sheet img {
    filter: none;
    mix-blend-mode: normal;
}

/* the terrain and the contour lines are drawn for a dark page: deepen them */
:root[data-theme="light"] .hero-art {
    filter: brightness(0.74) saturate(1.5);
}

:root[data-theme="light"] .page-art {
    filter: brightness(0.35);
    opacity: 0.28;
}

:root[data-theme="light"] .carousel-arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310201c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

:root[data-theme="light"] .eu-doc {
    border: 1px solid var(--stroke);
}

/* ---- 404 ---- */

.not-found {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 40px var(--gutter);
}

.not-found > div {
    max-width: 34rem;
}

.not-found h1 {
    margin: 20px 0 14px;
    font-size: clamp(1.7rem, 5.4vw, 2.5rem);
}

.not-found h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.not-found [lang="en"] {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--stroke);
    color: var(--muted);
}

/* ---- phones: a tighter first row, and on the narrowest the mark alone stands for the name ---- */

@media (max-width: 479px) {
    .top-row {
        gap: 8px 8px;
    }

    .brand img {
        height: 30px;
    }

    .lang {
        padding: 2px;
        font-size: 0.76rem;
    }

    .lang a,
    .lang span {
        padding: 6px 7px;
    }

    .call {
        gap: 6px;
        padding: 8px 11px;
        font-size: 0.95rem;
    }
}

@media (max-width: 379px) {
    .brand img {
        width: 36px;
        height: 34px;
        object-fit: cover;
        object-position: left center;
    }
}

/* ---- wider screens ---- */

@media (min-width: 640px) {
    .map text {
        display: block;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .figures {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .years {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foot-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 40px;
    }

    .drone {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }

    .flight {
        padding: 18px 18px 18px 0;
    }
}

@media (min-width: 900px) {
    .bento,
    .cards-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .drone {
        grid-column: 1 / -1;
    }

    .duo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .duo-center {
        align-items: center;
        gap: 56px;
    }

    .map-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
        gap: 48px;
        align-items: center;
    }

    .years {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .cta {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 48px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 1040px) {
    .top-row {
        flex-wrap: nowrap;
        gap: 18px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .brand {
        margin-right: 0;
    }

    .nav {
        flex: 1 1 0;
        justify-content: center;
        order: 1;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .nav a:first-child {
        margin-left: 0;
    }

    .lang {
        order: 2;
    }

    .theme {
        order: 3;
    }

    .call {
        order: 4;
    }

}

/* ---- motion ---- */

@media (prefers-reduced-motion: no-preference) {
    .ticker-track {
        animation: ticker 60s linear infinite;
    }

    .ticker:hover .ticker-track {
        animation-play-state: paused;
    }

    .map-mark {
        transform-box: fill-box;
        transform-origin: center;
        animation: plot 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both;
        animation-delay: calc(var(--i) * 55ms + 300ms);
    }

    .map-place text {
        animation: fade-in 0.4s ease-out both;
        animation-delay: calc(var(--i) * 55ms + 450ms);
    }

    .map-office .map-pulse {
        transform-box: fill-box;
        transform-origin: center;
        animation: ping 2.8s ease-out infinite;
    }

    @supports (offset-path: path("M0 0H1")) {
        .flight-drone {
            transform: none;
            offset-path: path("M74 62H240L256 86H70L66 110H286L290 134H74L82 158H280L272 182H92");
            offset-rotate: 0deg;
            animation: fly 16s linear infinite alternate;
        }
    }

    @supports (animation-timeline: view()) {
        .reveal {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 75%;
        }

        .trail::after {
            animation: grow linear both;
            animation-timeline: view();
            animation-range: cover 8% cover 78%;
        }
    }
}

@keyframes ticker {
    to {
        transform: translateX(-100%);
    }
}

@keyframes plot {
    from {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes ping {
    0% {
        opacity: 0.8;
        transform: scale(0.6);
    }

    70%,
    100% {
        opacity: 0;
        transform: scale(2.6);
    }
}

@keyframes fly {
    from {
        offset-distance: 0%;
    }

    to {
        offset-distance: 100%;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
}

@keyframes grow {
    from {
        transform: scaleY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media print {
    .top,
    .ticker,
    .cta-band,
    .hero-art,
    .page-art,
    .wordmark {
        display: none;
    }
}
