:root {
  color-scheme: light;
  --ink: #142c40;
  --muted: #405b70;
  --brand: #00649e;
  --line: #d8e4ed;
  --paper: #f1f6fa;
  --navy: #081e32;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 3px solid #0085c9;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.frame {
  width: min(1160px, calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  transform: translateY(-150%);
  padding: 12px;
  background: #fff;
  z-index: 2;
}
.skip-link:focus {
  transform: none;
}
.header {
  border-bottom: 1px solid var(--line);
}
.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.header-inner {
  min-height: 88px;
}
.logo {
  display: block;
  width: clamp(145px, 20vw, 218px);
  height: auto;
}
.navigation {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.8vw, 45px);
}
.navigation a,
.footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 9px;
  font-size: 0.92rem;
  font-weight: 650;
}
.navigation a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.navigation .contact-link {
  padding: 9px 14px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
}
.navigation .contact-link:hover {
  background: var(--navy);
  color: #fff;
}

.hero {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  color: #fff;
  background: #102b43;
}
.hero-images,
.hero-image,
.hero-images::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-images {
  z-index: -1;
  overflow: hidden;
  container-type: size;
}
.hero-image {
  object-fit: cover;
  object-position: center 53%;
  opacity: 0;
  transition: opacity 650ms ease;
}
.hero-image.is-active {
  opacity: 1;
}
.hero-image[data-service="tachografy"] {
  /* Fit the remaining 85% × 88% of the 807 × 605 photo to the banner. */
  --crop-ratio: calc(807 * 0.85 / (605 * 0.88));
  --crop-width: max(100cqw, calc(100cqh * var(--crop-ratio)));
  --crop-height: calc(var(--crop-width) / var(--crop-ratio));
  width: calc(var(--crop-width) / 0.85);
  height: calc(var(--crop-height) / 0.88);
  left: calc(
    (100cqw - var(--crop-width)) * 0.68 - var(--crop-width) / 0.85 * 0.1
  );
  top: calc(
    (100cqh - var(--crop-height)) * 0.2 - var(--crop-height) / 0.88 * 0.12
  );
  clip-path: inset(12% 5% 0 10%);
  filter: brightness(0.88) saturate(0.82);
}
.hero-images::after {
  content: "";
  background: linear-gradient(
    90deg,
    rgba(5, 24, 41, 0.96),
    rgba(8, 31, 52, 0.72) 44%,
    rgba(8, 31, 52, 0.16) 85%
  );
}
.hero-inner {
  position: relative;
  min-height: 492px;
  display: flex;
  align-items: center;
  padding-block: 55px 135px;
}
.hero-copy {
  max-width: 580px;
}
.hero-titles {
  display: grid;
}
.hero-titles > * {
  grid-area: 1 / 1;
  font-size: clamp(2.55rem, 5.15vw, 4.75rem);
  font-weight: 690;
  line-height: 1.01;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.hero-titles > span {
  visibility: hidden;
}
.hero-titles > h1[data-service="tachografy"] {
  padding-block-start: 1lh;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding: 13px 16px;
  border: 1px solid #fff;
  font-size: 0.92rem;
  font-weight: 700;
}
.hero-link::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: calc((100% - 100cqw) / 2);
  z-index: 1;
}
.hero-link:hover {
  background: #fff;
  color: var(--navy);
}
.hero-link:focus-visible,
.hero-controls button:focus-visible {
  outline-color: #b8e4ff;
}
.hero-controls {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 49px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  background: rgba(5, 24, 41, 0.58);
  color: #fff;
  cursor: pointer;
}
.hero-controls button:hover {
  background: #fff;
  color: var(--navy);
}
.hero-controls .slide-indicator {
  width: 27px;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
}
.slide-indicator span {
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 50%;
}
.slide-indicator[aria-current="true"] span,
.slide-indicator:hover span {
  background: #fff;
}
.hero-controls .slide-indicator:hover {
  background: rgba(5, 24, 41, 0.58);
}
.image-caption {
  position: absolute;
  right: 0;
  bottom: 49px;
  padding: 3px 7px;
  background: rgba(5, 24, 41, 0.78);
  color: #fff;
  font-size: 0.72rem;
}

.quick-navigation {
  position: relative;
  margin-top: -34px;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 47, 74, 0.13);
  border: 1px solid var(--line);
}
.quick-links li + li {
  border-left: 1px solid var(--line);
}
.quick-links a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 13px 23px;
  color: var(--ink);
  font-weight: 720;
}
.quick-links a:hover {
  background: var(--paper);
  color: var(--brand);
}
.quick-icon,
.quick-arrow {
  color: var(--brand);
}

.services {
  padding-block: 61px 72px;
  scroll-margin-top: 20px;
}
h2 {
  margin-bottom: 22px;
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.service {
  scroll-margin-top: 20px;
  padding: 25px 27px 29px;
  border-top: 3px solid var(--brand);
  background: var(--paper);
}
.service:target {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.service h3 {
  max-width: 33ch;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.service p {
  max-width: 50ch;
  margin-top: 11px;
  color: var(--muted);
  line-height: 1.55;
}

.service-detail {
  padding-block: clamp(32px, 6vw, 72px);
}
.service-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--brand);
  font-weight: 700;
}
.service-back:hover {
  text-decoration: underline;
}
.service-detail h1 {
  max-width: 24ch;
  margin-bottom: 28px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.service-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 24px;
}
.service-detail-copy {
  padding: 24px;
  border-top: 3px solid var(--brand);
  background: var(--paper);
  font-size: 1.12rem;
  line-height: 1.6;
}
.service-detail figure {
  margin: 0;
}
.service-detail img {
  display: block;
  width: 100%;
  height: auto;
}
.service-detail figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.service-detail-sections {
  display: grid;
  gap: clamp(28px, 5vw, 48px);
  max-width: 78ch;
  margin-top: clamp(32px, 6vw, 64px);
  line-height: 1.65;
}
.service-detail-sections h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}
.service-detail-sections h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}
.service-detail-sections p + h3 {
  margin-top: 24px;
}
.service-detail-sections ol,
.service-detail-sections ul {
  margin: 12px 0;
  padding-inline-start: 1.5rem;
}
.service-detail-sections li + li,
.service-detail-sections p + p {
  margin-top: 8px;
}
.service-detail-sections a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.service-detail-authorization {
  padding: clamp(18px, 4vw, 28px);
  border-inline-start: 3px solid var(--brand);
  background: var(--paper);
}

.contact {
  padding-block: 50px 56px;
  scroll-margin-top: 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.contact-grid h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.contact-grid address {
  font-style: normal;
  line-height: 1.6;
}
.contact-grid p {
  margin-top: 8px;
  color: var(--muted);
}
.contact-grid p + h3,
.contact-grid ul + h3 {
  margin-top: 24px;
}
.contact-grid a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.contact-grid ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}

.footer {
  background: var(--navy);
  color: #fff;
}
.footer-inner {
  min-height: 79px;
}
.footer p {
  font-size: 0.92rem;
  font-weight: 700;
}
.footer a {
  color: #d9eaf7;
}
.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 800px) {
  .frame {
    width: min(640px, calc(100% - 48px));
  }
  .header-inner {
    min-height: 72px;
  }
  .hero-inner {
    min-height: 440px;
    padding-block: 46px 120px;
  }
  .hero-copy {
    max-width: 390px;
  }
  .hero-image {
    object-position: 58% center;
  }
  .quick-links a {
    gap: 11px;
    padding-inline: 14px;
  }
  .service-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .frame {
    width: calc(100% - 36px);
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 7px;
    padding-block: 13px;
  }
  .navigation {
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .navigation a {
    gap: 4px;
    font-size: 0.8rem;
  }
  .hero-image {
    object-position: 68% center;
  }
  .hero-images::after {
    background: linear-gradient(
      90deg,
      rgba(5, 24, 41, 0.93),
      rgba(8, 31, 52, 0.68)
    );
  }
  .hero-inner {
    min-height: 420px;
  }
  .image-caption {
    bottom: 94px;
  }
  .hero-titles > * {
    font-size: clamp(2.18rem, 9.4vw, 2.55rem);
  }
  .quick-links,
  .service-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .quick-links li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .quick-links a {
    min-height: 60px;
    padding-inline: 14px;
    font-size: 0.92rem;
  }
  .services {
    padding-block: 44px 50px;
  }
  .contact {
    padding-block: 36px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-image {
    transition: none;
  }
}

.hero-controls button:disabled {
  opacity: 0.5;
  cursor: default;
}
[hidden] {
  display: none !important;
}
