/* ==========================================================================
   Azamix — site styles
   One stylesheet for every page.

   The layout runs on a single "rail" grid: a narrow label column (3fr)
   and a wide content column (9fr). Section labels, service titles,
   process stages, contact channels and footer brand all sit in the rail,
   so every page shares one vertical alignment.
   ========================================================================== */

/* ---------- Fonts (self-hosted latin subsets, SIL Open Font License) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Colour */
  --ink: #101923; /* midnight navy — brand primary */
  --text: #18212c;
  --muted: #535c6e;
  --subtle: #646c7c; /* ≥4.5:1 on paper, paper-2 and white */
  --line: #e1e3df;
  --line-strong: #c8cbc5;
  --paper: #f7f8f6; /* warm white */
  --paper-2: #eef0ec;
  --surface: #ffffff;
  /* Brand teal: one hue in three steps. --teal is the signature (on navy);
     --teal-mid is the logo accent on light grounds; --accent is text-safe on light (5.3:1). */
  --teal: #74d4c3;
  --teal-mid: #23a58f;
  --accent: #0b7466;
  --accent-hover: #095f54;
  --accent-soft: #e3f4f0;
  --signal: #14a37f;
  --danger: #c2341b;
  --danger-soft: #fdeeea;
  --success-soft: #e6f6f1;

  --on-dark: #f7f8f6;
  --on-dark-muted: #a3adb8;
  --dark-line: rgba(255, 255, 255, 0.12);
  --dark-line-strong: rgba(255, 255, 255, 0.28);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-label: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lede: clamp(1.125rem, 0.35vw + 1.05rem, 1.3125rem);
  --fs-h4: 1.1875rem;
  --fs-h3: clamp(1.3125rem, 0.5vw + 1.15rem, 1.625rem);
  --fs-h2: clamp(2.125rem, 2.6vw + 1.25rem, 3.5rem);
  --fs-display: clamp(2.75rem, 5.4vw + 1rem, 6rem);

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(4.5rem, 6vw + 1.5rem, 8.5rem);
  --head-gap: clamp(2.5rem, 4vw, 4.5rem);
  --col-gap: clamp(1.5rem, 3vw, 3rem);

  /* Shape — three radii only */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;

  --container: 1200px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --header-h: 68px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.048em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

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

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-3);
}

main:focus {
  outline: none; /* focused programmatically by the skip link */
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 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);
}

/* Consecutive light sections share one gap; the ink rule separates them */
.home-hero + .section,
.page-hero + .section:not(.contact):not(.section--dark),
.section + .section:not(.contact):not(.section--dark) {
  padding-top: 0;
}

/* The rail: label column + content column */
.rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* wide content (code, tables) scrolls instead of stretching the page */
  gap: var(--s-5);
}

@media (min-width: 900px) {
  .rail {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    column-gap: var(--col-gap);
  }
}

/* Empty rail cell so content lines up with the content column */
.rail__spacer {
  display: none;
}

@media (min-width: 900px) {
  .rail__spacer {
    display: block;
  }
}

/* Content-column split (description | detail) */
.pair {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 760px) {
  .pair {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    column-gap: var(--col-gap);
  }
}

/* Section head: an ink rule, label in the rail, heading in the content column */
.section-head {
  padding-top: var(--s-5);
  border-top: 1px solid var(--ink);
  margin-bottom: var(--head-gap);
}

.section-label {
  display: flex;
  gap: var(--s-3);
  align-items: baseline;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.4;
}

.section-label span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 400;
}

.section-head h2 {
  max-width: 17ch;
}

.section-head .lede {
  margin-top: var(--s-5);
}

/* ---------- Typography helpers ---------- */
.lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: var(--fs-lede);
  line-height: 1.55;
  letter-spacing: -0.008em;
}

.lede strong {
  color: var(--ink);
  font-weight: 500;
}

.meta {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  line-height: 1.5;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s var(--ease);
}

.text-link svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  transition: transform 0.2s var(--ease);
}

.text-link:hover {
  text-decoration-color: var(--ink);
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* Plain list with hairlines — deliverables, fit lists */
.rule-list {
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.rule-list > li {
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line-strong);
}

.rule-list--compact > li {
  padding-block: 0.65rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.marked > li {
  position: relative;
  padding-left: 1.5rem;
}

.marked > li::before {
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
}

.marked--plus > li::before {
  content: "+";
  color: var(--accent);
}

.marked--minus > li::before {
  content: "−";
  color: var(--subtle);
}

.list-title {
  margin-bottom: var(--s-3);
  color: var(--subtle);
  font-size: var(--fs-label);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 1.25rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--r);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-border: var(--accent);
}

.btn--primary:hover {
  --btn-bg: var(--accent-hover);
  --btn-border: var(--accent-hover);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
}

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

.btn--on-dark {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  --btn-border: var(--dark-line-strong);
}

.btn--on-dark:hover {
  --btn-border: #fff;
}

.btn--sm {
  min-height: 38px;
  padding: 0 0.875rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.75;
}

/* Long labels (service names, the email address) wrap on narrow screens */
@media (max-width: 560px) {
  .btn-row .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    padding-block: 0.6rem;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 246, 0.9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--header-h);
}

/* Logo lockups live in /assets/brand (light and dark files); see BRAND.md */
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}

.brand__logo {
  width: auto;
  height: 26px;
  flex: none;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--ink);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.header-cta {
  display: none;
}

/* The toggle needs JavaScript; without it, mobile visitors use the header CTA and footer links */
.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.js .menu-toggle {
  display: inline-grid;
}

.menu-toggle__bars {
  position: relative;
  width: 18px;
  height: 10px;
}

.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), top 0.25s var(--ease);
}

.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 4.25px; }
.menu-toggle__bars span:nth-child(3) { top: 8.5px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) {
  top: 4.25px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) {
  top: 4.25px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-4) var(--gutter) var(--s-7);
  background: var(--paper);
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__list {
  list-style: none;
  border-top: 1px solid var(--ink);
}

.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding-block: 14px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-decoration: none;
}

.mobile-menu__contact {
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-sm);
}

.mobile-menu__contact a {
  color: var(--ink);
  text-decoration: none;
}

body.menu-open {
  overflow: hidden;
}

@media (min-width: 960px) {
  .nav {
    display: block;
  }

  .header-cta {
    display: inline-flex;
    margin-left: var(--s-3);
  }

  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 959px) {
  .header-cta--mobile {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    font-size: var(--fs-label);
  }
}

@media (max-width: 340px) {
  .header-cta--mobile {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero__sub {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-strong);
}

.hero__sub .btn-row {
  margin-top: var(--s-6);
}

/* ---------- Figure: system diagram ---------- */
.figure {
  margin: clamp(3.5rem, 6vw, 5.5rem) 0 0;
}

.figure__frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

.figure__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 12px clamp(16px, 2.5vw, 28px);
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.figure__bar b {
  color: var(--ink);
  font-weight: 500;
}

.figure__caption {
  margin-top: var(--s-3);
  color: var(--subtle);
  font-size: var(--fs-label);
}

/* Connector: vertical on mobile, horizontal on desktop */

/* ---------- Services (home) ---------- */

/* ---------- Work ---------- */

@media (min-width: 760px) and (max-width: 1099px) {
  /* Two-column grid: the odd third item spans both, image beside text */
  

  

  
}

/* Mock interfaces — drawn in CSS so nothing pretends to be a real client screenshot */

/* ---------- Process ---------- */
.stages {
  list-style: none;
}

.stage {
  padding-block: var(--s-5);
  border-top: 1px solid var(--line-strong);
}

.stage:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.stage__name {
  display: flex;
  gap: var(--s-3);
  align-items: baseline;
}

.stage__name span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
}

.stage__name h3 {
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

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

.stage__out {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.stage__out::before {
  content: "→";
  color: var(--accent);
}

@media (max-width: 899px) {
  .stage.rail {
    gap: var(--s-2);
  }

  .stage .pair {
    gap: var(--s-2);
  }
}

.note {
  margin-top: var(--s-5);
  color: var(--subtle);
  font-size: var(--fs-sm);
}

/* ---------- About ---------- */
.stack-list {
  list-style: none;
  font-size: var(--fs-sm);
  line-height: 1.9;
}

@media (max-width: 899px) {
  .stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s-4);
  }
}

.principles {
  display: grid;
  gap: 0 var(--col-gap);
  list-style: none;
}

@media (min-width: 640px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.principle {
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line-strong);
}

.principle h3 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.principle p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--on-dark);
}

.contact .section-head {
  border-top-color: var(--dark-line-strong);
}

.contact h2,
.contact .section-label {
  color: #fff;
}

.contact .section-label span,
.contact .lede {
  color: var(--on-dark-muted);
}

.channels {
  align-self: start;
  list-style: none;
  border-top: 1px solid var(--dark-line);
}

.channel {
  display: grid;
  gap: 2px;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--dark-line);
  color: var(--on-dark);
  text-decoration: none;
}

.channel__label {
  color: var(--on-dark-muted);
  font-size: var(--fs-label);
}

.channel__value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.channel__value svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--on-dark-muted);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.channel:hover .channel__value svg {
  transform: translate(2px, -2px);
  color: #fff;
}

.channel:hover .channel__value span {
  text-decoration: underline;
  text-decoration-color: var(--dark-line-strong);
}

/* ---------- Form ---------- */
.form-card {
  max-width: 48rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
}

/* The form sends via JavaScript only; without it, a plain email link is shown instead */
html:not(.js) #inquiry-form {
  display: none;
}

.form-card__sub {
  margin-top: var(--s-2);
  margin-bottom: var(--s-6);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.form-grid {
  display: grid;
  gap: var(--s-5) var(--s-4);
}

@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.field .optional {
  color: var(--subtle);
  font-weight: 400;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px avoids iOS zoom on focus */
  line-height: 1.4;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  appearance: none;
}

.input::placeholder {
  color: var(--subtle);
}

.input:hover {
  border-color: #a9aba2;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 116, 102, 0.18);
}

textarea.input {
  min-height: 140px;
  resize: vertical;
}

select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23535c6e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(194, 52, 27, 0.14);
}

.field__error {
  color: var(--danger);
  font-size: var(--fs-label);
  font-weight: 500;
}

.field__error:empty {
  display: none;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-6);
}

.form-foot__note {
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.5;
}

.form-foot__note a {
  color: var(--ink);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-status {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border-radius: var(--r);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.form-status[hidden] {
  display: none;
}

.form-status svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}

.form-status--error {
  background: var(--danger-soft);
  color: #7d200f;
}

.form-status--success {
  background: var(--success-soft);
  color: #0d5b47;
}

.form-status--info {
  background: var(--accent-soft);
  color: #084a41;
}

.form-status a {
  color: inherit;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--s-8) var(--s-6);
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
}

/* When the page ends on a dark section, the footer continues it; the rule keeps them apart */
main:has(> .contact:last-child, > .cta:last-child, > .section--dark:last-child) + .site-footer {
  padding-top: 0;
}

.site-footer .footer__main {
  padding-top: var(--s-6);
  border-top: 1px solid var(--dark-line);
}

.site-footer .brand__logo {
  height: 28px;
}

.footer__about p {
  max-width: 18rem;
  margin-top: var(--s-4);
}

.footer__cols {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.footer__col h2 {
  margin-bottom: var(--s-3);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
}

.footer__col ul {
  display: grid;
  gap: var(--s-2);
  list-style: none;
}

.footer__col a {
  color: var(--on-dark-muted);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.footer__col a:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-8);
  font-size: var(--fs-label);
}

.footer__bottom a {
  color: var(--on-dark-muted);
}

.site-footer :focus-visible,
.contact :focus-visible,
.cta :focus-visible {
  outline-color: var(--teal);
}

/* ---------- Service detail pages ---------- */
.page-hero {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: var(--section-y);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--subtle);
  font-size: var(--fs-label);
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--s-2);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.page-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 4.4vw + 1rem, 5rem);
}

.glance {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}

.glance dt {
  color: var(--subtle);
  font-size: var(--fs-label);
}

.glance dd {
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

@media (max-width: 899px) {
  .glance {
    order: 2;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: var(--s-4);
  }
}

.problems {
  display: grid;
  gap: 0 var(--col-gap);
  list-style: none;
}

@media (min-width: 640px) {
  .problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.problem {
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line-strong);
}

.problem h3 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.problem p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.deliverables > li {
  display: grid;
  gap: var(--s-1);
}

@media (min-width: 640px) {
  .deliverables > li {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--col-gap);
  }
}

.deliverables strong {
  color: var(--ink);
  font-weight: 500;
}

.deliverables span {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.fit h3 {
  margin-bottom: var(--s-4);
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.faq {
  border-top: 1px solid var(--line-strong);
}

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 64px;
  padding: var(--s-4) 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230b1220' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M10 4v12M4 10h12'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq__a {
  max-width: 44rem;
  padding-bottom: var(--s-5);
  color: var(--muted);
}

/* Closing call to action on service pages */
.cta {
  padding-block: var(--section-y);
  background: var(--ink);
  color: var(--on-dark);
}

.cta .section-head {
  margin-bottom: 0;
  border-top-color: var(--dark-line-strong);
}

.cta h2,
.cta .section-label {
  color: #fff;
}

.cta .section-label span,
.cta .lede {
  color: var(--on-dark-muted);
}

/* On navy, the primary action takes the signature teal */
.cta .btn--primary {
  --btn-bg: var(--teal);
  --btn-fg: var(--ink);
  --btn-border: var(--teal);
}

.cta .btn--primary:hover {
  --btn-bg: #8fdfd1;
  --btn-border: #8fdfd1;
}

.cta .btn-row {
  margin-top: var(--s-6);
}

.cta .section-head + .rail {
  margin-top: var(--s-8);
}

.related-title {
  margin: 0;
  padding-top: var(--s-4);
  color: var(--on-dark-muted);
  letter-spacing: 0;
}

.related {
  list-style: none;
  border-top: 1px solid var(--dark-line);
}

.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--dark-line);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.related small {
  display: block;
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  font-weight: 400;
}

.related svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--on-dark-muted);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.related a:hover svg {
  transform: translateX(3px);
  color: #fff;
}

/* ---------- Small helpers ---------- */
.h3-size {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.gap-top {
  margin-top: var(--s-7);
}

.gap-top-sm {
  margin-top: var(--s-5);
}

.field__hint {
  color: var(--subtle);
  font-size: var(--fs-label);
  line-height: 1.5;
}

.contact-side {
  display: grid;
  gap: var(--s-7);
  align-content: start;
}

.contact-help h3 {
  margin-bottom: var(--s-3);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
}

.contact-help ul {
  display: grid;
  gap: var(--s-2);
  list-style: none;
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.contact-help li::before {
  content: "→ ";
  color: var(--teal);
}

/* ---------- Kicker: small mono label above a page title ---------- */
.kicker {
  margin-bottom: var(--s-4);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.02em;
}

/* ---------- Dark band (principles, contact) ---------- */
.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.section--dark .section-head {
  border-top-color: var(--dark-line-strong);
}

.section--dark h2,
.section--dark h3,
.section--dark .section-label {
  color: #fff;
}

.section--dark .section-label span,
.section--dark .lede {
  color: var(--on-dark-muted);
}

.section--dark .text-link {
  color: #fff;
  text-decoration-color: var(--dark-line-strong);
}

.section--dark .text-link svg {
  color: var(--teal);
}

.section--dark :focus-visible {
  outline-color: var(--teal);
}

/* A light section that follows a dark one needs its own top padding */
.section--dark + .section {
  padding-top: var(--section-y);
}

/* ---------- Offer rows: problem / approach / deliverables ---------- */
.offer {
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line-strong);
}

.offer:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.offer__title h3 {
  max-width: 14ch;
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.offer__title .text-link {
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
}

.offer__cols {
  display: grid;
  gap: var(--s-4) var(--col-gap);
}

@media (min-width: 760px) {
  .offer__cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.85fr);
  }
}

.offer__cols p,
.offer__cols li {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.offer__cols ul {
  list-style: none;
  display: grid;
  gap: var(--s-1);
}

.offer__cols li {
  color: var(--text);
}

.offer__cols li::before {
  content: "→ ";
  color: var(--accent);
}

.offer__consider {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--s-2) var(--col-gap);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--line);
}

@media (min-width: 760px) {
  .offer__consider {
    grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
    align-items: baseline;
  }

  .offer__consider .col-label {
    margin-bottom: 0;
  }
}

.offer__consider p:last-child {
  max-width: 68ch;
}

.offer--minor .offer__title h3 {
  color: var(--muted);
}

.col-label {
  margin-bottom: var(--s-2);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section--dark .col-label {
  color: var(--on-dark-muted);
}

/* ---------- Numbered index list (solutions, principles) ---------- */

/* ---------- Illustration strip (solutions) ---------- */

/* Phone mock for the mobile illustration */

/* ---------- Process stages ---------- */
.stage__expect {
  margin-top: var(--s-3);
  color: var(--text);
  font-size: var(--fs-sm);
}

.stage__expect strong {
  font-weight: 600;
}

.stages--compact .stage {
  padding-block: var(--s-4);
}

.stages--compact .stage p {
  font-size: var(--fs-sm);
}

/* ---------- Topics and post lists ---------- */
.topic-list {
  display: grid;
  gap: 0 var(--col-gap);
  list-style: none;
}

@media (min-width: 640px) {
  .topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .topic-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.topic-list li {
  padding-block: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line-strong);
}

.topic-list h3 {
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
}

.topic-list p {
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.topic-list .count {
  margin-top: var(--s-2);
}

.post-list {
  list-style: none;
  border-top: 1px solid var(--ink);
}

.post-row {
  display: grid;
  gap: var(--s-2);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line-strong);
}

.post-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}

.post-row__topic {
  color: var(--accent);
}

.post-row__title {
  font-size: var(--fs-h3);
}

.post-row__title a {
  text-decoration: none;
}

.post-row__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
}

.post-row__dek {
  max-width: 44rem;
  color: var(--muted);
}

.post-row[hidden] {
  display: none;
}

/* Honest empty state while nothing is published */
.empty-state {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--ink);
}

.empty-state h3 {
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.empty-state > p {
  max-width: 40rem;
  margin-top: var(--s-2);
  color: var(--muted);
}

.planned {
  margin-top: var(--s-5);
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.planned li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: var(--fs-sm);
}

.planned li span:first-child {
  color: var(--ink);
}

/* Topic filter on /insights/ */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  list-style: none;
}

.filter button {
  min-height: 36px;
  padding: 0 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-label);
  cursor: pointer;
}

.filter button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

html:not(.js) .filter {
  display: none;
}

/* ---------- About ---------- */
.about-body {
  display: grid;
  gap: var(--s-5);
  max-width: 44rem;
}

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

.about-body p:first-child {
  color: var(--text);
  font-size: var(--fs-lede);
  line-height: 1.55;
}

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.facts > div {
  display: grid;
  gap: var(--s-1);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line-strong);
}

@media (min-width: 640px) {
  .facts > div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--col-gap);
  }
}

.facts dt {
  color: var(--subtle);
  font-size: var(--fs-sm);
}

.facts dd {
  color: var(--ink);
  font-size: var(--fs-sm);
}

/* Callout used for "why there is no portfolio" and similar notes */
.callout {
  max-width: 44rem;
  padding: var(--s-5);
  border-left: 2px solid var(--accent);
  background: var(--surface);
}

.callout h3 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.callout p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.callout p + p {
  margin-top: var(--s-3);
}

/* ---------- Service page body ---------- */
.two-col-text {
  display: grid;
  gap: var(--s-5) var(--col-gap);
}

@media (min-width: 760px) {
  .two-col-text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.two-col-text h3 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.two-col-text p,
.two-col-text li {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.two-col-text p + p {
  margin-top: var(--s-3);
}

.two-col-text > div {
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-strong);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.compare caption {
  margin-bottom: var(--s-3);
  color: var(--subtle);
  font-size: var(--fs-label);
  text-align: left;
}

.compare th,
.compare td {
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 500;
}

.compare tbody th {
  color: var(--ink);
  font-weight: 500;
}

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

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible {
  outline-offset: 0;
}

.figure--flush {
  margin-top: 0;
}

/* Side-by-side diagrams: point-to-point vs. hub */
.hub-compare {
  display: grid;
  gap: var(--s-5);
  padding: clamp(16px, 3vw, 32px);
  background-image: radial-gradient(circle, #e1e2db 1px, transparent 1.2px);
  background-size: 20px 20px;
}

.hub-compare svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .hub-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Flow diagram (steps in a line) ---------- */
.flow {
  display: grid;
  gap: 10px;
  padding: clamp(16px, 3vw, 32px);
  list-style: none;
  background-image: radial-gradient(circle, #e1e2db 1px, transparent 1.2px);
  background-size: 20px 20px;
  counter-reset: flow;
}

.flow li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  counter-increment: flow;
}

.flow li::before {
  content: counter(flow, decimal-leading-zero);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
}

.flow li small {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 400;
}

.flow li.is-core {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.flow li.is-core::before {
  color: var(--teal);
}

.flow li.is-core small {
  color: var(--on-dark-muted);
}

@media (min-width: 760px) {
  .flow {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

/* In the narrow reading column, long flows wrap onto rows of three */
@media (min-width: 560px) {
  .prose .flow {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Articles ---------- */
.article-head {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.article-head .breadcrumb {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.article-head h1 {
  max-width: 22ch;
  font-size: clamp(2.25rem, 3.2vw + 1rem, 4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.article-dek {
  max-width: 40rem;
  margin-top: var(--s-5);
  color: var(--muted);
  font-size: var(--fs-lede);
  line-height: 1.55;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-5);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--ink);
}

.article-layout {
  padding-bottom: var(--section-y);
}

.article-aside {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-7);
  align-content: start;
  font-size: var(--fs-sm);
}

@media (min-width: 900px) {
  .article-aside {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
    display: grid;
    align-self: start;
  }
}

.tag-list,
.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  list-style: none;
}

@media (min-width: 900px) {
  .tag-list,
  .share-list {
    display: grid;
  }
}

.tag-list li {
  color: var(--muted);
}

.share-list a {
  color: var(--ink);
}

.draft-banner {
  margin-bottom: var(--s-6);
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--accent);
  border-radius: var(--r);
  background: var(--accent-soft);
  color: #084a41;
  font-size: var(--fs-sm);
}

/* Long-form reading text */
.prose {
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.72;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(1.625rem, 1vw + 1.25rem, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.prose h3 {
  margin-top: 2em;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.75em;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.4em;
}

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

.prose a {
  color: var(--accent);
  text-decoration-color: rgba(11, 116, 102, 0.4);
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose blockquote {
  margin-inline: 0;
  padding-left: var(--s-5);
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.prose pre {
  padding: var(--s-4);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--on-dark);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.prose th,
.prose td {
  min-width: 9rem;
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 500;
}

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

.prose figure {
  margin-inline: 0;
}

.prose figure.wide {
  max-width: none;
}

.prose figcaption {
  margin-top: var(--s-3);
  color: var(--subtle);
  font-size: var(--fs-label);
  line-height: 1.5;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin-block: 2.5em;
}

.prose .key-point {
  padding: var(--s-4) var(--s-5);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  font-size: 1rem;
}

.prose .sources {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.prose .sources li + li {
  margin-top: 0.25em;
}

/* ---------- 404 ---------- */
.not-found {
  padding-block: clamp(4rem, 10vw, 8rem) var(--section-y);
}

.not-found h1 {
  max-width: 12ch;
}

.not-found .btn-row {
  margin-top: var(--s-6);
}

/* ---------- Concept product UI (_includes/ui/) ----------
   Interfaces drawn in HTML and CSS with sample data, so nothing pretends to be a client
   screenshot. Everything inside is sized in em, and the frame sets font-size from its own
   width (container query units), so each mockup scales as one picture. */
.ui-frame {
  container-type: inline-size;
}

.ui {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 11px;
  font-size: clamp(6px, 1.42cqi, 12px);
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  user-select: none;
}

.ui p {
  margin: 0;
}

.ui-window {
  border: 1px solid var(--line-strong);
  border-radius: 0.9em;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(16, 25, 35, 0.04), 0 2.4em 4.8em -2.4em rgba(16, 25, 35, 0.28);
}

.ui-bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
  height: 2.7em;
  padding: 0 1.1em;
  border-bottom: 1px solid #eceee9;
  background: #fbfbfa;
}

.ui-bar i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #dcdfda;
}

.ui-bar span {
  margin-left: 0.8em;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.ui-app {
  display: grid;
  grid-template-columns: 10.5em minmax(0, 1fr);
}

.ui-side {
  display: grid;
  align-content: start;
  gap: 0.15em;
  padding: 1.1em 0.7em;
  border-right: 1px solid #eceee9;
  background: #fafbf9;
  color: var(--muted);
}

.ui-side span {
  padding: 0.45em 0.65em;
  border-radius: 0.45em;
}

.ui-side span.is-on {
  background: var(--ink);
  color: #fff;
}

.ui-brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.8em !important;
  padding: 0 0.65em;
  color: var(--ink);
  font-weight: 600;
}

.ui-brand i {
  width: 1.1em;
  height: 1.1em;
  border-radius: 0.3em;
  background: var(--teal);
}

.ui-main {
  display: grid;
  align-content: start;
  gap: 1em;
  min-width: 0;
  padding: 1.2em 1.4em 1.4em;
}

.ui-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
}

.ui-title {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.ui-title .ui-pill {
  font-size: 0.6em;
}

.ui-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
}

.ui-chip {
  padding: 0.3em 0.7em;
  border: 1px solid var(--line);
  border-radius: 99em;
  color: var(--muted);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 0.9em;
  border: 1px solid var(--accent);
  border-radius: 0.5em;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

.ui-btn--ghost {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.ui-btn--block {
  width: 100%;
  padding-block: 0.8em;
}

.ui-pill {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 99em;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.85em;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.ui-pill--ok { background: var(--success-soft); color: #0b6b57; }
.ui-pill--wait { background: #fcf1d8; color: #845400; }
.ui-pill--info { background: #e7eef8; color: #2d4f86; }

.ui-av {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8em;
  font-weight: 600;
}

.ui-muted { color: var(--subtle); }
.ui-strong { color: var(--ink); font-size: 1.15em; font-weight: 600; }
.ui-mono { font-family: var(--font-mono); font-size: 0.92em; }

.ui-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.ui-back {
  color: var(--accent);
  font-weight: 500;
}

/* Board */
.ui-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7em;
}

.ui-col {
  display: grid;
  align-content: start;
  gap: 0.55em;
  min-height: 21em;
  padding: 0.65em;
  border-radius: 0.7em;
  background: #f4f5f2;
}

.ui-col__h {
  display: flex;
  justify-content: space-between;
  padding: 0.1em 0.2em 0.2em;
  color: var(--muted);
  font-weight: 500;
}

.ui-col__h b {
  color: var(--subtle);
  font-weight: 500;
}

.ui-card {
  display: grid;
  gap: 0.4em;
  padding: 0.7em 0.75em;
  border: 1px solid #e6e8e3;
  border-radius: 0.55em;
  background: #fff;
}

.ui-card b {
  color: var(--ink);
  font-weight: 500;
}

.ui-card small {
  color: var(--subtle);
  font-size: 0.9em;
}

.ui-card__f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4em;
  margin-top: 0.2em;
}

.ui-card--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2em var(--accent-soft);
}

.ui-card--done b {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.ui-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3em;
}

.ui-steps i {
  height: 0.35em;
  border-radius: 1em;
  background: var(--line);
}

.ui-steps i.is-done {
  background: var(--accent);
}

/* Dashboard */
.ui-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7em;
}

.ui-kpi,
.ui-panel {
  padding: 0.85em 0.95em;
  border: 1px solid #e8eae5;
  border-radius: 0.65em;
  background: #fff;
}

.ui-kpi span {
  color: var(--subtle);
  font-size: 0.9em;
}

.ui-kpi strong {
  display: block;
  margin-top: 0.15em;
  color: var(--ink);
  font-size: 1.8em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ui-panel__h {
  margin-bottom: 0.6em !important;
  color: var(--muted);
  font-weight: 500;
}

.ui-split {
  display: grid;
  gap: 0.8em;
}

.ui-split--chart {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}

.ui-split--doc {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.4em;
}

.ui-chart {
  width: 100%;
  height: 6.5em;
}

.ui-list {
  display: grid;
  gap: 0.6em;
  list-style: none;
}

.ui-list li {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.ui-dot {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--signal);
}

.ui-dot--warn { background: #e9a91d; }
.ui-dot--late { background: var(--danger); }

.ui-table {
  border: 1px solid #e8eae5;
  border-radius: 0.65em;
  overflow: hidden;
}

.ui-row {
  display: grid;
  grid-template-columns: var(--cols);
  gap: 0.8em;
  align-items: center;
  padding: 0.6em 0.95em;
  border-top: 1px solid #f0f1ee;
}

.ui-row--h {
  border-top: 0;
  background: #fafbf9;
  color: var(--subtle);
  font-size: 0.88em;
}

/* Phones: fixed 9:19.5 proportions, so the screen always fills the frame */
.ui-phone {
  display: flex;
  flex: none;
  width: 18.5em;
  aspect-ratio: 9 / 19.5;
  padding: 0.55em;
  border-radius: 2.7em;
  background: #0d141c;
  box-shadow: inset 0 0 0 1px #2c3642, 0 3em 5em -2.6em rgba(16, 25, 35, 0.45);
}

.ui-screen {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  border-radius: 2.15em;
  background: #fff;
  overflow: hidden;
}

.ui-island {
  position: absolute;
  top: 0.6em;
  left: 50%;
  width: 5.4em;
  height: 1.55em;
  border-radius: 1em;
  background: #0d141c;
  transform: translateX(-50%);
}

.ui-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.75em;
  padding: 0 1.6em;
  color: var(--ink);
  font-size: 0.82em;
  font-weight: 600;
}

.ui-sig {
  display: flex;
  align-items: flex-end;
  gap: 0.15em;
  height: 0.8em;
}

.ui-sig i {
  width: 0.22em;
  border-radius: 0.1em;
  background: var(--ink);
}

.ui-sig i:nth-child(1) { height: 40%; }
.ui-sig i:nth-child(2) { height: 70%; }
.ui-sig i:nth-child(3) { height: 100%; }

.ui-screen__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.95em;
  min-height: 0;
  padding: 0.6em 1.25em 1em;
}

.ui-push {
  margin-top: auto;
}

.ui-screen .ui-title {
  font-size: 1.55em;
}

.ui-home {
  flex: none;
  width: 6.5em;
  height: 0.32em;
  margin: 0.45em auto 0.55em;
  border-radius: 1em;
  background: var(--ink);
}

.ui-apphead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-apphead .ui-av {
  width: 2.4em;
  height: 2.4em;
}

.ui-map {
  position: relative;
  height: 8.5em;
  flex: none;
  border-radius: 0.9em;
  overflow: hidden;
}

.ui-map svg {
  width: 100%;
  height: 100%;
}

.ui-map__eta {
  position: absolute;
  left: 0.6em;
  top: 0.6em;
  padding: 0.35em 0.7em;
  border-radius: 99em;
  background: #fff;
  color: var(--ink);
  font-size: 0.88em;
  font-weight: 600;
  box-shadow: 0 0.2em 0.6em rgba(16, 25, 35, 0.12);
}

.ui-timeline {
  display: grid;
  list-style: none;
}

.ui-timeline li {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 0 0.85em 1.6em;
  color: var(--subtle);
}

.ui-timeline li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.3em;
  width: 0.7em;
  height: 0.7em;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.ui-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.52em;
  top: 1.15em;
  bottom: 0.05em;
  width: 1.5px;
  background: var(--line);
}

.ui-timeline .is-done,
.ui-timeline .is-now {
  color: var(--ink);
}

.ui-timeline .is-done::before {
  border-color: var(--accent);
  background: var(--accent);
}

.ui-timeline .is-done::after {
  background: var(--accent) !important;
}

.ui-timeline .is-now::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25em var(--accent-soft);
}

.ui-timeline .is-now span {
  font-weight: 600;
}

.ui-timeline time {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.ui-check {
  list-style: none;
}

.ui-check li {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.7em 0;
  border-bottom: 1px solid #eef0ec;
  color: var(--ink);
}

.ui-tick {
  display: grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8em;
}

.ui-tick--todo {
  border: 1.5px solid var(--line-strong);
  background: #fff;
}

.ui-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45em;
}

.ui-photos i,
.ui-photos b {
  aspect-ratio: 1;
  border-radius: 0.6em;
}

.ui-photos i {
  background: linear-gradient(135deg, #cfe7e1, #9fcfc3);
}

.ui-photos i:nth-child(2) {
  background: linear-gradient(135deg, #e7e2d6, #cfc5ae);
}

.ui-photos i:nth-child(3) {
  background: linear-gradient(135deg, #dde3ea, #b8c4d2);
}

.ui-photos b {
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  color: var(--subtle);
  font-size: 1.3em;
  font-weight: 400;
}

.ui-notes {
  padding: 0.65em 0.8em;
  border: 1px solid var(--line);
  border-radius: 0.65em;
  color: var(--ink);
}

.ui-notes span {
  display: block;
  margin-bottom: 0.15em;
  color: var(--subtle);
  font-size: 0.85em;
}

.ui-service {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.75em;
  border-radius: 0.8em;
  background: #f4f6f3;
}

.ui-service i {
  flex: none;
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.65em;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
}

.ui-service span {
  color: var(--ink);
  font-weight: 600;
}

.ui-service small {
  display: block;
  color: var(--subtle);
  font-weight: 400;
}

.ui-screen .ui-panel__h {
  margin: 0.2em 0 -0.4em !important;
}

.ui-days,
.ui-slots {
  display: grid;
  gap: 0.45em;
}

.ui-days {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ui-slots {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ui-days span,
.ui-slots span {
  padding: 0.6em 0.2em;
  border: 1px solid var(--line);
  border-radius: 0.65em;
  color: var(--muted);
  text-align: center;
}

.ui-days span {
  font-size: 0.85em;
}

.ui-days b {
  display: block;
  color: var(--ink);
  font-size: 1.45em;
  font-weight: 600;
}

.ui-days .is-on,
.ui-slots .is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.ui-days .is-on b {
  color: #fff;
}

.ui-slots .is-off {
  color: var(--line-strong);
  text-decoration: line-through;
}

.ui-tabbar {
  display: grid;
  flex: none;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.8em 0.5em 0.1em;
  border-top: 1px solid #eef0ec;
  color: var(--subtle);
  font-size: 0.85em;
  text-align: center;
}

.ui-tabbar .is-on {
  color: var(--accent);
  font-weight: 600;
}

.ui-phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3em;
  padding: 0.5em 0 1.5em;
  font-size: 1.1em;
}

.ui-phones .ui-phone:last-child {
  margin-top: 3em;
}

/* Document review */
.ui-doc {
  display: grid;
  align-content: start;
  gap: 0.55em;
  padding: 1.4em 1.3em;
  border: 1px solid #e8eae5;
  border-radius: 0.4em;
  background: #fff;
  box-shadow: 0.4em 0.4em 0 #f1f2ef;
}

.ui-doc__h {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.ui-line {
  display: block;
  height: 0.45em;
  border-radius: 1em;
  background: #eceee9;
}

.ui-doc__rows {
  display: grid;
  gap: 0.45em;
  margin-top: 0.9em;
  padding-top: 0.8em;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.ui-doc__rows p {
  display: flex;
  justify-content: space-between;
}

.ui-doc__total {
  padding-top: 0.45em;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}

.ui-fields {
  display: grid;
  align-content: start;
  gap: 0.5em;
}

.ui-field {
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 0.75em;
  border: 1px solid #e8eae5;
  border-radius: 0.5em;
}

.ui-field span {
  color: var(--subtle);
}

.ui-field b {
  color: var(--ink);
  font-weight: 500;
}

.ui-field.is-flag {
  border-color: #efc76b;
  background: #fffaf0;
}

.ui-conf {
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--success-soft);
  color: #0b6b57;
  font-size: 0.8em;
  font-style: normal;
  font-weight: 700;
}

.ui-conf--flag {
  background: #fcf1d8;
  color: #845400;
}

.ui-note {
  padding: 0.2em 0.1em 0.4em;
  color: #845400;
}

/* System diagram */
.sys {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.5em minmax(0, 1.1fr) 3.5em minmax(0, 1fr);
  padding: 2em 2em 1.4em;
  background-image: radial-gradient(circle, #e1e2db 1px, transparent 1.2px);
  background-size: 1.8em 1.8em;
}

.sys__col {
  display: grid;
  align-content: start;
  gap: 0.7em;
}

.sys__label {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sys__node {
  padding: 0.85em 1em;
  border: 1px solid var(--line-strong);
  border-radius: 0.6em;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

.sys__node small {
  display: block;
  color: var(--subtle);
  font-weight: 400;
}

.sys__node--core {
  padding-block: 1.3em;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.sys__node--core small {
  color: var(--teal);
}

.sys__wire {
  position: relative;
  margin-top: 1.6em;
}

.sys__wire::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.3em;
  right: 0.3em;
  border-top: 1px dashed var(--subtle);
}

.sys__wire::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.3em);
  right: 0.3em;
  width: 0.6em;
  height: 0.6em;
  border-top: 1px solid var(--subtle);
  border-right: 1px solid var(--subtle);
  transform: rotate(45deg);
}

.sys__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.8em;
  grid-column: 1 / -1;
  margin-top: 1.6em;
  padding-top: 1em;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
}

.sys__foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

/* Narrow frames: drop the sidebar and shrink grids so the picture stays legible */
@container (max-width: 480px) {
  .ui {
    font-size: clamp(7.5px, 2.3cqi, 11px);
  }

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

  .ui-side,
  .ui-col:nth-child(n + 3),
  .ui-kpi:nth-child(n + 3),
  .ui-split--chart .ui-panel:last-child {
    display: none;
  }

  .ui-board,
  .ui-kpis,
  .ui-split--chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .ui-doc {
    display: none;
  }

  .ui-phones .ui-phone:last-child {
    display: none;
  }

  .sys {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2em;
    padding: 1.4em;
  }

  .sys__wire {
    display: none;
  }
}

/* ---------- Home: hero ---------- */
.home-hero {
  padding-top: clamp(2.75rem, 6vw, 5.5rem);
  padding-bottom: var(--section-y);
  overflow: hidden;
}

.home-hero h1 {
  max-width: 14ch;
}

.home-hero__grid {
  display: grid;
  gap: var(--s-7);
}

.home-hero__copy .lede {
  max-width: 34rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text);
}

.home-hero__copy .btn-row {
  margin-top: var(--s-6);
}

.home-hero__note {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-strong);
  color: var(--subtle);
  font-size: var(--fs-label);
}

.home-hero__visual,
.ui-combo {
  position: relative;
  padding-bottom: 6%;
}

.home-hero__visual .ui-window,
.ui-combo .ui-window {
  width: 86%;
}

.home-hero__visual .ui-phone,
.ui-combo .ui-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.84em;
}

@media (min-width: 1100px) {
  .home-hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
  }

  .home-hero h1 {
    font-size: clamp(3.25rem, 4.6vw, 4.75rem);
  }

  .home-hero__visual {
    margin-right: calc(var(--gutter) * -0.5);
  }
}

/* Shared caption for concept visuals */
.concept-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.concept-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-mid);
}

/* ---------- Home: what we build ---------- */
.build {
  display: grid;
  gap: var(--s-7) var(--col-gap);
  list-style: none;
}

@media (min-width: 640px) {
  .build {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .build {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.build__item {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--ink);
}

.build__art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--s-2);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}

.build__art svg {
  width: 62%;
  height: auto;
  color: var(--ink);
}

.build__item h3 {
  font-size: var(--fs-h4);
  letter-spacing: -0.02em;
}

.build__item h3 a {
  text-decoration: none;
}

.build__item h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
}

.build__item p {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.build__item p strong {
  display: block;
  margin-bottom: var(--s-1);
  color: var(--ink);
  font-weight: 500;
}

.build__item .meta {
  font-size: 12px;
}

.build__item .text-link {
  font-size: var(--fs-sm);
}

.build-more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.build-more a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: var(--line-strong);
}

/* ---------- Home: showcase ---------- */
.showcase__tabs {
  display: flex;
  gap: var(--s-1);
  margin-bottom: var(--s-5);
  overflow-x: auto;
  scrollbar-width: none;
}

.showcase__tabs::-webkit-scrollbar {
  display: none;
}

.showcase__tab {
  flex: none;
  min-height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.showcase__tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.showcase__tab[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Without JavaScript the tabs are hidden and every panel is shown in turn */
.showcase__tabs {
  display: none;
}

.js .showcase__tabs {
  display: flex;
}

.showcase__panel {
  display: grid;
  gap: var(--s-6) var(--col-gap);
}

.showcase__panel + .showcase__panel {
  margin-top: var(--s-8);
}

.js .showcase__panel + .showcase__panel {
  margin-top: 0;
}

/* With JavaScript, panels share one grid cell so switching tabs never changes the height */
.js .showcase__panels {
  display: grid;
}

.js .showcase__panel {
  grid-area: 1 / 1;
}

.showcase__panel[hidden] {
  display: grid;
  visibility: hidden;
}

.showcase__stage {
  display: grid;
  align-content: center;
  position: relative;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}

.showcase__stage .concept-tag {
  position: absolute;
  top: 12px;
  right: 16px;
}

.showcase__stage .ui-frame {
  margin-top: var(--s-4);
}

.showcase__text h3 {
  font-size: var(--fs-h3);
}

.showcase__text > p {
  margin-top: var(--s-3);
  color: var(--muted);
}

.showcase__text ul {
  margin-top: var(--s-5);
}

.showcase__text .text-link {
  margin-top: var(--s-5);
}

@media (min-width: 960px) {
  .showcase__panel {
    grid-template-columns: minmax(0, 8.5fr) minmax(0, 3.5fr);
    align-items: center;
  }
}

/* ---------- Home: engagement ---------- */
.engage {
  display: grid;
  gap: var(--s-6) var(--col-gap);
  list-style: none;
  counter-reset: step;
}

@media (min-width: 700px) {
  .engage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .engage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.engage li {
  padding-top: var(--s-4);
  border-top: 1px solid var(--dark-line-strong);
}

.engage li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--s-5);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
}

.engage h3 {
  font-size: var(--fs-h3);
}

.engage p {
  margin-top: var(--s-3);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.expect {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--dark-line);
}

@media (min-width: 900px) {
  .expect {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    column-gap: var(--col-gap);
  }
}

.expect h3 {
  color: var(--on-dark);
  font-size: var(--fs-h4);
}

.expect ul {
  display: grid;
  gap: var(--s-4) var(--col-gap);
  list-style: none;
}

@media (min-width: 700px) {
  .expect ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.expect li {
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.expect strong {
  display: block;
  color: var(--on-dark);
  font-weight: 500;
}

/* ---------- Service page visual ---------- */
.service-visual {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}

.service-visual figcaption {
  margin-top: var(--s-4);
}

@media (min-width: 900px) {
  /* Line the picture up with the content column of the rail grid */
  .service-visual {
    margin-left: calc((100% - var(--col-gap)) * 3 / 12 + var(--col-gap));
  }
}

/* Portal mockup */
.ui-topnav {
  display: flex;
  align-items: center;
  gap: 1.6em;
  padding: 0.85em 1.4em;
  border-bottom: 1px solid #eceee9;
  color: var(--muted);
}

.ui-topnav .ui-brand {
  margin: 0 0.6em 0 0 !important;
  padding: 0;
}

.ui-topnav .is-on {
  color: var(--ink);
  font-weight: 600;
}

.ui-topnav .ui-av {
  margin-left: auto;
}

.ui-portal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15em;
}

.ui-kpis--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ui-aside {
  display: grid;
  align-content: start;
  gap: 0.6em;
  padding: 1.2em 1.2em 1.4em;
  border-left: 1px solid #eceee9;
  background: #fafbf9;
}

.ui-input {
  display: block;
  padding: 0.55em 0.7em;
  border: 1px solid var(--line-strong);
  border-radius: 0.45em;
  background: #fff;
  color: var(--ink);
}

.ui-input--area {
  min-height: 6em;
  color: var(--muted);
}

.ui-small {
  font-size: 0.88em;
}

.ui-link {
  color: var(--accent);
  font-weight: 500;
}

/* Handover tree */
.ui-tree {
  display: grid;
  gap: 0.15em;
  padding: 1.3em 1.5em 1.4em;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.3em;
}

.ui-tree p {
  display: flex;
  gap: 0.5em;
  align-items: baseline;
  padding: 0.25em 0;
  white-space: nowrap;
}

.ui-tree .d1 { padding-left: 1.6em; }
.ui-tree .d2 { padding-left: 3.4em; color: var(--muted); }

.ui-tree b {
  color: var(--subtle);
  font-weight: 400;
}

.ui-tree em {
  margin-left: auto;
  overflow: hidden;
  color: var(--subtle);
  font-family: var(--font-sans);
  font-size: 0.88em;
  font-style: normal;
  text-overflow: ellipsis;
}

.ui-tree__ci {
  align-items: center !important;
  margin-top: 0.6em;
  padding-top: 0.8em !important;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--font-sans);
}

@container (max-width: 480px) {
  .ui-portal {
    grid-template-columns: minmax(0, 1fr);
  }

  .ui-aside,
  .ui-topnav span:not(.is-on):not(.ui-av),
  .ui-tree em {
    display: none;
  }
}

/* ---------- Home: what changes (before / after) ---------- */
.shift {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  list-style: none;
}

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

.shift__head {
  display: none;
}

.shift__row + .shift__row {
  border-top: 1px solid var(--line);
}

.shift__before,
.shift__after {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4) var(--s-5);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.shift__before {
  background: var(--paper-2);
  color: var(--muted);
}

.shift__after {
  color: var(--ink);
  font-weight: 500;
}

.shift__before::before,
.shift__after::before {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.shift__before::before {
  content: "×";
  background: #e2e4df;
  color: var(--subtle);
}

.shift__after::before {
  content: "✓";
  background: var(--accent);
  color: #fff;
}

.shift__arrow {
  display: none;
}

@media (min-width: 760px) {
  .shift__head,
  .shift__row {
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  }

  .shift__head {
    display: grid;
    border-bottom: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--subtle);
  }

  .shift__head span {
    padding: var(--s-3) var(--s-5);
  }

  .shift__head span:first-child {
    background: var(--paper-2);
  }

  .shift__head span:last-child {
    color: var(--accent);
  }

  .shift__head .shift__arrow {
    padding: 0;
  }

  /* Centre icon, text and arrow on one line, however many lines the text wraps to */
  .shift__before,
  .shift__after {
    align-items: center;
    padding: var(--s-5);
  }

  .shift__before::before,
  .shift__after::before {
    margin-top: 0;
  }

  .shift__arrow {
    display: grid;
    place-items: center;
    background: linear-gradient(90deg, var(--paper-2) 50%, var(--surface) 50%);
    color: var(--accent);
  }

  .shift__arrow svg {
    width: 20px;
    height: 20px;
  }
}

/* ---------- Home: technology stack ---------- */
.stack {
  display: grid;
  gap: 10px;
}

.stack__layer {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
}

.stack__name {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  color: var(--ink);
  font-weight: 500;
}

.stack__name span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.chips li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.stack__layer--core {
  border-color: var(--ink);
  background: var(--ink);
}

.stack__layer--core .stack__name {
  color: #fff;
}

.stack__layer--core .stack__name span {
  color: var(--teal);
}

.stack__layer--core .chips li {
  border-color: var(--dark-line-strong);
  background: transparent;
  color: var(--on-dark);
}

.stack__layer--side {
  border-style: dashed;
  border-color: var(--teal-mid);
  background: var(--accent-soft);
}

.stack__note {
  margin-top: var(--s-5);
  color: var(--muted);
  font-size: var(--fs-sm);
}

@media (min-width: 900px) {
  .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.85fr);
  }

  .stack__layer--wide {
    grid-column: 1 / 3;
  }

  .stack__layer--side {
    grid-column: 3;
    grid-row: 1 / span 4;
  }
}

/* ---------- Home: ways to start ---------- */
.starts {
  display: grid;
  gap: var(--s-6) var(--col-gap);
  list-style: none;
}

@media (min-width: 700px) {
  .starts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .starts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.starts li {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: var(--s-3);
  padding: var(--s-5);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--ink);
  border-radius: 0 0 var(--r) var(--r);
  background: var(--surface);
}

.starts li:first-child {
  border-top-color: var(--accent);
}

.starts .meta {
  font-size: 12px;
}

.starts h3 {
  font-size: var(--fs-h4);
}

.starts p {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.starts .starts__out {
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}

.starts__out::before {
  content: "→ ";
  color: var(--accent);
}

/* ---------- Solutions page ---------- */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
}

.jump a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}

.jump a:hover {
  border-color: var(--ink);
}

.solution {
  display: grid;
  gap: var(--s-6) var(--col-gap);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line-strong);
}

.solution:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 960px) {
  .solution {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .solution--flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .solution--flip .showcase__stage {
    order: 2;
  }
}

.solution__text h2 {
  margin-top: var(--s-2);
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.solution__text > p {
  margin-top: var(--s-3);
  color: var(--muted);
}

.solution__text h3 {
  margin: var(--s-5) 0 var(--s-2);
  color: var(--subtle);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0;
}

.solution__text .text-link {
  margin-top: var(--s-5);
}

.industries {
  display: grid;
  gap: var(--s-6) var(--col-gap);
  list-style: none;
}

@media (min-width: 700px) {
  .industries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .industries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.industries > li {
  padding-top: var(--s-4);
  border-top: 1px solid var(--ink);
}

.industries h3 {
  font-size: var(--fs-h4);
}

.industries p {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.industries .chips {
  margin-top: var(--s-3);
}

/* ---------- How we work: handover ---------- */
.handover {
  display: grid;
  gap: var(--s-6) var(--col-gap);
  align-items: center;
}

@media (min-width: 960px) {
  .handover {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.checks {
  display: grid;
  gap: var(--s-4);
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 2rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

@media (min-width: 700px) {
  .checks.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5) var(--col-gap);
  }
}

.checks strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Home: software catalogue explorer ---------- */
.cat {
  display: grid;
  gap: var(--s-5) var(--col-gap);
}

.cat__tabs {
  display: none;
  gap: var(--s-1);
}

.js .cat__tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat__tabs::-webkit-scrollbar {
  display: none;
}

.cat__tab {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.cat__tab svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.cat__tab small {
  display: block;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
}

.cat__tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cat__tab[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.cat__tab[aria-selected="true"] svg {
  color: var(--teal);
}

.cat__tab[aria-selected="true"] small {
  color: var(--on-dark-muted);
}

.cat__panel + .cat__panel {
  margin-top: var(--s-8);
}

.js .cat__panels {
  display: grid;
}

.js .cat__panel {
  grid-area: 1 / 1;
  margin-top: 0;
}

.cat__panel[hidden] {
  display: block;
  visibility: hidden;
}

.cat__panel {
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.cat__intro h3 {
  font-size: var(--fs-h3);
}

.cat__intro p {
  max-width: 40rem;
  margin-top: var(--s-2);
  color: var(--muted);
}

.cat__items {
  display: grid;
  gap: 0 var(--col-gap);
  margin-top: var(--s-5);
  list-style: none;
}

@media (min-width: 640px) {
  .cat__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cat__items li {
  display: grid;
  gap: 2px;
  padding: var(--s-4) 0 var(--s-4) 1.4rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.cat__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--s-4) + 0.55em);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-mid);
}

.cat__items strong {
  color: var(--ink);
  font-weight: 500;
}

.cat__items span {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.cat__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

@media (min-width: 960px) {
  .cat {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    align-items: start;
  }

  .js .cat__tabs {
    flex-direction: column;
    overflow: visible;
  }

  .cat__tab {
    padding: var(--s-4);
  }
}

/* ---------- Services: full catalogue ---------- */
.catalogue {
  display: grid;
  gap: var(--s-8);
}

.catalogue__group {
  display: grid;
  gap: var(--s-5) var(--col-gap);
}

@media (min-width: 900px) {
  .catalogue__group {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  }
}

.catalogue__head > svg {
  width: 28px;
  height: 28px;
  margin-bottom: var(--s-3);
  color: var(--accent);
}

.catalogue__head h3 {
  font-size: var(--fs-h4);
}

.catalogue__head p {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.catalogue__head .text-link {
  margin: var(--s-3) var(--s-4) 0 0;
  font-size: var(--fs-sm);
}

.catalogue__group .cat__items {
  margin-top: 0;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
