:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f2f4f7;
  --color-text: #1a1d23;
  --color-muted: #6b7280;
  --color-accent: #c2410c;
  --color-dark: #111827;
  --color-black: #000000;
  --header-height: 64px;
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

/* Page transitions (cross-document View Transitions; unsupported browsers just navigate).
   The header stays put; the old page sinks back and dims while the new page wipes up over it. */
@view-transition {
  navigation: auto;
}

.site-header {
  view-transition-name: site-header;
}

::view-transition-group(root) {
  background: var(--color-black);
}

::view-transition-old(root) {
  animation: page-out 0.5s cubic-bezier(0.65, 0, 0.35, 1) both;
}

::view-transition-new(root) {
  animation: page-in 0.7s cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes page-out {
  to {
    opacity: 0.2;
    transform: scale(0.94) translateY(-2%);
  }
}

@keyframes page-in {
  from {
    clip-path: inset(100% 0 0 0);
    transform: translateY(6%);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header - logo left, menu centred, contact + language right */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
}

.logo__svg {
  display: block;
  width: 103px; /* 735 x 200 viewBox at 28px tall */
  height: 28px;
  color: #fff;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav a:hover,
.nav a.is-active,
.nav a[aria-current='page'] {
  color: #fff;
}

.nav a:hover::after,
.nav a.is-active::after,
.nav a[aria-current='page']::after {
  transform: scaleX(1);
}

/* Home link is never highlighted as the current page (no underline, normal color) */
.nav a.nav__home::after {
  display: none;
}

.nav a.nav__home[aria-current='page']:not(:hover) {
  color: rgba(255, 255, 255, 0.7);
}

/* Contact sits in the right-hand button on desktop */
.nav .nav__contact {
  display: none;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch a {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.lang-switch a:hover {
  color: #fff;
}

.lang-switch a[aria-current='true'] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.btn-contact {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-contact:hover {
  background: #9a3412;
}

.nav a:focus-visible,
.lang-switch a:focus-visible,
.btn-contact:focus-visible,
.logo:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Burger icon (three bars, turns into an X when open) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px 8px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Sections */
.section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px dashed #d1d5db;
}

.section > .container {
  width: 100%;
}

.section h1,
.section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.section__label {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--black {
  background: var(--color-black);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.section--black .section__label {
  color: rgba(255, 255, 255, 0.7);
}

/* Hero - "engraved into steel": CNC-style HUD, logo engraved by a tool point */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 48px) 0 96px;
  background: var(--color-black);
  color: #fff;
}

/* Background video, darkened most behind the text (left) and at the bottom */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 45%, rgba(194, 65, 12, 0.18), transparent 70%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 35%);
}

/* Blueprint grid with a soft vignette */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 40% 45%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 40% 45%, #000 25%, transparent 75%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* HUD: crop marks, live coordinates, meta labels */
.hero__hud {
  position: absolute;
  z-index: 2;
  inset: calc(var(--header-height) + 20px) 20px 20px;
  pointer-events: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7280;
}

.hero__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 255, 255, 0.35);
  border-style: solid;
  border-width: 0;
}

.hero__corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hero__corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hero__corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero__corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.hero__readout {
  position: absolute;
  top: 2px;
  left: 30px;
  display: flex;
  gap: 20px;
}

.hero__readout b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: #d1d5db;
}

.hero__meta {
  position: absolute;
  top: 2px;
  right: 30px;
}

.hero__meta--bottom {
  top: auto;
  bottom: 2px;
}

/* The engraved logo */
.hero__mark {
  display: block;
  width: min(100%, 720px, 90vh);
  height: auto;
  margin: 0 0 40px -8px;
  overflow: visible;
}

.hero__outline {
  fill: #fff;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linejoin: round;
}

.hero__spark {
  fill: #fff;
  opacity: 0;
  filter: drop-shadow(0 0 6px #fb923c) drop-shadow(0 0 16px var(--color-accent));
}

.hero__eyebrow {
  margin: 0 0 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero__title {
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero__lead {
  max-width: 52ch;
  margin: 0 0 36px;
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  color: #9ca3af;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.hero .hero__cta {
  display: inline-block;
  padding: 16px 28px;
  font-size: 1rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s;
}

.hero__link:hover {
  border-color: var(--color-accent);
}

.hero__link .icon {
  transition: transform 0.2s;
}

.hero__link:hover .icon {
  transform: translateX(4px);
}

/* Scroll cue: a thin line with a dot running down it */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
}

.hero__scroll span {
  position: absolute;
  top: 0;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: hero-scroll 2s ease-in-out infinite;
}

@keyframes hero-scroll {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(44px); opacity: 0; }
}

/* Intro sequence - only when JS is available (html.js is set in <head>) */
.js .hero .hero__outline {
  fill: rgba(255, 255, 255, 0);
  stroke-dasharray: 3145; /* outline length; the script sets the exact value */
  stroke-dashoffset: 3145;
  filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.6));
  transition: fill 0.9s ease, stroke-opacity 0.9s ease, filter 0.9s ease;
}

.js .hero.is-engraved .hero__outline {
  fill: #fff;
  stroke-opacity: 0;
  filter: none;
}

/* Text rises in right away (independent of the engraving), so the content is visible quickly */
.js .hero .hero__text > *,
.js .hero .hero__scroll {
  animation: hero-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.js .hero .hero__text > :nth-child(2) { animation-delay: 0.08s; }
.js .hero .hero__text > :nth-child(3) { animation-delay: 0.16s; }
.js .hero .hero__text > :nth-child(4) { animation-delay: 0.24s; }
.js .hero .hero__scroll { animation-delay: 0.6s; }

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* Failsafe: if the script never finishes, fill in the logo anyway */
.js .hero:not(.is-engraved) .hero__outline {
  animation: hero-failsafe 0.6s 5s forwards;
}

@keyframes hero-failsafe {
  to {
    fill: #fff;
  }
}

@media (max-width: 767px) {
  .hero__readout span:nth-child(3),
  .hero__meta {
    display: none;
  }

  .hero__readout {
    gap: 12px;
  }

  .hero__mark {
    margin-bottom: 32px;
  }

  .hero__scroll {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll span {
    animation: none;
  }

  .js .hero .hero__outline {
    transition: none;
  }

  .js .hero .hero__text > *,
  .js .hero .hero__scroll {
    animation: none;
  }
}

/* Intro statement (layout484) - pinned, words reveal on scroll */
.layout484 {
  position: relative;
  height: 200vh; /* scroll distance while pinned */
  background: var(--color-bg);
}

.layout484__section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--header-height) 0 0;
}

.layout484__section > .container {
  width: 100%;
}

.layout484__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 16px;
}

.layout484__text {
  grid-column: 3 / 11;
  margin: 0;
  font-size: clamp(1.75rem, 3.7vw, 3.3rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-dark);
}

.layout484__text .word {
  display: inline-block;
  opacity: 0.25;
  will-change: opacity;
}

.text-accent {
  color: var(--color-accent);
}

@media (max-width: 991px) {
  .layout484__text {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layout484 {
    height: auto;
  }

  .layout484__section {
    position: static;
    height: auto;
    padding: 120px 0;
  }

  .layout484__text .word {
    opacity: 1;
  }
}

/* About - engineering drawing look */
.about {
  position: relative;
  overflow: hidden;
  padding: 120px 0;
}

/* Faint blueprint grid, fading out towards the edges */
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.about > .container {
  position: relative;
}

.about__year {
  width: fit-content; /* dimension line matches the year's width */
  max-width: 100%;
  margin-bottom: 72px;
}

/* Ghosted year, filled left-to-right via --fill (0-1) set from JS */
.about__year-text {
  --fill: 0;
  display: block;
  font-size: clamp(6rem, 26vw, 22rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(
    90deg,
    var(--color-accent) calc(var(--fill) * 100%),
    rgba(255, 255, 255, 0.1) calc(var(--fill) * 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
}

/* Technical dimension line |<---- 70+ years ---->| */
.about__dimension {
  position: relative;
  margin-top: 24px;
  height: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.about__dimension::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.about__dimension span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 12px;
  background: var(--color-black);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.about__eyebrow {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.about__title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.about__body {
  font-size: 1.125rem;
  color: #d1d5db;
}

.about__body p {
  margin: 0 0 20px;
}

/* "Read more" link button */
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 14px 24px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-more:hover,
.btn-more:focus-visible {
  background: var(--color-accent);
}

.btn-more:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.btn-more__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s;
}

.btn-more:hover .btn-more__icon {
  transform: translateX(4px);
}

/* Drawing title block - cells grow to fill each row, so no empty cells */
.about__titleblock {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 72px 0 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.about__titleblock > div {
  flex: 1 1 160px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--color-black);
}

.about__titleblock dt {
  margin-bottom: 4px;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
}

.about__titleblock dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  color: #fff;
}

@media (min-width: 992px) {
  .about__grid {
    grid-template-columns: 5fr 6fr;
    gap: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about__year-text {
    --fill: 1;
  }

  .btn-more__icon {
    transition: none;
  }
}

/* Story - stacking full-screen panels (layout354) */
.stack__panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  padding: 112px 0;
  color: #fff;
  background: var(--panel-bg) center / cover no-repeat fixed;
}

/* Darken the image so the text stays readable */
.stack__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 75%);
  pointer-events: none;
}

.stack__panel > .container {
  position: relative;
  width: 100%;
}

.stack__text {
  max-width: 768px;
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 3.0625rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Panel backgrounds (paths are relative to this CSS file) */
/* Backgrounds wait until the section is about one screen away (assets/js/modules/lazy-bg.js) */
.js .stack:not(.is-near) .stack__panel {
  --panel-bg: none;
}

.stack__panel--1 {
  --panel-bg: url('../img/timeline-1.webp');
}

.stack__panel--2 {
  --panel-bg: url('../img/timeline-2.webp');
}

.stack__panel--3 {
  --panel-bg: url('../img/timeline-3.webp');
}

/* Fixed backgrounds are unreliable on touch devices (iOS ignores them) */
@media (hover: none) {
  .stack__panel {
    background-attachment: scroll;
  }
}

/* Stats - counters grid */
.stats {
  padding: 96px 0;
  background: var(--color-dark);
  color: #fff;
}

.stats__header {
  max-width: 640px;
  margin-bottom: 56px;
}

.stats__eyebrow {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.stats__title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stats__intro {
  margin: 0;
  font-size: 1.125rem;
  color: #9ca3af;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px; /* gap + grid background draw the divider lines */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(20px, 4vw, 56px);
  background: var(--color-dark);
  transition: background-color 0.2s;
}

.stats__item:hover {
  background: #1a2130;
}

.stats__icon {
  width: 16px;
  height: 16px;
  margin-bottom: 24px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stats__value {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 32px;
  line-height: 1;
}

.stats__number {
  font-size: clamp(1.75rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.stats__unit {
  padding-bottom: 0.25em;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--color-accent);
}

.stats__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ca3af;
}

.stats__label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Services - scroll-driven tabs (overview_component).
   Mobile: stacked list. Desktop (992px+): pinned, one step per service. */
.services {
  background: var(--color-black);
  color: #fff;
}

.services__content {
  padding: 96px 16px;
}

.services__tabs,
.services__visual,
.services__glow {
  display: none;
}

.services__items {
  display: flex;
  flex-direction: column;
  gap: 5em;
}

.services__item-title {
  margin: 0 0 24px;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.services__subtitle {
  margin: 0;
  padding-bottom: 1.3em;
}

.services__text {
  max-width: 25em;
  margin: 0;
  color: #9ca3af;
}

.services__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.services__more-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.services__more:hover .services__more-icon {
  transform: translateX(4px);
}

.services__mobile-img {
  position: relative;
  margin-top: 2em;
  padding-top: 100%;
  border-radius: 0.25rem;
  overflow: hidden;
}

.services__mobile-img img,
.services__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 992px) {
  .services__track {
    --count: 6; /* set from JS to the number of services */
    position: relative;
    height: calc(100vh + var(--count) * 80vh); /* 80vh of scroll per step */
  }

  .services__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
  }

  .services__content {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-height) + 3rem) 3rem 3rem;
  }

  /* Faint blurred copy of the active image behind the text */
  .services__glow {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 90%;
    height: 85%;
    object-fit: cover;
    filter: blur(50px);
    opacity: 0.15;
  }

  .services__tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .services__tab {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .services__tab:hover,
  .services__tab.is-active {
    opacity: 1;
  }

  .services__tab:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
  }

  .services__tab-text {
    font-size: clamp(2rem, 5.3vh, 3rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
  }

  /* Progress line under the active tab, width set from JS */
  .services__tab-line {
    width: 0;
    height: 3px;
    margin-top: 3px;
    background: #fff;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .services__tab.is-active .services__tab-line {
    opacity: 1;
  }

  .services__items {
    position: relative;
    display: block;
  }

  .services__item {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 27em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  .services__item.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  .services__item-title,
  .services__mobile-img {
    display: none;
  }

  .services__visual {
    display: block;
    position: relative;
    overflow: hidden;
  }

  .services__media {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .services__media.is-active {
    opacity: 1;
  }

  .services__media img {
    transform: scale(1.2); /* eased to 1 from JS while the step is active */
  }

  .services__counter {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
    margin: 0;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  }
}

/* Benefits - sticky heading left, numbered list right */
.benefits {
  padding: 96px 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.benefits__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.benefits__eyebrow {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.benefits__heading {
  max-width: 14ch;
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.benefits__lead {
  max-width: 34ch;
  margin: 0 0 32px;
  font-size: 1.125rem;
  color: var(--color-muted);
}

.benefits__intro .btn-contact {
  display: inline-block;
}

.benefits__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #e5e7eb;
}

.benefits__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 40px 0;
  border-top: 1px solid #e5e7eb;
}

.benefits__number {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  line-height: 2.2;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.benefits__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.benefits__text {
  max-width: 48ch;
  margin: 0;
  font-size: 1.0625rem;
  color: var(--color-muted);
}

@media (min-width: 992px) {
  .benefits {
    padding: 144px 0;
  }

  .benefits__grid {
    grid-template-columns: 5fr 7fr;
    gap: 96px;
    align-items: start;
  }

  /* Heading stays in view while the list scrolls past */
  .benefits__intro {
    position: sticky;
    top: calc(var(--header-height) + 48px);
  }

  .benefits__item {
    grid-template-columns: 96px 1fr;
    padding: 48px 0;
  }
}

/* Contact - bento grid of cards */
.contact {
  padding: 96px 0;
  background: var(--color-black);
  color: #fff;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-width: 0;
  padding: 32px;
  border-radius: 4px;
  background: #222;
}

.contact__card p {
  margin: 0;
  color: #d1d5db;
}

.contact__card--light {
  background: #fff;
  color: var(--color-black);
}

.contact__card--light .contact__lead {
  color: var(--color-muted);
}

.contact__title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.25rem, 4.2vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.contact__heading {
  margin: 0 0 12px;
  font-size: 1.5625rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: #fff;
  color: var(--color-black);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.contact-form__input {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: #222;
  color: #fff;
  font: inherit;
  line-height: 1.6;
}

.contact-form__input::placeholder {
  color: #9ca3af;
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form__input--textarea {
  min-height: 140px;
  padding: 12px 16px;
  resize: vertical;
}

.contact-form__field {
  width: 100%;
}

.contact-form__input[aria-invalid='true'] {
  border-color: #f87171;
}

.contact-form__error {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #fca5a5;
}

.contact-form__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #9ca3af;
  cursor: pointer;
}

/* Custom checkbox: transparent with the same border as the text inputs, orange tick when checked */
.contact-form__consent input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.contact-form__consent input::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--color-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.contact-form__consent input:checked::after {
  transform: rotate(45deg) scale(1);
}

.contact-form__consent input:hover,
.contact-form__consent input:checked {
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-form__consent input:focus-visible {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form__consent input[aria-invalid='true'] {
  border-color: #f87171;
}

/* Honeypot: off-screen rather than display:none, so naive bots still fill it */
.contact-form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-form__status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.875rem;
}

.contact-form__status[data-type='success'] {
  color: #86efac;
}

.contact-form__status[data-type='error'] {
  color: #fca5a5;
}

.contact-form__status[data-type='pending'] {
  color: #9ca3af;
}

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

@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__card {
    min-height: 360px;
  }
}

@media (min-width: 992px) {
  .contact__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact__card {
    min-height: 480px;
  }
}

/* CTA band - orange call-to-action strip (homepage + subpages) */
.cta-band {
  padding: 80px 0;
  background: var(--color-accent);
  color: #fff;
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-band__title {
  max-width: 22ch;
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cta-band p {
  max-width: 56ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-black);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s;
}

.btn-light:hover {
  transform: translateY(-2px);
}

.btn-light:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.btn-light svg,
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  background: var(--color-black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  color: #9ca3af;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer p {
  margin: 0;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer__nav a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__nav a:hover {
  color: var(--color-accent);
}

/* Quick-contact block is part of the mobile menu only */
.nav__extra {
  display: none;
}

/* Mobile / tablet header: logo left, language + burger right.
   The menu is a full-screen overlay that opens as a circle from the burger button. */
@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .nav-toggle {
    display: block;
  }

  .header-actions .btn-contact {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  /* Overlay: behind the header's logo and buttons (z-index -1 inside the header), covers the screen */
  .nav {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: calc(var(--header-height) + 32px) 24px 32px;
    overflow-y: auto;
    counter-reset: menu;
    background:
      linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
      linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
      var(--color-black);
    clip-path: circle(0 at calc(100% - 36px) 32px);
    visibility: hidden;
    transition: clip-path 0.6s cubic-bezier(0.7, 0, 0.3, 1), visibility 0s 0.6s;
  }

  .nav.is-open {
    clip-path: circle(150% at calc(100% - 36px) 32px);
    visibility: visible;
    transition: clip-path 0.6s cubic-bezier(0.7, 0, 0.3, 1), visibility 0s;
  }

  /* Menu items: large, numbered, separated by thin lines; rise in one after another */
  .nav > a {
    counter-increment: menu;
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.75);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s, transform 0.4s, color 0.2s;
  }

  .nav > a::before {
    content: counter(menu, decimal-leading-zero);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
  }

  .nav > a::after {
    display: none;
  }

  /* On desktop Contact lives in the header button; in this menu it is a normal item */
  .nav > a.nav__contact {
    display: flex;
  }

  .nav > a[aria-current='page'],
  .nav > a:hover {
    color: #fff;
  }

  .nav > a[aria-current='page']::before {
    color: var(--color-accent);
  }

  /* Home is highlighted like any other page in this menu */
  .nav a.nav__home[aria-current='page']:not(:hover) {
    color: #fff;
  }

  .nav.is-open > a,
  .nav.is-open .nav__extra {
    opacity: 1;
    transform: none;
  }

  .nav.is-open > a:nth-of-type(1) { transition-delay: 0.20s; }
  .nav.is-open > a:nth-of-type(2) { transition-delay: 0.25s; }
  .nav.is-open > a:nth-of-type(3) { transition-delay: 0.30s; }
  .nav.is-open > a:nth-of-type(4) { transition-delay: 0.35s; }
  .nav.is-open > a:nth-of-type(5) { transition-delay: 0.40s; }

  /* Quick contact at the bottom */
  .nav__extra {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 32px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s 0.45s, transform 0.4s 0.45s;
  }

  .nav .nav__extra-link {
    padding: 4px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9375rem;
    color: #d1d5db;
  }

  .nav .nav__extra-link::after {
    display: none;
  }

  .nav .nav__cta {
    display: block;
    margin-top: 20px;
    padding: 16px 24px;
    color: #fff;
    font-size: 1rem;
    text-align: center;
  }

  .nav .nav__cta::after {
    display: none;
  }

  /* Page behind the open menu does not scroll */
  html.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .nav,
  .nav.is-open,
  .nav > a,
  .nav__extra {
    transition: none;
  }
}
