/* ==========================================================================
   Katalyst Nord: site stylesheet
   Typeface: Raleway (self-hosted, variable). Colours come from the logo
   (indigo and teal) and the brand kit (charcoal and grey).
   ========================================================================== */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/raleway-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Typography ---------------------------------------------------------- */
  --font-display: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Raleway", "Helvetica Neue", Arial, sans-serif;

  /* Colour -------------------------------------------------------------- */
  --bg: #ffffff;
  --bg-alt: #f3f4f9;
  --ink: #211186;          /* headings: logo indigo */
  --body: #2a2b2d;         /* paragraphs: brand charcoal */
  --muted: #5a5f66;        /* secondary text, 6:1 on white */
  --line: #dcdee6;
  --teal: #1e9db4;         /* logo teal: large type and decoration only */
  --teal-text: #15768a;    /* teal safe for small text and links (5.3:1 on white, 4.8:1 on the grey band) */
  --btn: #211186;
  --btn-ink: #ffffff;

  /* Layout -------------------------------------------------------------- */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 8vw, 128px);
  --radius: 2px;
}

/* Reset -------------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal-text); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); letter-spacing: -0.025em; line-height: 1.06; }
h2 { font-size: clamp(2rem, 3.8vw, 3.35rem); }
h3 { font-size: clamp(1.25rem, 1.7vw, 1.55rem); font-weight: 700; line-height: 1.3; }
p  { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 14px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Layout ------------------------------------------------------------------*/
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 5vw, 80px); }
.section--alt { background: var(--bg-alt); }
.measure { max-width: 62ch; }
.lede-copy p { font-size: clamp(1.05rem, 1.35vw, 1.25rem); }
h2 + .lede-copy { margin-top: clamp(22px, 2.6vw, 38px); }
.lede-wide { max-width: none; }
.lede-wide p { font-size: clamp(1.15rem, 1.7vw, 1.5rem); text-wrap: balance; }  /* same size as .hero__sub */

/* Header ------------------------------------------------------------------*/
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transform: translateY(0);
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.site-header.is-hidden { transform: translateY(-100%); }
/* main clears the fixed header */
body { padding-top: var(--header-h, 88px); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: clamp(12px, 1.4vw, 18px);
}
.brand { display: inline-block; line-height: 0; }
.brand img { height: clamp(42px, 4.6vw, 58px); width: auto; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s ease;
}
.nav a:hover { border-bottom-color: var(--teal); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 10px 0;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle span { display: block; width: 32px; height: 2px; background: currentColor; }
.nav-toggle span + span { margin-top: 8px; }

/* Buttons -----------------------------------------------------------------*/
.btn {
  display: inline-block;
  background: var(--btn);
  color: var(--btn-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 34px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: #17095f; }
.btn:active { transform: translateY(1px); }

.text-link {
  font-weight: 700;
  color: var(--teal-text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.text-link:hover { color: var(--ink); }

/* Hero --------------------------------------------------------------------*/
.hero { position: relative; padding-top: clamp(40px, 6vw, 96px); padding-bottom: 0; }
.hero + .hero__art + .section { position: relative; z-index: 2; padding-top: clamp(16px, 2.4vw, 40px); }
.hero h1, .hero__sub { position: relative; z-index: 2; }
.hero h1 { max-width: none; text-align: right; font-size: clamp(2.6rem, 6.5vw, 6.4rem); }
@media (min-width: 901px) { .hero h1 { white-space: nowrap; } }
.hero__sub {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 500;
  color: var(--body);
  max-width: 100%;
  margin-left: auto;
  text-align: right;
  text-wrap: balance;
  margin-top: clamp(18px, 2vw, 30px);
}
.hero__art {
  position: relative;
  z-index: 1;
  width: 116%;
  margin: 0 0 clamp(-300px, -17vw, -110px) -8%;
  transform: translateY(clamp(-36px, -2vw, -14px)) rotate(-4.5deg);
  transform-origin: 50% 50%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%);
  pointer-events: none;
}
.hero__art img { width: 100%; height: auto; transform: scaleX(-1); }

/* Page intro --------------------------------------------------------------*/
.page-title h1 { max-width: 16ch; }
.page-title .lede { margin-top: clamp(20px, 2.4vw, 34px); max-width: 52ch; font-size: clamp(1.1rem, 1.5vw, 1.35rem); }


/* Decorative page art (inner pages) ---------------------------------------*/
.page-title { position: relative; }
.page-title > *:not(.page-art) { position: relative; z-index: 1; }
.page-art { position: absolute; z-index: 0; right: calc(50% - 50vw); top: 0; pointer-events: none; }
.page-art--hex {
  height: clamp(300px, 36vw, 520px); width: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

/* Full-width art band -------------------------------------------*/
.band-art {
  height: clamp(160px, 22vw, 320px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 78%, transparent 100%);
}
.band-art img { width: 100%; height: 100%; object-fit: cover; }
.band-art--hexline { height: clamp(120px, 15vw, 220px); }
.band-art--hexline img { object-position: center; }
.band-art--hexwide { height: clamp(140px, 18vw, 260px); margin-top: 0; }
.band-art--hexwide img { object-position: center; }

.band-soft { background: var(--bg); position: relative; z-index: 1; overflow: hidden; }
.method-art {
  position: absolute; right: 0; top: 0; z-index: 0;
  width: 68%; height: auto;
  pointer-events: none;
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%);
  mask-image: linear-gradient(to right, transparent 0, #000 42%);
}
.band-soft .container { position: relative; z-index: 1; }
.section--cards .competence { margin-top: clamp(28px, 3.4vw, 48px); }
.band-soft .page-title--band { padding-bottom: clamp(20px, 3vw, 44px); }
.band-soft .method { padding-top: clamp(16px, 2.4vw, 36px); padding-bottom: clamp(56px, 7vw, 104px); }

/* Feature grid ------------------------------------------------------------*/
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 2.6vw, 44px);
  align-items: start;
}
.feature { border-top: 3px solid var(--teal); padding: 22px clamp(18px, 2vw, 28px) clamp(22px, 2.4vw, 32px); background: #fff; }
.feature h3 { margin-bottom: 16px; }
.feature p { color: var(--muted); }

/* Split -------------------------------------------------------------------*/
.split {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 6vw, 112px);
  align-items: start;
}
.two-line { font-size: clamp(1.5rem, 2.55vw, 2.5rem); white-space: nowrap; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { border-top: 1px solid var(--line); padding-block: 22px; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin-bottom: 6px; }
.rows p { color: var(--muted); margin: 0; }

/* Standard band -----------------------------------------------------------*/
.cta-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.cta-split h2 { margin-bottom: 28px; }
.checklist { list-style: none; margin: 0 0 36px; padding: 0; }
.checklist li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 14px;
  height: 14px;
  background: var(--teal);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}



/* Dark photo band ---------------------------------------------------------*/
.band-dark {
  position: relative;
  color: #fff;
  background: linear-gradient(100deg, rgba(33, 17, 134, 0.94) 0%, rgba(33, 17, 134, 0.82) 55%, rgba(24, 127, 145, 0.7) 100%), url("../img/band-photo.webp") center / cover no-repeat;
  background-color: var(--ink);
}
.band-dark__inner { padding-block: clamp(64px, 9vw, 140px); }
.band-dark__inner > * { max-width: 880px; }  /* align with the page container, keep the text measure */
.band-dark .eyebrow { color: #8fe0ee; }
.band-dark h2 { color: #fff; margin-bottom: 28px; }
.band-dark .checklist li { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.band-dark .checklist li::before { background: #8fe0ee; }
.band-dark--alt { background: linear-gradient(100deg, rgba(33, 17, 134, 0.95) 0%, rgba(33, 17, 134, 0.85) 50%, rgba(24, 127, 145, 0.72) 100%), url("../img/band-photo-2.webp") center / cover no-repeat; background-color: var(--ink); }
.band-dark p { max-width: 52ch; margin-bottom: 28px; }
.btn--light { background: #fff; color: var(--ink); }
/* The northstar over the button, as it sits over the wordmark */
.btn--star { position: relative; overflow: visible; }
.btn--star::after {
  content: "";
  position: absolute;
  top: -14px;
  right: -12px;
  width: 28px;
  height: 28px;
  background: var(--teal);
  -webkit-mask: url("../img/kn-northstar.svg") center / contain no-repeat;
  mask: url("../img/kn-northstar.svg") center / contain no-repeat;
}
.band-dark .btn--star::after { background: #8fe0ee; }
.btn--light:hover { background: #e8ecff; }

/* Motion: gentle reveal on scroll, only when JavaScript runs --------------*/
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.card, .feature { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover, .feature:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(33, 17, 134, 0.10); }


/* Closing call to action --------------------------------------------------*/
.closing { text-align: center; padding-block: clamp(40px, 4.5vw, 72px) clamp(28px, 3.5vw, 52px); }
.closing + .site-footer, main:has(.closing) + .site-footer { margin-top: 0; }
.closing h2 { margin-bottom: 20px; }
.closing p { max-width: 52ch; margin: 0 auto 32px; font-size: clamp(1.05rem, 1.35vw, 1.2rem); }
.text-link--light { color: #8fe0ee; border-bottom-color: #8fe0ee; }
.text-link--light:hover { color: #fff; }


/* Contact: split screen ---------------------------------------------------*/
.split-screen { display: grid; grid-template-columns: 5fr 6fr; }
.split-screen__aside {
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-start;
  padding: clamp(40px, 4.5vw, 72px) clamp(24px, 4vw, 72px) clamp(40px, 5vw, 80px) max(var(--gutter), calc((100vw - var(--container)) / 2));
  background: linear-gradient(155deg, #211186 0%, #2a2c9c 58%, #187f91 120%);
}
.split-screen__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hex-wide.webp") 30% 100% / 150% auto no-repeat;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.split-screen__text { position: relative; z-index: 1; max-width: 30rem; }
.split-screen__text .eyebrow { color: #8fe0ee; }
.split-screen__text h1 { color: #fff; font-size: clamp(2.6rem, 4.6vw, 4.4rem); margin-bottom: 24px; }
.split-screen__text p { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: #e8ecff; }
.split-screen__form { display: flex; align-items: flex-start; padding: clamp(36px, 4vw, 64px) max(var(--gutter), calc((100vw - var(--container)) / 2)) clamp(36px, 4vw, 64px) clamp(24px, 5vw, 80px); }
.split-screen__form form { width: 100%; max-width: 38rem; }

/* Open source: terminal hero ----------------------------------------------*/
.hero-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 88px); align-items: center; }
.hero-split h1 { max-width: none; white-space: nowrap; font-size: clamp(2.4rem, 5.2vw, 5rem); }
.hero-split .lede { margin-top: clamp(20px, 2.4vw, 34px); max-width: 50ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.hero-split .lede--follow { margin-top: 1em; }
.hero-split .lede strong { color: var(--ink); }
.terminal { background: #0f0c33; border-radius: 10px; box-shadow: 0 24px 60px rgba(33, 17, 134, 0.28); overflow: hidden; }
.terminal__bar { display: flex; gap: 8px; padding: 14px 16px; background: #1a1650; }
.terminal__bar span { width: 11px; height: 11px; border-radius: 50%; background: #3b3a7a; }
.terminal__bar span:nth-child(1) { background: #8fe0ee; }
.terminal pre { margin: 0; padding: 22px 22px 26px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(0.72rem, 0.95vw, 0.9rem); line-height: 1.85; color: #dfe4ff; }
.terminal b { color: #8fe0ee; font-weight: 400; margin-right: 8px; }
.t-line { display: block; white-space: pre-wrap; overflow-wrap: normal; word-break: normal; padding-left: 2ch; text-indent: -2ch; }
.t-dim { color: #7f86d0; }
.js .t-line { opacity: 0; animation: tline 0.5s ease forwards; }
.js .t-line:nth-child(1) { animation-delay: 0.2s; }
.js .t-line:nth-child(2) { animation-delay: 0.8s; }
.js .t-line:nth-child(3) { animation-delay: 1.4s; }
.js .t-line:nth-child(4) { animation-delay: 2s; }
.js .t-line:nth-child(5) { animation-delay: 2.6s; }
@keyframes tline { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* Platform: dark hero and chart --------------------------------------------*/
.hero-dark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(115deg, #1a0e6b 0%, #211186 48%, #1b6d8a 135%);
}
.hero-dark::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(70%, 980px);
  background: url("../img/data-burst.webp") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 45%);
  mask-image: linear-gradient(to right, transparent 0, #000 45%);
}
.hero-dark__inner { position: relative; z-index: 1; padding-block: clamp(72px, 10vw, 150px); }
.hero-dark .eyebrow { color: #8fe0ee; }
.hero-dark h1 { color: #fff; max-width: 13ch; }
.hero-dark .lede { margin-top: clamp(20px, 2.4vw, 34px); max-width: 46ch; font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: #e8ecff; }
.split--chart { grid-template-columns: 1fr 1.35fr; align-items: center; }
.split--chart h2 { margin-bottom: clamp(16px, 1.8vw, 26px); }
.split--chart .caption { font-size: 0.9rem; color: var(--muted); font-style: italic; }
.section--form { padding-top: clamp(32px, 4vw, 60px); padding-bottom: clamp(24px, 3vw, 44px); }
.section--form + .site-footer, main:has(.section--form) + .site-footer { margin-top: 0; }
.section--chart { padding-bottom: clamp(24px, 4vw, 64px); }
.section--chart + .section { padding-top: clamp(24px, 4vw, 64px); }
.chart { margin: 0; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--teal); padding: clamp(10px, 1.4vw, 20px); }
.chart svg { width: 100%; height: auto; display: block; }

/* Home: who we work with ---------------------------------------------------*/
.who { list-style: none; margin: clamp(28px, 3.4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.who li { background: #fff; padding: 26px 26px 28px; border-top: 3px solid var(--teal); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.who li:nth-child(3n+2) { border-top-color: var(--ink); }
.who li:nth-child(3n) { border-top-color: #8a4fa8; }
.who li:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(33, 17, 134, 0.10); }
.who__cta { margin: clamp(32px, 4vw, 56px) 0 0; }
.who h3 { margin-bottom: 8px; }
.who p { color: var(--muted); margin: 0; }

/* Competence tiles ----------------------------------------------------------*/
.competence { counter-reset: area; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.competence__row {
  counter-increment: area;
  display: block;
  padding: clamp(26px, 3vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.competence__row::before {
  content: counter(area, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--teal);
  padding: 0;
  transition: color 0.3s ease;
}
.competence__row h2 { font-size: clamp(1.35rem, 1.9vw, 1.75rem); margin-bottom: 10px; transition: color 0.3s ease; }
.competence__row p { margin: 0; transition: color 0.3s ease; }
.competence__row:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 32px rgba(33, 17, 134, 0.22); }
.competence__row:hover::before { color: #8fe0ee; }
.competence__row:hover h2, .competence__row:hover p { color: #fff; }

/* Method timeline -----------------------------------------------------------*/
.steps { list-style: none; margin: clamp(8px, 1.5vw, 20px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(18px, 2.2vw, 36px); counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--teal), var(--ink)); transform-origin: left center; }
.step { counter-increment: step; position: relative; padding-top: 34px; }
.step::after { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.step::before { content: counter(step, decimal-leading-zero); display: block; font-weight: 800; font-size: 1.1rem; letter-spacing: 0.08em; color: var(--teal-text); margin-bottom: 10px; }
.step h3 { font-size: clamp(1.1rem, 1.4vw, 1.3rem); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.98rem; }
.js .steps::before { transform: scaleX(0); transition: transform 1.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .steps.is-drawn::before { transform: scaleX(1); }

/* Contact: footer sits directly under the split screen -------------------*/
.page-flush .site-footer { margin-top: 0; }

/* Grey page background (Open source) --------------------------------------*/
.page-grey { background: var(--bg-alt); }
.page-grey .site-footer { border-top-color: #cfd2de; margin-top: 0; }

/* Open source cards -------------------------------------------------------*/
.group { margin-top: clamp(48px, 6vw, 88px); }
.group:first-of-type { margin-top: 0; }
.group > h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  padding: 26px 26px 22px;
  background: var(--bg);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card__meta { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 0.85rem; }
.tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg-alt);
  padding: 4px 9px;
  border-radius: var(--radius);
}
.tag--soon { background: transparent; color: var(--teal-text); border: 1px solid var(--teal-text); }
.card__meta a { margin-left: auto; font-weight: 700; color: var(--teal-text); text-decoration: none; white-space: nowrap; }
.card__meta a + a { margin-left: 18px; }
.card__meta a:hover { text-decoration: underline; }
.credit { margin-top: 40px; color: var(--muted); font-size: 0.95rem; max-width: 70ch; }

/* Forms -------------------------------------------------------------------*/
.form-section { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.form-section__intro h2 { margin-bottom: 24px; }
.form-section__intro p { max-width: 42ch; }

.form-group { margin-bottom: 26px; }
.form-legend,
.form-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.req { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--body);
  background: var(--bg);
  border: 1px solid #8a8f98;
  border-radius: var(--radius);
  padding: 14px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 18px; font-weight: 700; color: var(--ink); }

/* Footer ------------------------------------------------------------------*/
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 96px);
  padding-block: clamp(36px, 4.5vw, 56px);
  font-size: 0.92rem;
  color: var(--muted);
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Responsive --------------------------------------------------------------*/
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-header__inner { position: relative; justify-content: center; }
  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 14px 0; font-size: 0.95rem; border-bottom: 1px solid transparent; }

  .grid-3 { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; transform-origin: top center; background: linear-gradient(180deg, var(--teal), var(--ink)); }
  .js .steps::before { transform: scaleY(0); }
  .js .steps.is-drawn::before { transform: scaleY(1); }
  .step { padding: 0 0 0 36px; }
  .step::after { top: 4px; }
  .split, .cta-split, .form-section { grid-template-columns: 1fr; }
  .cta-split .panel { order: 2; }
  .cta-split .btn { display: block; width: 100%; text-align: center; }
  .field-row { grid-template-columns: 1fr; gap: 20px; }
  .split-screen { grid-template-columns: 1fr; min-height: 0; }
  .split-screen__aside { padding: 48px var(--gutter) calc(42vw - 16px); }  /* hex art (150% wide, ~42vw tall) sits below the text, overlapping its last line by ~16px */
  .split-screen__form { padding: 40px var(--gutter) 56px; }
  .hero-split { grid-template-columns: 1fr; }
  .competence { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr; }
  .split--chart { grid-template-columns: 1fr; }
  .hero-dark::after { opacity: 0.4; width: 100%; }
  .method-art { width: 120%; right: -10%; opacity: 0.35; }
  .hero h1 { max-width: none; }
  .hero__art { width: 130%; margin-left: -15%; transform: rotate(-6deg); margin-bottom: -60px; }
  .page-art { opacity: 0.28; }
}

@media (max-width: 520px) {
  .nav-toggle span { width: 28px; }
  .card { padding: 22px 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.nw { white-space: nowrap; }

/* Ashby plot animation (only when JavaScript runs and motion is allowed) --*/
.ashby .wp, .ashby .endpt, .ashby .ring { transform-box: fill-box; transform-origin: center; }
.js .ashby .blob, .js .ashby .zone { opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .ashby .route { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .ashby .wp, .js .ashby .endpt, .js .ashby .ring { opacity: 0; }
.js .ashby.is-in .blob { animation: ash-in 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.js .ashby.is-in .b1 { animation-delay: 0.1s; } .js .ashby.is-in .b2 { animation-delay: 0.3s; }
.js .ashby.is-in .b3 { animation-delay: 0.5s; } .js .ashby.is-in .b4 { animation-delay: 0.7s; }
.js .ashby.is-in .b5 { animation-delay: 0.9s; }
.js .ashby.is-in .zone { animation: ash-fade 0.9s ease 1.3s forwards; }
.js .ashby.is-in .route { animation: ash-draw 2.6s ease-in-out 1.6s forwards; }
.js .ashby.is-in .w1 { animation: ash-pop 0.5s ease 2.1s forwards; }
.js .ashby.is-in .w2 { animation: ash-pop 0.5s ease 3.0s forwards; }
.js .ashby.is-in .w3 { animation: ash-pop 0.5s ease 3.6s forwards; }
.js .ashby.is-in .endpt { animation: ash-pop 0.6s ease 4.1s forwards; }
.js .ashby.is-in .ring { animation: ash-ring 2.2s ease-out 4.7s 3; }
@keyframes ash-in { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes ash-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ash-draw { to { stroke-dashoffset: 0; } }
@keyframes ash-pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes ash-march { to { stroke-dashoffset: -100; } }
@keyframes ash-ring { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.ashby .blob:hover ellipse { fill-opacity: 0.3; }


@media (max-width: 700px) {
  .ashby text { font-size: 21px; }
  .ashby .blob text { font-size: 19px; }
}

/* 404: off the chart --------------------------------------------------------*/
.page-404 .site-footer { margin-top: 0; }
.hero-404 { display: flex; align-items: center; min-height: calc(100vh - var(--header-h, 95px) - 96px); }
.hero-404__inner { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 88px); align-items: center; padding-block: clamp(48px, 7vw, 110px); }
.hero-404 h1 { max-width: 12ch; }
.hero-404 .lede { margin-top: clamp(16px, 2vw, 28px); max-width: 38ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: #e8ecff; }
.hero-404__cta { margin-top: clamp(24px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.hero-404__chart { box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35); }
.js .ashby .beyond { stroke-dashoffset: 40; opacity: 0; }
.js .ashby .q { opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .ashby.is-in .beyond { animation: ash-fade 0.6s ease 4.5s forwards; }
.js .ashby.is-in .q { animation: ash-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 5s forwards, ash-bob 2.4s ease-in-out 5.8s infinite; }
@keyframes ash-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (max-width: 900px) { .hero-404__inner { grid-template-columns: 1fr; } .hero-404 h1 { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .js .ashby .q { animation: none; opacity: 1; } .js .ashby .beyond { opacity: 1; } }

.big404 { display: block; font-weight: 800; font-size: clamp(8rem, 18vw, 14rem); line-height: 0.82; letter-spacing: -0.045em; color: #8fe0ee; margin-bottom: clamp(10px, 1.6vw, 22px); background: linear-gradient(100deg, #8fe0ee 0%, #b79cff 55%, #f08ac0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-404 h1 { font-size: clamp(2rem, 3.8vw, 3.6rem); max-width: 16ch; text-wrap: balance; }

/* Footer as a stacked list on narrow screens ---------------------------------*/
@media (max-width: 700px) {
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .site-footer nav { flex-direction: column; flex-wrap: nowrap; gap: 0; width: 100%; }
  .site-footer nav a { display: block; padding: 13px 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
  .site-footer nav a:last-child { border-bottom: 0; }
  .site-footer p { order: 2; font-size: 0.9rem; }
}
