:root {
  --ink: #172036;
  --ink-soft: #4d566b;
  --paper: #ffffff;
  --rule: #dde1e8;
  --focus: #2b59ff;

  /* Annotation categories — each service line keeps its colour everywhere. */
  --product: #a9dbff;
  --product-ink: #0a539b;
  --dataset: #ffe45c;
  --dataset-ink: #7a5d00;
  --workflow: #a4eccb;
  --workflow-ink: #0c6b44;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 34rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01" on;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.875rem;
  z-index: 10;
}
.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.9375rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px;
}
.lang button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- annotation spans ---------- */

.ann {
  --hl: var(--product);
  --tag: var(--product-ink);
  --band: 78%;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-size: 100% var(--band);
  background-position: 0 62%;
  border-radius: 0.1em;
  padding: 0 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ann[data-kind="dataset"] {
  --hl: var(--dataset);
  --tag: var(--dataset-ink);
}
.ann[data-kind="workflow"] {
  --hl: var(--workflow);
  --tag: var(--workflow-ink);
}

.tag {
  --tag: var(--product-ink);
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--tag);
  background: var(--paper);
  border: 1.5px solid currentColor;
  border-radius: 0.3rem;
  padding: 0.3em 0.45em 0.32em;
  white-space: nowrap;
}
.tag[data-kind="dataset"] {
  --tag: var(--dataset-ink);
}
.tag[data-kind="workflow"] {
  --tag: var(--workflow-ink);
}

/* tags that sit inside a highlighted span */
.ann > .tag {
  /* inline (not inline-block) so the tag never wraps away from its last word */
  display: inline;
  font-size: max(0.22em, 0.75rem);
  vertical-align: 0.42em;
  margin-left: 0.3em;
  border-width: 0.1rem;
}

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

.hero {
  padding-block: clamp(3rem, 10vw, 8rem) clamp(3.5rem, 9vw, 7rem);
}

.hero h1 {
  margin: 0;
  max-width: 15em;
  font-size: clamp(2.125rem, 6.6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
  hyphens: manual;
}

.hero .lede {
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  max-width: var(--measure);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  border-radius: 0.5rem;
  border: 2px solid var(--ink);
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: #26314f;
  border-color: #26314f;
}
.btn-ghost:hover {
  background: #f1f3f7;
}

/* one orchestrated moment: the headline gets annotated on load */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .ann {
    background-size: 0% var(--band);
    animation: mark 0.55s cubic-bezier(0.6, 0, 0.2, 1) forwards;
    animation-delay: calc(0.35s + var(--i) * 0.45s);
  }
  .js .hero .ann > .tag {
    opacity: 0;
    transform: translateY(0.15em);
    animation: tag-in 0.3s ease-out forwards;
    animation-delay: calc(0.8s + var(--i) * 0.45s);
  }
}

@keyframes mark {
  to {
    background-size: 100% var(--band);
  }
}
@keyframes tag-in {
  to {
    opacity: 1;
    transform: none;
  }
}

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

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--rule);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* services */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  padding-top: 1.25rem;
  border-top: 0.375rem solid var(--hl, var(--product));
}
.service[data-kind="dataset"] {
  --hl: var(--dataset);
}
.service[data-kind="workflow"] {
  --hl: var(--workflow);
}

.service h3 {
  margin: 1rem 0 0.625rem;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.service p {
  margin: 0;
  color: var(--ink-soft);
}
.service ul {
  margin: 1.125rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.96875rem;
}
.service li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule);
}

/* work — each product is a labelled record */

.records {
  border-top: 2px solid var(--ink);
}

.record {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 1.5rem clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
}

.record h3 {
  margin: 0;
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.record .status {
  margin: 0.5rem 0 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.record .status a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 0.25em;
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
}

.record .what {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.5;
}

.fields {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.fields dt {
  font-size: 0.9375rem;
  font-weight: 700;
}
.fields dd {
  margin: 0.25rem 0 0;
  max-width: 38rem;
  color: var(--ink-soft);
}

/* contact */

.contact {
  padding-block: clamp(4rem, 10vw, 8rem);
}
.contact h2 {
  max-width: 18em;
}
.contact .mail {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
  background-image: linear-gradient(var(--dataset), var(--dataset));
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 88%;
  overflow-wrap: anywhere;
}
.contact .mail:hover {
  background-size: 100% 100%;
}
.contact .facts {
  margin: 2rem 0 0;
  color: var(--ink-soft);
}

/* footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem 2.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer p {
  margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 62rem) {
  .services {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
  }
}

@media (max-width: 46rem) {
  .site-nav .nav-link {
    display: none;
  }

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