/*
 * Idabyte site styles: the Control room design in Violet on graphite.
 * Light theme on :root, dark theme when the device prefers dark.
 * Spec: docs/superpowers/specs/2026-09-23-violet-control-room-site-design.md
 */

@font-face {
  font-family: 'Ubuntu Sans';
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('../fonts/ubuntu-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Ubuntu Sans Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/ubuntu-sans-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #F5F6F8;
  --bg-alt: #ECEEF2;
  --panel: #FFFFFF;
  --code-bg: #FFFFFF;
  --code-head: #EEF0F4;
  --surface: #FFFFFF;
  --node: #FFFFFF;
  --line: #E0E3E8;
  --border: #D5D9E0;
  --border-strong: #C7CCD5;
  --btn-border: #ADB4C0;
  --text: #111418;
  --body: #3F4652;
  --muted: #5E6573;
  --list: #1D222A;
  --code-num: #9CA3AF;
  --code-comment: #6B7280;
  --accent: #6D3FE0;
  --on-accent: #FFFFFF;
  --tag-text: #5A2FC2;
  --hub-text: #5A2FC2;
  --link-hover: #5A2FC2;
  --partner-bg: #F5F2FF;
  --success: #0F7A4A;
  --success-text: #0B6B3F;
  --legacy: #B7791F;
  --legacy-text: #8A5A00;
  --legacy-border: #E6C891;
  --modern-border: #A7D7BC;
  --inverse-bg: #111418;
  --inverse-text: #FFFFFF;
  --accent-tint: rgba(109, 63, 224, 0.08);
  --accent-line: rgba(109, 63, 224, 0.45);
  --accent-dot: rgba(109, 63, 224, 0.12);
  --success-bg: rgba(15, 122, 74, 0.06);
  --success-border: rgba(15, 122, 74, 0.26);
  --success-soft: rgba(15, 122, 74, 0.1);
  --logo-filter: none;
  --logo-opacity: 0.86;
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.3l3 3 7-7.2' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
  --font: 'Ubuntu Sans', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Ubuntu Sans Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: 96px;
  --section-y: 112px;
  --header-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1115;
    --bg-alt: #13161B;
    --panel: #14171C;
    --code-bg: #111418;
    --code-head: #181B21;
    --surface: #171A20;
    --node: #1C2027;
    --line: #23272F;
    --border: #2A2F38;
    --border-strong: #353B46;
    --btn-border: #4A5261;
    --text: #F1F3F6;
    --body: #B6BCC7;
    --muted: #8C939F;
    --list: #DCE0E6;
    --code-num: #545B67;
    --code-comment: #858C98;
    --accent: #A98BFF;
    --on-accent: #0F1115;
    --tag-text: #DCCFFF;
    --hub-text: #E5DBFF;
    --link-hover: #CDBBFF;
    --partner-bg: #18152A;
    --success: #5CD691;
    --success-text: #A7EBC3;
    --legacy: #F2B866;
    --legacy-text: #F2B866;
    --legacy-border: #56462C;
    --modern-border: #24553D;
    --inverse-bg: #F1F3F6;
    --inverse-text: #0F1115;
    --accent-tint: rgba(169, 139, 255, 0.14);
    --accent-line: rgba(169, 139, 255, 0.5);
    --accent-dot: rgba(169, 139, 255, 0.12);
    --success-bg: rgba(92, 214, 145, 0.08);
    --success-border: rgba(92, 214, 145, 0.28);
    --success-soft: rgba(92, 214, 145, 0.12);
    --logo-filter: invert(1);
    --logo-opacity: 0.9;
  }
}

@media (max-width: 1199px) {
  :root {
    --gutter: 48px;
    --section-y: 88px;
  }
}

@media (max-width: 719px) {
  :root {
    --gutter: 20px;
    --section-y: 56px;
    --header-h: 64px;
  }
}

/* ---------- 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(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

strong {
  color: var(--text);
  font-weight: 600;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

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

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-accent);
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Layout ---------- */

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

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

.section--band {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section--flush-top {
  padding-top: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 64px;
  margin-bottom: 48px;
}

.section-head--tight {
  margin-bottom: 36px;
}

.section-head p {
  max-width: 480px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.h-section {
  max-width: 640px;
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

@media (max-width: 1199px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--header-h);
}

/* The logo kit's lockup: black artwork in light mode, white in dark (a <picture> source). */
.brand {
  display: flex;
  flex: none;
  align-items: center;
}

.brand-logo {
  width: auto;
  height: 30px;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text);
}

.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle[aria-expanded="true"] .icon-open,
.nav-toggle[aria-expanded="false"] .icon-close {
  display: none;
}

@media (max-width: 1023px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 8px var(--gutter) 24px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

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

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

  .js .nav-list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.0625rem;
  }

  .js .site-nav .btn {
    width: 100%;
  }

  html:not(.js) .header-bar {
    flex-wrap: wrap;
    height: auto;
    padding-block: 14px;
    row-gap: 10px;
  }

  html:not(.js) .site-nav {
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 24px;
  }

  html:not(.js) .nav-list {
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
  }
}

@media (max-width: 719px) {
  .brand-logo {
    height: 26px;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

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

.btn--primary:hover {
  background: var(--link-hover);
  color: var(--on-accent);
}

.btn--secondary {
  border-color: var(--btn-border);
  background: transparent;
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn--inverse {
  background: var(--inverse-bg);
  color: var(--inverse-text);
}

.btn--inverse:hover {
  color: var(--inverse-text);
  opacity: 0.88;
}

.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.btn--md {
  min-height: 48px;
  font-size: 0.9375rem;
}

.btn--lg {
  min-height: 54px;
}

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

/* ---------- Tags, lists, icons ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--tag-text);
  font-size: 0.78125rem;
  font-weight: 600;
  line-height: 1.4;
}

.tag--solid {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.tag--success {
  background: var(--success-soft);
  color: var(--success-text);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 10px;
  color: var(--list);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.check-list li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  background: var(--success);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.check-list--accent li::before {
  background: var(--accent);
}

.icon-tile {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent-tint);
  color: var(--accent);
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

.icon-tile--sm {
  width: 32px;
  height: 32px;
}

.icon-tile--sm svg {
  width: 18px;
  height: 18px;
}

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot--legacy {
  background: var(--legacy);
}

.dot--modern {
  background: var(--success);
}

.text-link {
  font-weight: 600;
}

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

.site-footer {
  padding: 16px 0 44px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand--footer .brand-logo {
  height: 28px;
}

.footer-brand p {
  max-width: 300px;
  color: var(--muted);
  font-size: 0.90625rem;
}

.footer-col h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.footer-list a,
.footer-col address {
  color: var(--body);
  font-size: 0.90625rem;
  font-style: normal;
  line-height: 1.6;
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-col address {
  margin-top: 10px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 1199px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }
}

/* ---------- Consent prompt ---------- */

.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.consent[hidden] {
  display: none;
}

.consent:focus-visible {
  outline: none;
}

.consent-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 24px;
  width: 100%;
  max-width: 720px;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  pointer-events: auto;
}

.consent:focus-visible .consent-inner {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.consent-title {
  color: var(--text);
  font-weight: 600;
}

.consent-text {
  color: var(--body);
  font-size: 0.9375rem;
}

.consent-actions {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 12px;
}

.footer-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--body);
  font: inherit;
  font-size: 0.90625rem;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}

.footer-button:hover {
  color: var(--text);
  text-decoration: underline;
}

html:not(.js) .consent-link {
  display: none;
}

@media (max-width: 719px) {
  .consent-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .consent-actions {
    grid-column: auto;
    grid-row: auto;
    margin-top: 8px;
  }

  .consent-actions .btn {
    flex: 1;
  }
}

/* ---------- Text pages: privacy policies and support ---------- */

.page {
  padding-block: 72px 112px;
}

.prose {
  max-width: 600px;
}

.prose > * + * {
  margin-top: 1rem;
}

.page-title {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose > .page-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.prose > .page-meta + * {
  margin-top: 32px;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.prose p,
.prose li {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose ul:not([class]),
.prose ol:not([class]) {
  padding-left: 1.4em;
}

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

.callout {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.callout > * + * {
  margin-top: 8px;
}

.callout h3,
.prose .callout h3 {
  margin-top: 0;
  font-size: 1.0625rem;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prose > .faq-item {
  margin-top: 0;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.prose > h2 + .faq-item {
  margin-top: 16px;
}

.prose .faq-item h3 {
  margin-top: 0;
}

.prose .faq-item p {
  margin-top: 6px;
}

@media (max-width: 719px) {
  .page {
    padding-block: 40px 64px;
  }
}

/* ---------- Word Wise landing ---------- */

.ww-hero {
  padding-block: 88px 96px;
  border-bottom: 1px solid var(--line);
}

.ww-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}

.ww-title {
  font-size: clamp(2.375rem, 1.4rem + 2.8vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.ww-deck {
  margin-top: 18px;
  color: var(--accent);
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.ww-tagline {
  max-width: 600px;
  margin-top: 16px;
  font-size: 1.125rem;
  line-height: 1.6;
}

.ww-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.ww-badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
}

.ww-badges li::before {
  content: "";
  width: 13px;
  height: 13px;
  background: var(--success);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.store-link {
  display: inline-block;
  border-radius: 10px;
}

.store-link img {
  width: 168px;
  height: 56px;
}

.ww-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.ww-icon {
  width: 240px;
  height: 240px;
  border: 1px solid var(--border);
  border-radius: 22%;
}

.ww-section-title {
  margin-bottom: 36px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  list-style: none;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.feature-card h3 {
  margin-top: 4px;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.feature-card p {
  font-size: 0.96875rem;
  line-height: 1.6;
}

.ww-narrow {
  max-width: 760px;
}

.ww-narrow > * + * {
  margin-top: 16px;
}

.ww-narrow p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.ww-narrow > .callout {
  margin-top: 28px;
}

.check-list--rows {
  gap: 0;
  margin-top: 24px;
}

.check-list--rows li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.check-list--rows li:last-child {
  border-bottom: 0;
}

.check-list--rows li::before {
  margin-top: 5px;
}

@media (max-width: 1199px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .ww-hero {
    padding-block: 48px 56px;
  }

  .ww-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ww-icon {
    order: -1;
    width: 96px;
    height: 96px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Homepage: hero and integration map ---------- */

.hero {
  padding-block: 88px 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-title {
  font-size: clamp(2.375rem, 0.25rem + 3.75vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 560px;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.1875rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-proof {
  max-width: 540px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.90625rem;
}

@media (min-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 576px;
    align-items: center;
  }
}

.map {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 576px;
  padding: 24px 27px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: var(--panel);
  background-image: radial-gradient(var(--accent-dot) 1px, transparent 1.3px);
  background-size: 20px 20px;
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-title {
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.map-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Shown only where the flow lines move: with scripts, motion allowed, and the full diagram. */
.map-pause {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.map-pause:hover {
  border-color: var(--btn-border);
  color: var(--text);
}

.map-pause svg {
  fill: currentColor;
}

.map-play-icon,
.map.is-paused .map-pause-icon {
  display: none;
}

.map.is-paused .map-play-icon {
  display: block;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 720px) {
  .js .map-pause {
    display: inline-flex;
  }
}

.map-canvas {
  position: relative;
  width: 520px;
  height: 346px;
}

.map-lines {
  position: absolute;
  inset: 0;
}

.map-line {
  fill: none;
  stroke: var(--accent-line);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.map-line--legacy {
  stroke: var(--legacy);
  stroke-dasharray: 5 5;
}

@media (prefers-reduced-motion: no-preference) {
  .map-line {
    animation: map-flow 1.6s linear 3;
  }

  .map-line--legacy {
    animation-name: map-flow-legacy;
  }

  /* With scripts the lines keep flowing, and the pause button can stop them. */
  .js .map-line {
    animation-iteration-count: infinite;
  }

  .map.is-paused .map-line {
    animation-play-state: paused;
  }
}

/* Each loop moves a whole number of dash repeats (4+4 and 5+5), so the flow never jumps. */
@keyframes map-flow {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes map-flow-legacy {
  to {
    stroke-dashoffset: -20;
  }
}

.map-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--node);
}

.map-node--legacy {
  border-color: var(--legacy-border);
}

.map-node--modern {
  border-color: var(--modern-border);
}

.map-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.map-desc {
  color: var(--muted);
  font-size: 0.71875rem;
  line-height: 1.35;
}

.map-canvas .map-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 164px;
  height: 70px;
}

.map-canvas .map-node--s2 {
  top: 92px;
}

.map-canvas .map-node--s3 {
  top: 184px;
}

.map-canvas .map-node--s4 {
  top: 276px;
}

.map-canvas .map-node--d1,
.map-canvas .map-node--d2,
.map-canvas .map-node--d3 {
  left: 356px;
  height: 82px;
}

.map-canvas .map-node--d2 {
  top: 132px;
}

.map-canvas .map-node--d3 {
  top: 264px;
}

.map-hub {
  position: absolute;
  top: 86px;
  left: 202px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 116px;
  height: 174px;
  padding: 14px 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-tint);
}

.map-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-chip {
  padding: 3px 7px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  color: var(--hub-text);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.map figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 719px) {
  .hero {
    padding-block: 40px 36px;
  }

  .hero-copy {
    gap: 22px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-title .nowrap {
    white-space: normal;
  }

  /* Phones get the headline and actions only; the diagram needs the width. */
  .map {
    display: none;
  }
}

/* Narrow phones: scale the headline with the screen so its longest line still fits. */
@media (max-width: 374px) {
  .hero-title {
    font-size: calc((100vw - 40px) * 0.112);
  }
}

/* ---------- Homepage: clients ---------- */

.clients {
  padding-bottom: 104px;
}

.clients-title {
  margin-bottom: 28px;
  font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* A wall of equal tiles: the list's line-coloured background shows through the 1px gaps as hairlines. */
.clients-list {
  --logo-scale: 1.45;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  list-style: none;
}

.clients-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 136px;
  padding: 0 24px;
  background: var(--code-bg);
}

.clients-list a:hover {
  background: linear-gradient(var(--accent-tint), var(--accent-tint)), var(--code-bg);
}

/* The tiles sit edge to edge, so the focus ring goes inside. */
.clients-list a:focus-visible {
  outline-offset: -4px;
}

/* The logos are black artwork; the theme tokens set their colour and strength. */
.clients-list img {
  width: calc(var(--logo-w) * var(--logo-scale));
  max-width: 100%;
  height: auto;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
}

.clients-list a:hover img,
.clients-list a:focus-visible img {
  opacity: 1;
}

/* Widths balance the logos by eye: wide or dense marks are set smaller. */
.logo-markerstudy {
  --logo-w: 123px;
}

.logo-inawisdom {
  --logo-w: 160px;
}

.logo-paypoint {
  --logo-w: 82px;
}

.logo-next {
  --logo-w: 104px;
}

.logo-bromcom {
  --logo-w: 158px;
}

.logo-carechampion {
  --logo-w: 103px;
}

@media (max-width: 1199px) {
  .clients-list {
    --logo-scale: 1.2;
  }

  .clients-list a {
    height: 120px;
  }
}

@media (max-width: 719px) {
  .clients {
    padding-bottom: 44px;
  }

  .clients-title {
    margin-bottom: 18px;
  }

  .clients-list {
    --logo-scale: 0.85;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-list a {
    height: 96px;
    padding: 0 16px;
  }
}

/* ---------- Homepage: problems we solve ---------- */

.problems {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  list-style: none;
}

.problems li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px 34px;
}

.problems li + li {
  border-left: 1px solid var(--border);
}

.problems h3 {
  margin-top: 6px;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.problems p {
  font-size: 0.96875rem;
  line-height: 1.6;
}

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

  .problems li + li {
    border-left: 0;
  }

  .problems li:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .problems li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 719px) {
  .problems {
    grid-template-columns: 1fr;
  }

  .problems li:nth-child(even) {
    border-left: 0;
  }

  .problems li + li {
    border-top: 1px solid var(--border);
  }
}

/* ---------- Homepage: services ---------- */

.offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  list-style: none;
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 28px 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.offer--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.offer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 23px;
}

.offer-step {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.offer--featured .offer-step {
  color: var(--accent);
}

.offer h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.offer-meta {
  color: var(--text);
  font-size: 0.90625rem;
  font-weight: 600;
}

.offer-desc {
  font-size: 0.96875rem;
  line-height: 1.6;
}

.offer .check-list {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.offer .btn {
  margin-top: auto;
}

@media (max-width: 1199px) {
  .offers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 719px) {
  .offers {
    grid-template-columns: 1fr;
  }

  .offer h3 {
    font-size: 1.375rem;
  }
}

/* ---------- Homepage: how we work ---------- */

.approach-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  gap: 80px;
  align-items: center;
  margin-bottom: 72px;
}

.approach-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.approach-copy p {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.sow {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--code-bg);
}

.sow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--code-head);
}

.sow-file {
  color: var(--list);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.sow-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.sow-code {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px 26px;
  color: var(--list);
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.sow-line {
  display: flex;
  gap: 18px;
}

.sow-num {
  flex: none;
  width: 18px;
  color: var(--code-num);
  text-align: right;
  user-select: none;
}

.sow-indent {
  padding-left: 2ch;
}

.sow-comment {
  color: var(--code-comment);
}

.sow-key {
  color: var(--accent);
}

.sow-ok {
  color: var(--success);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.step-num {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.step-num--done {
  border-color: var(--success);
  color: var(--success);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.step h3 {
  font-size: 1.1875rem;
}

.step p {
  font-size: 0.96875rem;
  line-height: 1.6;
}

.step .tag {
  align-self: flex-start;
  margin-top: 4px;
}

@media (max-width: 1199px) {
  .approach-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sow {
    max-width: 640px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
}

@media (max-width: 719px) {
  .approach-top {
    margin-bottom: 48px;
  }

  .sow-code {
    font-size: 0.8125rem;
  }

  .sow-line {
    gap: 12px;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Homepage: case studies ---------- */

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.case {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-client {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

.case h3 {
  font-size: 1.4375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.case-facts {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px 18px;
}

.case-facts dt {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.case-facts dd {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.outcome {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--success-border);
  border-radius: 8px;
  background: var(--success-bg);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.outcome::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: var(--success);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.outcome-label {
  color: var(--success-text);
  font-weight: 600;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 0;
  list-style: none;
}

.tech-tags li {
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--body);
  font-size: 0.78125rem;
}

@media (max-width: 1023px) {
  .cases {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .case {
    padding: 22px;
  }

  .case-facts {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .case-facts dd + dt {
    margin-top: 10px;
  }
}

/* ---------- Homepage: partners ---------- */

.partner {
  padding-top: var(--section-y);
}

.partner-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  padding: 56px;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  background-color: var(--partner-bg);
  background-image: radial-gradient(var(--accent-dot) 1px, transparent 1.3px);
  background-size: 20px 20px;
}

.partner-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.partner-label {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.partner-title {
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.375rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.partner-text {
  font-size: 1.03125rem;
  line-height: 1.65;
}

.partner .check-list {
  margin-top: 4px;
}

.partner .check-list li {
  color: var(--text);
  font-size: 0.96875rem;
}

.partner-band .btn {
  flex: none;
}

@media (max-width: 1023px) {
  .partner-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding: 40px;
  }
}

@media (max-width: 719px) {
  .partner-band {
    padding: 28px 22px;
  }

  .partner-band .btn {
    width: 100%;
  }
}

/* ---------- Homepage: technologies ---------- */

.stack-title {
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-head .stack-intro {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.96875rem;
  line-height: 1.6;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stack-grid h3 {
  font-size: 0.90625rem;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  font-size: 0.90625rem;
  line-height: 1.5;
  list-style: none;
}

@media (max-width: 1199px) {
  .stack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }
}

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

/* ---------- Homepage: about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 540px;
  gap: 80px;
  align-items: start;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-copy p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
}

.facts div:nth-child(even) {
  border-left: 1px solid var(--border);
}

.facts div:nth-child(n + 3) {
  border-top: 1px solid var(--border);
}

.facts dt {
  color: var(--muted);
  font-size: 0.78125rem;
}

.facts dd {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.facts a {
  color: var(--text);
}

.team {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.person {
  display: flex;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.person picture {
  flex: none;
}

.person img {
  width: 104px;
  height: 104px;
  border-radius: 10px;
  object-fit: cover;
  filter: grayscale(1);
}

.person-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.person h3 {
  font-size: 1.25rem;
}

.person-role {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.person-bio {
  margin-top: 4px;
  font-size: 0.90625rem;
  line-height: 1.55;
}

.person-link {
  margin-top: 6px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (max-width: 1199px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .team {
    max-width: 640px;
  }
}

@media (max-width: 719px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .facts div:nth-child(even) {
    border-left: 0;
  }

  .facts div + div {
    border-top: 1px solid var(--border);
  }

  .person {
    flex-direction: column;
    gap: 16px;
  }
}

/* ---------- Homepage: consultation ---------- */

.consult-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 64px;
  padding: 64px 56px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
}

.consult-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.consult-title {
  font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.consult-copy p {
  font-size: 1.09375rem;
  line-height: 1.65;
}

.consult-actions {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 12px;
  width: 320px;
}

@media (max-width: 1023px) {
  .consult-band {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 40px;
  }

  .consult-actions {
    width: auto;
    max-width: 420px;
  }
}

@media (max-width: 719px) {
  .consult-band {
    padding: 28px 22px;
  }

  .consult-actions {
    max-width: none;
  }
}
