:root {
  --paper: #f8faf9;
  --wash: #edf3f2;
  --ink: #101a2c;
  --muted: #3e525a;
  --teal: #245650;
  --navy: #101a2c;
  --white: #ffffff;
  --line: #cbd8d9;
  --font: "Segoe UI", Arial, sans-serif;
  --font-heading: var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--font);
}

main { flex: 1; }
main [id] { scroll-margin-block-start: 1.25rem; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
p, h1, h2, h3, figure, ul, ol { margin: 0; }

h1, h2, h3 {
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
}

h1 { font-size: clamp(2.35rem, 5vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.025em; }
h3 { font-size: 1.45rem; }

.wrap { width: min(100% - 3.5rem, 70rem); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .55rem 1rem;
  background: var(--paper);
  color: var(--navy);
  transform: translateY(-200%);
}

.skip:focus { transform: translateY(0); }

.site-header { color: var(--white); background: var(--navy); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
  padding-top: .25rem;
}

.brand {
  display: block;
  justify-self: start;
  width: 6.5rem;
  margin-block: .6rem;
  border-radius: 6px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.primary-nav, .language-nav { display: flex; align-items: center; }
.primary-nav {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0 .3rem;
  padding-block: .3rem .55rem;
  border-top: 1px solid rgb(255 255 255 / 24%);
}

.primary-nav a, .language-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 3px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a { padding: .45rem .72rem; }
.primary-nav a:hover, .language-nav a:hover { background: rgb(255 255 255 / 12%); }
.primary-nav a[aria-current] { background: var(--white); color: var(--navy); }
.primary-nav a[aria-current]:focus-visible { outline-color: var(--white); }
.primary-nav .nav-contact { margin-inline-start: auto; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 42%); }

.language-nav { grid-column: 2; grid-row: 1; gap: .25rem; }
.language-nav a { position: relative; width: 44px; justify-content: center; }
.language-nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 10px 3px;
  border-bottom: 2px solid var(--white);
}

.language-nav img { display: block; width: 24px; height: auto; }

.hero-inner {
  padding-block: clamp(2.75rem, 8vh, 5rem);
  text-align: center;
}

.hero-copy h1 { font-size: clamp(3.5rem, 9vw, 6rem); }
.hero-copy .intro { margin-inline: auto; }

.intro, .contact-copy {
  max-width: 58ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  margin-top: 1.4rem;
}

.button, .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

.button {
  padding: .65rem 1rem;
  border-radius: 3px;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
}

.button:hover { background: var(--navy); }
.button:focus-visible { outline-color: var(--teal); }
.text-link { color: var(--teal); }
.text-link:hover { color: var(--navy); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.6rem;
}

.service-card, .workflow, .reference-card {
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--wash);
}

.service-card p, .steps p { margin-top: .45rem; color: var(--muted); }

.home-services {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(2rem, 6vh, 3.5rem) auto 0;
}

@media (min-width: 721px) {
  .home-services {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 46.25rem;
  }

  .home-services .home-card { grid-column: span 2; }
  .home-services .home-card[href="#quality-ai"] {
    grid-column: 2 / 4;
    grid-row: 2;
  }
}

.home-card {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .55rem;
  min-height: 9rem;
  text-decoration: none;
}

.home-card-mark {
  display: block;
  width: 4rem;
  height: 4rem;
}

.home-card-mark path { opacity: 0; }
.home-card[href="#quality"] .home-card-mark path:nth-child(1),
.home-card[href="#ai"] .home-card-mark path:nth-child(2),
.home-card[href="#quality-ai"] .home-card-mark path:nth-child(3),
.home-card:is(:hover, :focus-visible) .home-card-mark path { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .home-card:is(:hover, :focus-visible) .home-card-mark {
    animation: sigra-mark-turn 1.35s ease-in-out;
  }

  .home-card:is(:hover, :focus-visible) .home-card-mark path {
    animation: sigra-arc-reveal .38s .3s both;
  }

  .home-card:not([href="#ai"]):is(:hover, :focus-visible) .home-card-mark path:nth-child(2),
  .home-card[href="#ai"]:is(:hover, :focus-visible) .home-card-mark path:nth-child(3) {
    animation-delay: .58s;
  }

  .home-card[href="#quality"]:is(:hover, :focus-visible) path:nth-child(1),
  .home-card[href="#ai"]:is(:hover, :focus-visible) path:nth-child(2),
  .home-card[href="#quality-ai"]:is(:hover, :focus-visible) path:nth-child(3) {
    animation: none;
  }

  @keyframes sigra-mark-turn {
    to { transform: rotate(1turn); }
  }

  @keyframes sigra-arc-reveal {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

.hero {
  background: linear-gradient(160deg, var(--white), var(--wash));
  border-bottom: 1px solid var(--line);
}

.home-card {
  border-radius: 12px;
  border-top: 5px solid var(--category-color);
  background: var(--white);
}

.home-card h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.home-card:hover { background: var(--paper); }
.services .service-grid { grid-template-columns: 1fr; }
.services article { border-inline-start: 5px solid var(--category-color); }

.service-grid > :nth-child(1) { --category-color: #80a90e; }
.service-grid > :nth-child(2) { --category-color: #78939a; }
.service-grid > :nth-child(3) { --category-color: var(--teal); }

.back-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.4rem;
  padding: .4rem .85rem;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  font-weight: 650;
  text-decoration: none;
}

.back-top:hover { background: var(--teal); color: var(--white); }
.section > .back-top { grid-column: 1 / -1; justify-self: start; }
.about > .back-top { margin-inline-start: max(1rem, calc((100% - 70rem) / 2)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.home-card:hover h2 { text-decoration: underline; }
.service-card ul, .steps { padding-inline-start: 1.25rem; }
.service-card ul, .steps { margin-top: 1.1rem; }
.service-card li + li { margin-top: .35rem; }
.service-card li::marker, .steps li::marker { color: var(--teal); }

.approach, .about-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.steps li + li { margin-top: 1rem; }
.steps li { padding-inline-start: .35rem; }
.steps li::marker { font-weight: 700; }

.workflow figcaption { margin-bottom: .85rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.workflow-label { display: block; color: var(--muted); font-size: .9rem; }
.workflow figcaption strong { color: var(--navy); font-size: 1.25rem; }
.workflow ol { padding-inline-start: 1.25rem; }
.workflow li { padding-inline-start: .35rem; }
.workflow li + li { margin-top: .85rem; }
.workflow li::marker { color: var(--teal); font-weight: 700; }
.workflow li p { margin-top: .15rem; color: var(--muted); }

.about-copy, .profile-copy, .contact-note { color: var(--muted); }
.about-copy, .profile-copy { font-size: 1.06rem; }
.about-copy p + p, .profile-copy p { margin-top: .85rem; }
.profile-copy { max-width: 68ch; }
.profile-copy h3 { margin-top: 1.6rem; }

.reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.reference-card { color: var(--muted); }
.reference-card blockquote { margin: 0; }
.reference-card figcaption { margin-top: .75rem; color: var(--ink); font-weight: 600; }
.contact-note { margin-top: .8rem; font-size: .94rem; }
.contact > .button { margin-top: 1.25rem; }

.footer { border-top: 1px solid var(--line); color: var(--muted); background: var(--wash); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  min-height: 3.75rem;
  padding-block: .55rem;
  font-size: .92rem;
}
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal); }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .brand { width: 5.75rem; }
  .primary-nav { gap: 0 .2rem; }
  .primary-nav a { padding-inline: .55rem; }
  .primary-nav .nav-contact { margin-inline-start: 0; }
  .service-grid, .home-services, .approach, .about-inner { grid-template-columns: 1fr; }
}

@media (forced-colors: active) {
  .primary-nav a[aria-current] { outline: 1px solid currentColor; outline-offset: -1px; }
  .primary-nav a[aria-current]:focus-visible { outline-width: 2px; }
  .button { border: 1px solid currentColor; }
}
