/* Inuvera — one stylesheet for the whole site. */

:root {
  --porcelain: #f2f5f4;   /* page */
  --white: #ffffff;
  --ink: #0c2326;         /* text: deep teal-black */
  --ink-soft: #3e5558;    /* secondary text */
  --teal: #00968f;        /* the logo */
  --teal-text: #00716b;   /* teal that reads as text on porcelain */
  --deep: #072e31;        /* contact band */
  --line: #cbd8d6;

  /* the four disciplines, used only to mark them */
  --design: #2d62e3;
  --develop: #3c8a26;
  --analyse: #7444d0;
  --assure: #d1601a;

  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--teal-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.1; text-wrap: balance; }
h1, h2 { font-variation-settings: "wdth" 78; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--ink); color: var(--white); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 650;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.01em;
}
.brand .logo { width: 34px; height: auto; }
.site-header nav { margin-left: auto; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; }
.header-contact {
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}
.header-contact:hover { background: var(--ink); color: var(--white); }

@media (max-width: 820px) {
  .site-header { flex-wrap: wrap; gap: 12px 20px; }
  .site-header nav { order: 3; width: 100%; margin: 0; }
  .site-header ul { gap: 20px; overflow-x: auto; }
  .header-contact { margin-left: auto; }
}

/* ---------- Shared building blocks ---------- */

main > section { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--gutter); }
main > section + section:not(.contact) { border-top: 1px solid var(--line); }

.section-head { max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); }
.section-head .lead { color: var(--ink); font-size: 1.3rem; line-height: 1.45; font-weight: 550; }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
}
.button:hover { background: var(--teal-text); color: var(--white); }
.text-link { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }

/* A small hexagon in a discipline's colour */
.hex-dot {
  display: inline-block;
  width: 18px;
  height: 20px;
  background: var(--c, var(--teal));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  flex: none;
}

/* ---------- Home: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(32px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(3.75rem, 11vw, 8.5rem);
  line-height: 0.9;
  font-weight: 700;
  font-variation-settings: "wdth" 75;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.hero-sub { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.3; font-weight: 600; color: var(--teal-text); margin-bottom: 12px; }
.hero-body { max-width: 34rem; color: var(--ink-soft); }

.honeycomb { width: 100%; overflow: visible; }
.honeycomb .cell { fill: none; stroke: var(--line); stroke-width: 1.2; }
.honeycomb .cell.lit { fill: var(--c); fill-opacity: 0.14; stroke: var(--c); stroke-opacity: 0.55; }
.honeycomb .link { stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 7; }
.honeycomb .node > polygon { fill: var(--c); }
.honeycomb .node text { fill: var(--ink); font: 600 17px var(--font); text-anchor: middle; }
.honeycomb .hub > polygon { fill: var(--white); stroke: var(--teal); stroke-width: 2; }

/* The one moment of motion: the links light up from the centre, once. */
@media (prefers-reduced-motion: no-preference) {
  .honeycomb .cell.lit { animation: light 0.5s ease-out both; animation-delay: var(--d); }
  .honeycomb .node { animation: light 0.5s ease-out both; animation-delay: var(--d); }
  .honeycomb .link { animation: flow 1.6s ease-out 0.3s both; }
  .honeycomb .hub { animation: rise 0.6s cubic-bezier(.2,.8,.2,1) both; transform-box: fill-box; }
  @keyframes light { from { opacity: 0; } to { opacity: 1; } }
  @keyframes flow { from { opacity: 0; stroke-dashoffset: 90; } to { opacity: 1; stroke-dashoffset: 0; } }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; }
}

/* ---------- Home: disciplines ---------- */

.discipline-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.discipline-row li { padding: 4px 28px 0 0; }
.discipline-row li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.discipline-row h3 { margin: 14px 0 8px; color: var(--c); font-size: 1.6rem; font-variation-settings: "wdth" 80; }
.discipline-row p { color: var(--ink-soft); margin: 0; }

@media (max-width: 820px) {
  .discipline-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .discipline-row li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 480px) {
  .discipline-row { grid-template-columns: 1fr; }
  .discipline-row li, .discipline-row li + li { padding: 0; border-left: 0; }
}

/* ---------- Home: teams ---------- */

.teams { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 64px); }
.teams .section-head { margin: 0; }
.team-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.team-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 650;
  color: var(--c);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c);
  margin-bottom: 16px;
}
.team-group .hex-dot { width: 12px; height: 14px; }
.team-group dl { margin: 0; }
.team-group dt { font-weight: 650; }
.team-group dd { margin: 2px 0 18px; color: var(--ink-soft); font-size: 1rem; }
.team-group dd:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  .teams { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .team-groups { grid-template-columns: 1fr; }
}

/* ---------- Home: products ---------- */

.product-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.product-list li { border-bottom: 1px solid var(--line); }
.product-list a {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: 8px 32px;
  align-items: baseline;
  padding: 26px 0;
  color: var(--ink);
  text-decoration: none;
}
.product-list h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-variation-settings: "wdth" 80; }
.product-list p { margin: 0; color: var(--ink-soft); }
.product-list .platform { font-size: 0.95rem; color: var(--ink-soft); text-align: right; }
.product-list a:hover h3, .product-list a:focus-visible h3 { color: var(--teal-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

@media (max-width: 820px) {
  .product-list a { grid-template-columns: 1fr; }
  .product-list .platform { text-align: left; }
}

/* ---------- Contact band ---------- */

main > section.contact { max-width: none; background: var(--deep); color: var(--white); }
.contact-inner { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.contact h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); font-variation-settings: "wdth" 75; margin-bottom: 20px; max-width: 12em; }
.contact p { color: #bcd3d1; max-width: 36rem; }
.contact-email {
  display: inline-block;
  margin-top: 8px;
  color: var(--white);
  font-size: clamp(1.4rem, 3.4vw, 2.25rem);
  font-weight: 600;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 3px;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: #7fe0d9; }
.contact :focus-visible { outline-color: #7fe0d9; }

/* ---------- Inner pages ---------- */

.page-hero h1, .vision h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.95;
  font-weight: 700;
  font-variation-settings: "wdth" 75;
  max-width: 14em;
  margin-bottom: 28px;
}
.page-hero .hero-body, .vision .hero-body { font-size: 1.2rem; }

.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 40px; }
.service-grid li { border-top: 2px solid var(--teal); padding-top: 16px; }
.service-grid h3 { margin-bottom: 8px; }
.service-grid p { color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .service-grid { grid-template-columns: 1fr; } }

.approach .section-head { max-width: 46rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; left: 28px; right: 28px; border-top: 2px dashed var(--teal); }
.steps li { position: relative; padding-right: 24px; }
.step-hex {
  display: grid;
  place-items: center;
  width: 56px;
  height: 64px;
  margin-top: -4px;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 1.3rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.steps h3 { margin: 18px 0 6px; font-size: 1.5rem; font-variation-settings: "wdth" 80; }
.steps p { color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 28px; bottom: 28px; left: 27px; right: auto; border-top: 0; border-left: 2px dashed var(--teal); }
  .steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; padding: 0; }
  .steps h3 { margin: 4px 0 4px; }
  .steps .step-hex { grid-row: span 2; }
}

.expertise-list, .value-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.expertise-list > div, .value-list > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.expertise-list dt, .value-list dt { font-weight: 650; font-size: 1.2rem; margin-bottom: 4px; }
.expertise-list dd, .value-list dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 680px) { .expertise-list, .value-list { grid-template-columns: 1fr; } }

.beyond h2 { margin-bottom: 16px; }
.beyond > p { max-width: 40rem; color: var(--ink-soft); font-size: 1.2rem; }
.beyond-points { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.beyond-points li { border: 1.5px solid var(--teal); color: var(--teal-text); font-weight: 600; padding: 8px 18px; border-radius: 999px; }

.vision-label { display: block; font-size: 1.1rem; font-weight: 600; font-variation-settings: "wdth" 100; letter-spacing: 0; color: var(--teal-text); margin-bottom: 16px; }
.vision h1 { max-width: 17em; }

.not-found { min-height: 50vh; }

/* ---------- Documents (Query Studio, BeeKeeperUK) ---------- */

.doc { max-width: 46rem; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 112px); }
.doc-wide { max-width: var(--max); }
.doc-wide > :not(.qs-intro) { max-width: 46rem; }
.doc-product { font-weight: 600; color: var(--teal-text); margin-bottom: 12px; }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-variation-settings: "wdth" 75; font-weight: 700; line-height: 1; margin-bottom: 24px; }
.doc h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 48px 0 12px; }
.doc h3 { margin: 28px 0 6px; }
.doc h4 { margin: 24px 0 6px; font-size: 1.1rem; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc .lead { font-size: 1.3rem; line-height: 1.45; }
.doc .small { font-size: 0.95rem; color: var(--ink-soft); }
.qs-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); align-items: center; margin-bottom: 24px; }
.qs-intro img { border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
@media (max-width: 820px) { .qs-intro { grid-template-columns: 1fr; } }
.page-doc .doc > .doc-product + h1 + .lead { margin-top: -8px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
  font-size: 0.95rem;
}
.footer-brand p { color: var(--ink-soft); margin-top: 14px; }
.site-footer h2 { font-size: 0.95rem; font-weight: 650; font-variation-settings: "wdth" 100; letter-spacing: 0; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer ul a { color: var(--ink-soft); text-decoration: none; overflow-wrap: anywhere; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; }
.copyright { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 32px; font-size: 0.9rem; color: var(--ink-soft); }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
