/* ==========================================================================
   CosmosPM — single stylesheet
   No frameworks, no external requests. System fonts only.
   Colours are defined once as custom properties below; dark mode follows
   the visitor's operating-system preference.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light dark;

  /* CosmosPM brand: royal for the chrome, ONE warm colour for the main buttons */
  --paper: #f5f8ff;
  --paper-2: #e6eeff;
  --surface: #ffffff;
  --ink: #0f172a;
  --text: #20324a;
  --muted: #4a5b73;
  --line: #d9e2ef;
  --line-strong: #a9b8cf;
  --accent: #0847a7;
  --accent-ink: #0847a7;
  --on-accent: #ffffff;
  --cta: #e85b10;
  --cta-hover: #f07a3a;
  --on-cta: #0f172a;
  --crit: #b8493a;
  --teal: #0847a7;
  --teal-bar: #5b8ad6;
  --teal-soft: rgba(8, 71, 167, 0.08);
  --grid: rgba(15, 23, 42, 0.055);
  --stripe: rgba(15, 23, 42, 0.03);
  --focus: #0847a7;
  --header-bg: rgba(245, 248, 255, 0.9);
  --shadow:
    0 1px 2px rgba(20, 33, 58, 0.06), 0 18px 40px -18px rgba(20, 33, 58, 0.22);

  --font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.07rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.22rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.7vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 3vw, 4.1rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 74rem;
  --radius: 14px;
  --section: clamp(3.5rem, 2.25rem + 5.5vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1220;
    --paper-2: #0f1a2e;
    --surface: #131f36;
    --ink: #eef2f7;
    --text: #c9d2de;
    --muted: #9aa8bb;
    --line: #24344d;
    --line-strong: #3a4c66;
    --accent: #8fb4ff;
    --accent-ink: #8fb4ff;
    --on-accent: #0b1220;
    --cta: #f26b22;
    --cta-hover: #f58a4f;
    --on-cta: #0b1220;
    --crit: #e07a6a;
    --teal: #8fb4ff;
    --teal-bar: #6f9be6;
    --teal-soft: rgba(143, 180, 255, 0.12);
    --grid: rgba(238, 242, 247, 0.045);
    --stripe: rgba(238, 242, 247, 0.03);
    --focus: #8fb4ff;
    --header-bg: rgba(11, 18, 32, 0.88);
    --shadow:
      0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 44px -18px rgba(0, 0, 0, 0.65);
  }
}

/* Deep-navy band (Tools). Same in both themes; components inherit these. */
.band-ink {
  --paper: #14213a;
  --paper-2: #1a2946;
  --surface: #1b2b48;
  --ink: #f3f5f9;
  --text: #d9e0ea;
  --muted: #aebacb;
  --line: #2c3d5c;
  --line-strong: #3d5072;
  --accent: #8fb4ff;
  --accent-ink: #8fb4ff;
  --on-accent: #14213a;
  --cta: #f26b22;
  --cta-hover: #f58a4f;
  --on-cta: #0b1220;
  --crit: #e07a6a;
  --teal: #8fb4ff;
  --teal-bar: #6f9be6;
  --teal-soft: rgba(143, 180, 255, 0.12);
  --grid: rgba(255, 255, 255, 0.045);
  --focus: #8fb4ff;
  background: var(--paper);
  color: var(--text);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h2 {
  font-size: var(--step-3);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--step-1);
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

[tabindex="-1"]:focus {
  outline: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

[id] {
  scroll-margin-top: 5rem;
}

/* Hidden by its own height, so large text can't peek out. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(calc(-100% - 1.5rem));
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 3. Layout ---------- */
.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--alt {
  background: var(--paper-2);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

/* Small two-bar "Gantt" mark above every section heading */
.section-title::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 0.6rem;
  margin-bottom: 1rem;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 58% 3px no-repeat,
    linear-gradient(var(--teal-bar), var(--teal-bar)) 100% 100% / 48% 3px
      no-repeat;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

/* minmax(0, 1fr): lets large text wrap in one-column grids. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 4vw, 5rem);
}

.split__body {
  max-width: 42rem;
}

.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 2rem + 3vw, 4.5rem);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }

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

  .duo--panels {
    gap: 1.5rem;
  }
}

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  padding-block: 0.5rem;
  border-radius: 6px;
}

.brand img {
  width: 9rem;
}

@media (prefers-color-scheme: dark) {
  .brand img,
  .footer-brand img {
    filter: brightness(0) invert(1);
  }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.site-nav a:not(.btn) {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 49.99rem) {
  /* Without JavaScript the links simply wrap below the logo. */
  .site-nav {
    width: 100%;
    padding-bottom: 0.75rem;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 4rem);
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js .site-nav a:not(.btn) {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--step-1);
  }

  .js .site-nav .btn {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  min-height: 44px;
  padding: 0.75rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 0.55rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.btn--primary {
  background: var(--cta);
  color: var(--on-cta);
}

.btn--primary:hover {
  background: var(--cta-hover);
}

.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--small {
  min-height: 40px;
  padding: 0.5rem 1rem;
}

.btn--arrow::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.15s ease;
}

.btn--arrow:hover::after {
  transform: translateX(3px);
}

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

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3.5rem, 2rem + 6vw, 7rem);
}

.hero::before,
.band-ink::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 3rem 3rem;
  -webkit-mask-image: linear-gradient(#000 45%, transparent);
  mask-image: linear-gradient(#000 45%, transparent);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

@media (min-width: 60rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.hero h1 {
  max-width: 13ch;
}

.hero--page h1 {
  max-width: none;
}

/* Home headline: sized to its column, about four lines. */
.hero--home .hero__copy {
  container-type: inline-size;
}

.hero--home h1 {
  max-width: 20ch;
  font-size: clamp(1.65rem, min(9cqi, 1.45rem + 2.4vw), 3.4rem);
}

.hero__lead {
  max-width: 38rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  color: var(--teal);
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.hero__art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 36px rgba(20, 33, 58, 0.14));
}

.hero--page .hero__art svg {
  max-width: min(26rem, 80%);
  margin-inline: auto;
  filter: none;
}

/* Hero schedule illustration */
.g-panel {
  fill: var(--surface);
}

.g-frame {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}

.g-headbg {
  fill: var(--paper-2);
}

.g-stripe {
  fill: var(--stripe);
}

.g-grid {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}

.g-rule {
  stroke: var(--line);
  stroke-width: 1.5;
}

.g-text {
  fill: var(--muted);
  font: 600 10px var(--mono);
  letter-spacing: 0.06em;
}

/* Under ~480px wide: drop the labels and crop the empty header and legend
   strips (48 units each) via the svg's "slice"; CSS draws the frame. */
@media (max-width: 34rem), (min-width: 60rem) and (max-width: 72rem) {
  .g-chart .g-text,
  .g-chart .g-frame,
  .g-chart .g-rule--edge {
    display: none;
  }

  .hero__art .g-chart {
    aspect-ratio: 600 / 324;
    border: 1.5px solid var(--line);
    border-radius: 12px;
  }
}

.g-names rect {
  fill: var(--line-strong);
  opacity: 0.7;
}

.g-crit {
  fill: var(--crit);
}

.g-norm {
  fill: var(--teal-bar);
}

.g-prog {
  fill: #0b1320;
  opacity: 0.22;
}

.g-link {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 1;
}

.g-link--crit {
  stroke: var(--crit);
  stroke-width: 2.25;
}

.g-head {
  fill: var(--muted);
}

.g-head--crit {
  fill: var(--crit);
}

.g-float {
  stroke: var(--teal-bar);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.g-today {
  stroke: var(--teal);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.g-today-head {
  fill: var(--teal);
}

.g-ms {
  fill: var(--crit);
  stroke: var(--surface);
  stroke-width: 2;
}

.g-pulse {
  display: none;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0.05 2;
  opacity: 0.85;
}

.c-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.c-teal {
  stroke: var(--teal-bar);
}

.c-amber {
  stroke: var(--accent);
}

.c-muted {
  stroke: var(--line-strong);
}

.c-dot-teal {
  fill: var(--teal-bar);
}

.c-dot-amber {
  fill: var(--accent);
}

.c-dot-muted {
  fill: var(--line-strong);
}

.c-orbit {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
}

.c-core {
  fill: var(--surface);
}

.c-ghost {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

@media (prefers-reduced-motion: no-preference) {
  .g-bar,
  .g-ms {
    transform-box: fill-box;
    transform-origin: 0 50%;
    animation: g-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 0.22s + 0.2s);
  }

  .g-ms {
    transform-origin: 50% 50%;
    animation-name: g-pop;
  }

  .g-link,
  .anim-draw {
    animation: g-draw 0.5s ease both;
    animation-delay: calc(var(--i, 0) * 0.22s + 0.5s);
  }

  .g-head {
    animation: g-fade 0.2s ease both;
    animation-delay: calc(var(--i, 0) * 0.22s + 0.9s);
  }

  .g-late {
    animation: g-fade 0.6s ease 1.5s both;
  }

  /* Runs once; all hero motion ends within 5s (WCAG 2.2.2). */
  .g-pulse {
    display: inline;
    animation: g-pulse 2.6s ease-in-out 2.2s 1 both;
  }

  .anim-draw {
    stroke-dasharray: 1;
  }
}

@keyframes g-grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes g-pop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes g-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes g-fade {
  from {
    opacity: 0;
  }
}

/* Dash gap > path length, so it is off the path at both ends. */
@keyframes g-pulse {
  from {
    stroke-dashoffset: 0.06;
  }
  to {
    stroke-dashoffset: -1.01;
  }
}

/* ---------- 7. Index sections ---------- */

/* How we work */
.modes {
  display: grid;
  gap: 2rem;
  position: relative;
}

.mode {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  align-content: start;
  column-gap: 1.25rem;
}

.mode__node {
  grid-row: span 2;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--surface);
  color: var(--teal);
}

.mode:last-child .mode__node {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.mode h3 {
  margin: 0.6rem 0 0.35rem;
}

.mode p {
  color: var(--muted);
}

.mode:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3rem;
  bottom: -2rem;
  left: calc(1.5rem - 1px);
  width: 2px;
  background: repeating-linear-gradient(
    var(--line-strong) 0 6px,
    transparent 6px 12px
  );
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }

  .mode:not(:last-child)::after {
    display: none;
  }
}

@media (min-width: 64rem) {
  .modes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .modes::before {
    content: "";
    position: absolute;
    top: calc(1.5rem - 1px);
    left: 1.5rem;
    right: calc((100% - 7.5rem) / 4 - 1.5rem);
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      var(--line-strong) 0 6px,
      transparent 6px 12px
    );
  }

  .mode:not(:last-child)::after {
    display: none;
  }

  .mode {
    display: block;
  }

  .mode__node {
    margin-bottom: 1.25rem;
  }
}

/* Cards (services, ways to work) */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

/* An odd last card spans the row. */
@media (max-width: 55.99rem) {
  .cards--3 > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 56rem) {
  .cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 1rem + 1vw, 1.85rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* A short bar on each card; offsets step down the grid like a schedule. */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--bar-x, 0%);
  width: 28%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}

.cards > :nth-child(2) {
  --bar-x: 14%;
}

.cards > :nth-child(3) {
  --bar-x: 28%;
}

.cards > :nth-child(4) {
  --bar-x: 42%;
}

.cards > :nth-child(5) {
  --bar-x: 56%;
}

.cards > :nth-child(6) {
  --bar-x: 70%;
}

.card h3 {
  margin-bottom: 0.45rem;
}

.card p {
  color: var(--muted);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  margin-bottom: 1.1rem;
  border-radius: 0.65rem;
  background: var(--teal-soft);
  color: var(--teal);
}

.card--feature {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card--feature .tile-icon {
  background: var(--accent);
  color: var(--on-accent);
}

/* Tools band */
.band-ink {
  position: relative;
  isolation: isolate;
}

.tools__head {
  display: grid;
  gap: 0.5rem clamp(2rem, 5vw, 5rem);
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.tools__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 56rem) {
  .tools__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

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

  .tool--flagship {
    grid-row: span 2;
  }

  /* Centre the video in any spare height. */
  .tool--flagship .tool__media {
    margin-block: auto;
  }

  .tool__media + h3 {
    margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  }
}

.tool {
  padding: clamp(1.4rem, 1.1rem + 1.2vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool p {
  color: var(--muted);
}

.tool--flagship {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-color: rgba(245, 161, 74, 0.45);
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      rgba(92, 200, 205, 0.12),
      transparent 60%
    ),
    var(--surface);
}

.tool--flagship h3 {
  font-size: var(--step-3);
  margin-bottom: 0.35rem;
}

.tool--flagship p {
  font-size: var(--step-1);
  color: var(--text);
}

.tool__media {
  position: relative;
  margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.tool__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  object-fit: cover;
}

/* Pause / play button, added by main.js only when the teaser autoplays. */
.tool__toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.tool__toggle::before {
  content: "";
  width: 0.85rem;
  height: 0.95rem;
  border-inline: 0.3rem solid currentColor;
}

.tool__toggle.is-paused::before {
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.85rem;
  border-color: transparent transparent transparent currentColor;
}

.tool__toggle:hover,
.tool__toggle:focus-visible {
  background: var(--accent);
  border-color: var(--paper);
  color: var(--on-accent);
}

.tool__toggle:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 2px;
  border-radius: 50%;
}

.tool .btn {
  margin-top: 1.25rem;
}

/* Sectors & places */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.chips li {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  gap: 0.65rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.chips li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

.places {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.place {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.2rem 1.1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.place .tile-icon {
  grid-row: span 2;
  margin: 0;
}

.place h3 {
  margin: 0.15rem 0 0;
}

.place p {
  color: var(--muted);
}

/* Knowledge & partner panels */
.panel {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  border-radius: var(--radius);
}

.panel--dashed {
  border: 2px dashed var(--line-strong);
}

.panel--accent {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel--accent::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.status {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.progress {
  display: block;
  width: 9rem;
  height: 0.6rem;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}

.progress::before {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: var(--teal-bar);
}

/* Contact */
.contact__card {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 1.25rem + 4vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact__line {
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin-bottom: 1.75rem;
}

.contact__card p {
  max-width: 40rem;
}

.contact__email {
  display: grid;
  gap: 0.35rem;
  margin-top: 2rem;
}

.label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__email a {
  justify-self: start;
  color: var(--ink);
  font-size: clamp(1.15rem, 0.85rem + 1.6vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}

.contact__email a:hover {
  text-decoration-thickness: 5px;
}

/* ---------- 8. Partners page ---------- */
.steps {
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 1.25rem;
  counter-increment: step;
}

.step__bar {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 var(--step-0) / 1 var(--mono);
}

.step__bar::before {
  content: counter(step, decimal-leading-zero);
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.5rem - 1px);
  top: 3.4rem;
  bottom: -1.4rem;
  width: 2px;
  background: var(--line-strong);
}

.step h3 {
  margin: 0.55rem 0 0.35rem;
}

.step p {
  color: var(--muted);
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.25rem;
  }

  .step {
    display: block;
  }

  .step__bar {
    place-items: center start;
    width: 100%;
    height: 2.4rem;
    margin-bottom: 1.25rem;
    padding-inline: 0.9rem;
    border-radius: 0.45rem;
  }

  .step:not(:last-child)::after {
    left: 100%;
    top: calc(1.2rem - 1px);
    bottom: auto;
    width: calc(2.25rem - 6px);
    height: 2px;
  }

  .step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(100% + 2.25rem - 7px);
    top: calc(1.2rem - 5px);
    border: 5px solid transparent;
    border-left: 7px solid var(--line-strong);
    border-right: 0;
  }
}

.checklist li {
  position: relative;
  padding: 1rem 0 1rem 2.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 550;
}

.checklist li:first-child {
  border-top: 1px solid var(--line);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--teal-soft);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 0.52rem;
  top: 1.48rem;
  width: 0.6rem;
  height: 0.32rem;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

.faq {
  max-width: 50rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  color: var(--ink);
  font-size: var(--step-1);
  font-weight: 650;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 0.7rem 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 0.7rem no-repeat;
}

.faq details[open] summary::after {
  background: linear-gradient(var(--accent-ink), var(--accent-ink)) center /
    0.7rem 2px no-repeat;
  border-color: var(--accent);
}

.faq details p {
  max-width: 44rem;
  padding: 0 3rem 1.4rem 0;
  color: var(--muted);
}

/* ---------- 9. Simple pages (privacy, 404) ---------- */
.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 3rem 3rem;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: var(--step-2);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li::marker {
  color: var(--accent-ink);
}

.meta {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}

.notfound {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  min-height: 55vh;
}

.notfound__help {
  margin-top: 2rem;
}

.notfound svg {
  width: 100%;
  max-width: 24rem;
  height: auto;
}

@media (min-width: 56rem) {
  .notfound {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

/* ---------- 10. Footer ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.75rem) 2rem;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: var(--step--1);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem 2.5rem;
}

.footer-brand img {
  width: 8.5rem;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  max-width: 22rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a,
.footer-contact a {
  display: inline-block;
  max-width: 100%;
  padding-block: 0.25rem;
  color: var(--ink);
  font-weight: 600;
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-legal + .footer-legal {
  margin-top: -0.75rem;
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.5fr) auto auto;
    align-items: start;
  }
}

/* ---------- 11. Forced colours, motion & print ---------- */
/* High Contrast drops background images (FAQ +/-, menu bars): keep them. */
@media (forced-colors: active) {
  .faq summary::after,
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    forced-color-adjust: none;
  }

  .faq summary::after {
    --ink: CanvasText;
    --accent-ink: CanvasText;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    background: ButtonText;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  /* Dark on white in any theme. */
  :root,
  .band-ink {
    --paper: #fff;
    --paper-2: #fff;
    --surface: #fff;
    --ink: #0f172a;
    --text: #20324a;
    --muted: #4a5b73;
    --line: #d9e2ef;
    --line-strong: #a9b8cf;
    --accent-ink: #0847a7;
    --teal: #0847a7;
  }

  .site-header,
  .skip-link,
  .hero__art {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .band-ink {
    background: #fff;
    color: #000;
  }
}

/* Privacy policy: tables and sub-headings */
.table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.table-wrap table:has(th:nth-child(3)) {
  min-width: 34rem;
}
.table-wrap th,
.table-wrap td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table-wrap thead th {
  background: var(--surface);
  color: var(--ink);
}
.prose h3 {
  margin-top: 1.75rem;
}
.prose blockquote {
  margin: 0 0 1em;
  padding-left: 1rem;
  border-left: 3px solid var(--line-strong);
}
.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* Promises under How we work */
.modes + .cards {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}
