/* ==========================================================================
   Levisay Labs
   Plain CSS, no build step. Colours and type are set once as variables below.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License: see assets/fonts) --- */

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

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

/* ---------- Design tokens ------------------------------------------------- */

/* The site follows the visitor's light or dark setting. The toggle in the header
   overrides it by setting data-theme on <html>. */
:root {
  color-scheme: light;

  --bg: #f8f7f4;
  --surface: #ffffff;
  --sunken: #efeee9;

  --ink: #121211;
  --ink-2: #55544f;
  --ink-3: #6b6a64;
  --line: rgba(18, 18, 17, 0.12);
  --line-2: rgba(18, 18, 17, 0.24);

  /* The one accent colour: change these to re-colour the whole site.
     --accent is for text and icons, --accent-bg for filled buttons and panels. */
  --accent: #3347f0;
  --accent-bg: #3347f0;
  --accent-fg: #ffffff;
  --accent-soft: rgba(51, 71, 240, 0.08);

  --focus: #3347f0;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(18, 18, 17, 0.04), 0 28px 56px -32px rgba(18, 18, 17, 0.3);
  --sun-o: 0;
  --moon-o: 1;

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

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --container: 72rem;
  --r-sm: 0.5rem;
  --r-md: 0.625rem;
  --r-lg: 1rem;
  --r-xl: 1.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Dark colours. The same list appears twice: once for a visitor whose device is
   set to dark, once for the toggle (and for the always-dark AI panel). Keep the
   two lists identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0c0c0d;
    --surface: #151516;
    --sunken: #131314;
    --panel: #161617;

    --ink: #f1f0ea;
    --ink-2: #a9a8a1;
    --ink-3: #8a8983;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.2);

    --accent: #8c99ff;
    --accent-bg: #4a5cff;
    --accent-fg: #ffffff;
    --accent-soft: rgba(140, 153, 255, 0.12);

    --focus: #8c99ff;
    --danger: #fda4a4;
    --shadow: 0 28px 64px -32px rgba(0, 0, 0, 0.85);
    --sun-o: 1;
    --moon-o: 0;
  }
}

:root[data-theme="dark"],
.invert {
  --bg: #0c0c0d;
  --surface: #151516;
  --sunken: #131314;
  --panel: #161617;

  --ink: #f1f0ea;
  --ink-2: #a9a8a1;
  --ink-3: #8a8983;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);

  --accent: #8c99ff;
  --accent-bg: #4a5cff;
  --accent-fg: #ffffff;
  --accent-soft: rgba(140, 153, 255, 0.12);

  --focus: #8c99ff;
  --danger: #fda4a4;
  --shadow: 0 28px 64px -32px rgba(0, 0, 0, 0.85);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --sun-o: 1;
  --moon-o: 0;
}

/* ---------- Base ---------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

svg {
  display: block;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-bg);
  color: var(--accent-fg);
}

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

[hidden] {
  display: none !important;
}

/* ---------- Utilities ----------------------------------------------------- */

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

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -6rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.icon,
.faq__pm {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

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

.link:hover {
  text-decoration-thickness: 2px;
}

/* The second, quieter half of a two-tone heading. */
.soft {
  color: var(--ink-3);
}

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

/* Small label that sits above headings. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-3);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

/* Section labels carry a number instead of the square. */
.eyebrow--no::before {
  display: none;
}

.eyebrow__no {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
}

.eyebrow__no::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--line-2);
}

/* A fine dot texture, used behind the hero and inside the panels. */
.hero,
.panel,
.svc__fig {
  --dots: radial-gradient(circle at 1px 1px, var(--dot, var(--line-2)) 1px, transparent 1.5px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s,
    transform 0.25s var(--ease);
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}

.btn--primary:hover {
  opacity: 0.86;
}

.btn--accent {
  background: var(--accent-bg);
  color: var(--accent-fg);
  box-shadow: 0 12px 24px -14px var(--accent-bg);
}

.btn--accent:hover {
  background: color-mix(in srgb, var(--accent-bg) 88%, #000);
}

.btn--light {
  background: #ffffff;
  color: #121211;
}

.btn--light:hover {
  opacity: 0.9;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

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

.btn--sm {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--line-2);
}

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

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

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

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

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.brand__name {
  white-space: nowrap;
}

.brand__name span {
  color: var(--ink-2);
  font-weight: 450;
}

/* Pages without the menu (privacy) keep a button in the header. On a phone there
   isn't room for it beside the name, and the page has its own link back. */
@media (max-width: 419px) {
  .header__page-cta {
    display: none;
  }
}

.nav__list {
  display: flex;
  gap: 0.25rem;
}

.nav__list a:not(.btn) {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav__list a:not(.btn):hover,
.nav__list a[aria-current] {
  color: var(--ink);
}

.nav__list a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.nav__cta {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle,
.nav-toggle {
  display: none;
}

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

.theme-toggle {
  position: relative;
}

.theme-toggle .icon {
  position: absolute;
  transition: opacity 0.25s, transform 0.4s var(--ease);
}

.theme-toggle .icon--sun {
  opacity: var(--sun-o);
  transform: rotate(calc(var(--moon-o) * -90deg));
}

.theme-toggle .icon--moon {
  opacity: var(--moon-o);
  transform: rotate(calc(var(--sun-o) * 90deg));
}

.nav-toggle .icon--close,
.nav-open .nav-toggle .icon--menu {
  display: none;
}

.nav-open .nav-toggle .icon--close {
  display: block;
}

@media (max-width: 859px) {
  .header__cta {
    display: none;
  }

  /* Without JavaScript the links simply wrap onto a second row. */
  .header__inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    padding-bottom: 0.5rem;
  }

  .nav__list {
    flex-wrap: wrap;
  }

  .js .header__inner {
    flex-wrap: nowrap;
  }

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

  .js .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    width: auto;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
  }

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

  .js .nav__list {
    flex-direction: column;
    gap: 0.15rem;
  }

  .js .nav__list a:not(.btn) {
    padding: 0.9rem 1rem;
    color: var(--ink);
    font-size: 1.1875rem;
    font-weight: 550;
    letter-spacing: -0.02em;
  }

  .js .nav__cta {
    display: block;
    margin-top: 0.6rem;
  }

  .js .nav__cta .btn {
    display: flex;
  }
}

/* ---------- Hero: the pitch on the left, the form on the right ----------- */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2rem, 4.5vw, 4rem) clamp(3rem, 6vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -4rem 0 0;
  z-index: -1;
  background-image: var(--dots);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 78% 38%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 75% at 78% 38%, #000 10%, transparent 72%);
  pointer-events: none;
}

@media (max-width: 999px) {
  .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 45% at 60% 12%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 45% at 60% 12%, #000 10%, transparent 75%);
  }
}

.hero__inner {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 1000px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28.5rem);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    row-gap: 2.5rem;
  }

  .hero__copy {
    grid-area: 1 / 1;
    padding-top: 1.25rem;
  }

  .hero__form {
    grid-area: 1 / 2 / 3 / 3;
    align-self: start;
  }

  .hero__more {
    grid-area: 2 / 1;
    align-self: start;
  }
}

.hero__title {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 10.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

@media (min-width: 1000px) {
  .hero__title {
    font-size: clamp(3rem, 5vw, 4.75rem);
  }
}

.hero__title .line {
  display: block;
}

.hero__lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.facts {
  display: grid;
  gap: 0.7rem;
}

.facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--ink-2);
}

.facts .icon {
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.22em;
  color: var(--accent);
  stroke-width: 2.2;
}

.hero__direct {
  max-width: 34rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.hero__direct a {
  color: var(--ink);
  font-weight: 550;
  overflow-wrap: anywhere;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ---------- Sections ------------------------------------------------------ */

.section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

/* Section heading: title on the left, a short introduction on the right. */
.head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.75rem);
}

.head .eyebrow {
  margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
  .head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: end;
  }
}

.h2 {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.h3 {
  font-size: clamp(1.3125rem, 1.2rem + 0.5vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 36rem;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags li {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
}

/* Two columns: a heading that stays put on the left, the detail on the right. */
.split {
  display: grid;
  gap: 2.5rem;
}

.split__aside > * + * {
  margin-top: 1.25rem;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 5rem;
    align-items: start;
  }

  .split__aside {
    position: sticky;
    top: 6.5rem;
  }

  /* The FAQ heading scrolls away with the page like everything else. */
  #faq .split__aside {
    position: static;
  }
}

/* A plain list of points, each under a thin rule. */
.items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2.25rem 2rem;
}

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

.item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-2);
}

.item > .icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  stroke-width: 1.6;
}

.item h3 {
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.item p {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 1rem;
}

/* ---------- Line drawings ------------------------------------------------- */

.draw svg {
  width: 100%;
  height: auto;
}

.draw svg path {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.draw svg .thick {
  stroke-width: 5;
}

.draw svg .thin {
  stroke-width: 1;
  opacity: 0.55;
}

.draw svg .node {
  fill: var(--fig-bg, var(--bg));
}

.draw svg .hl {
  stroke: var(--accent);
}

.draw svg .hl-fill {
  fill: var(--accent);
}

/* ---------- Start here ---------------------------------------------------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  column-gap: 2.5rem;
}

.quote {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  height: 100%;
  padding: 1.4rem 0 1.9rem;
  border-top: 1px solid var(--line-2);
  text-decoration: none;
}

.quote::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.quote:hover::before,
.quote:focus-visible::before {
  transform: scaleX(1);
}

.quote__text {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 550;
  line-height: 1.22;
  letter-spacing: -0.03em;
  text-wrap: balance;
  transition: color 0.25s;
}

.quote__tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-3);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote__tag .icon {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.3s var(--ease), color 0.25s;
}

.quote:hover .quote__text,
.quote:hover .quote__tag .icon {
  color: var(--accent);
}

.quote:hover .quote__tag .icon {
  transform: translateX(4px);
}

/* ---------- Software ------------------------------------------------------ */

.svcs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 2.5rem 2rem;
}

.svc {
  display: flex;
  flex-direction: column;
}

.svc__fig {
  --fig-bg: var(--surface);
  margin-bottom: 1.5rem;
  padding: 1.25rem 2rem;
  --dot: var(--line);
  background: var(--dots) 0 0 / 16px 16px, var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.3s;
}

.svc:target .svc__fig {
  border-color: var(--accent);
}

.svc p {
  margin-top: 0.6rem;
  color: var(--ink-2);
}

.svc .tags {
  margin-top: auto;
  padding-top: 1.25rem;
}

/* The jobs that don't fit a category sit in a quieter band underneath. */
.else {
  display: grid;
  gap: 1.25rem 3rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding: clamp(1.35rem, 3vw, 2rem);
  background: var(--sunken);
  border-radius: var(--r-lg);
}

.else p {
  margin-top: 0.5rem;
  color: var(--ink-2);
}

@media (min-width: 860px) {
  .else {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }
}

/* ---------- Engineering --------------------------------------------------- */

.sysfig {
  margin-top: 2rem !important;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.sysfig svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.sysfig__lines {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sysfig__lines .box {
  fill: var(--bg);
  stroke: var(--line-2);
}

.sysfig__lines .dashed {
  stroke: var(--accent);
  stroke-dasharray: 4 4;
}

.sysfig__mark {
  fill: var(--accent);
}

.sysfig__text {
  fill: var(--ink);
  font: 500 10.5px var(--mono);
  letter-spacing: 0.08em;
  text-anchor: middle;
}

.sysfig figcaption {
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* ---------- AI: one dark panel, whatever the theme ------------------------ */

.panel {
  padding: clamp(1.5rem, 5vw, 4rem);
  border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
}

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--dots);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 70% at 100% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}

.invert {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

.rule {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-2);
}

@media (min-width: 860px) {
  .rule {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 4rem;
  }
}

.rule__text {
  margin-top: 1.25rem;
  font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.rule__fig {
  --fig-bg: var(--panel);
  max-width: 20rem;
}

@media (max-width: 859px) {
  .rule__fig {
    display: none;
  }
}

/* ---------- How we work --------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2.25rem 0;
}

.step {
  position: relative;
  padding: 1.5rem 2rem 0 0;
  border-top: 1px solid var(--line-2);
}

.step::before {
  content: "";
  position: absolute;
  top: -0.3125rem;
  left: 0;
  width: 0.5625rem;
  height: 0.5625rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.375rem var(--bg);
}

.step__no {
  display: block;
  margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
  color: var(--ink-3);
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.step p {
  margin-top: 0.6rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.count {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--sunken);
  border-radius: var(--r-lg);
}

.subhead {
  margin-bottom: 1.75rem;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 1.5rem 2rem;
}

.principle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 0.7rem;
  align-items: start;
  align-content: start;
}

.principle > .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--accent);
  stroke-width: 2.2;
}

.principle h4 {
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.principle p {
  grid-column: 2;
  margin-top: 0.3rem;
  color: var(--ink-2);
  font-size: 1rem;
}

/* ---------- Questions ----------------------------------------------------- */

.faq__list {
  border-bottom: 1px solid var(--line-2);
}

.faq__item {
  border-top: 1px solid var(--line-2);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}

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

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__pm {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink-3);
  flex: none;
  transition: transform 0.35s var(--ease), color 0.2s;
}

.faq__item[open] .faq__pm {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq__a {
  max-width: 40rem;
  padding: 0 2.5rem 1.4rem 0;
  color: var(--ink-2);
}

.faq__more {
  color: var(--ink-2);
}

/* Smooth open and close where the browser supports it; instant elsewhere. */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq__list {
      interpolate-size: allow-keywords;
    }

    .faq__item::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
    }

    .faq__item[open]::details-content {
      block-size: auto;
    }
  }
}

/* ---------- Closing call to action ---------------------------------------- */

.section--cta {
  padding-block: 0 clamp(2.5rem, 5vw, 4rem);
}

.cta {
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.86);
  --ink-3: rgba(255, 255, 255, 0.86);
  --line-2: rgba(255, 255, 255, 0.45);
  --accent: #ffffff;
  --focus: #ffffff;
  display: grid;
  gap: 2.5rem;
  background: var(--accent-bg);
  color: var(--ink);
}

.cta ::selection {
  background: #ffffff;
  color: #121211;
}

@media (min-width: 900px) {
  .cta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: end;
  }
}

.cta .lede {
  margin-top: 1rem;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.cta__email {
  font-weight: 550;
  overflow-wrap: anywhere;
  text-underline-offset: 0.3em;
}

.next {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
  counter-reset: next;
}

.next li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--ink-2);
  counter-increment: next;
}

.next li::before {
  content: counter(next);
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.05rem;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink);
  font: 600 0.75rem/1 var(--mono);
  flex: none;
}

/* ---------- Plain text pages (privacy, 404) ------------------------------- */

.prose-page {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 7vw, 6rem);
}

.prose {
  max-width: 44rem;
  margin-inline: auto;
}

.prose h1 {
  margin: 1.25rem 0 0.75rem;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  letter-spacing: -0.045em;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose p + p,
.prose ul + p {
  margin-top: 0.9rem;
}

.prose ul {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.45rem;
}

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

.prose__meta {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.prose__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
}

.prose__back .icon {
  width: 1.1em;
  height: 1.1em;
  transform: rotate(180deg);
}

/* ---------- Contact form -------------------------------------------------- */

.hero__form {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 1.15rem;
  align-content: start;
}

.form__title {
  font-size: 1.5rem;
  letter-spacing: -0.035em;
}

.form__head p {
  margin-top: 0.4rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.form__row {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

.field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  align-content: start;
}

.field > label,
.field > legend {
  padding: 0;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.2;
}

.field > legend {
  margin-bottom: 0.6rem;
}

.field__opt {
  color: var(--ink-3);
  font-weight: 400;
}

.input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

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

.input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

textarea.input {
  min-height: 7rem;
  resize: vertical;
}

.input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--ink);
}

.field.has-error .input {
  border-color: var(--danger);
}

.field__error {
  color: var(--danger);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.field__error:empty {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.chip input:hover + span {
  border-color: var(--ink-3);
  color: var(--ink);
}

.chip input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.form__note {
  flex: 1 1 10rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.form__privacy {
  color: var(--ink-3);
  font-size: 0.875rem;
}

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

.form__status:empty {
  display: none;
}

.form__handoff {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink-2);
}

.form__handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

/* While a message is being sent the arrow becomes a small spinner. */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn[aria-busy="true"] .icon {
  display: none;
}

.btn[aria-busy="true"]::after {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Confirmation shown in place of the form after a successful send. */
.form__done {
  display: grid;
  gap: 1rem;
  justify-items: start;
  align-content: start;
}

.form__done-check {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-fg);
}

.form__done-check .icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2.4;
}

.form__done h3:focus-visible {
  outline: none;
}

.form__done > p {
  color: var(--ink-2);
}

.form__done-copy {
  width: 100%;
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}

.form__done-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink-3);
  font-size: 0.875rem;
  font-weight: 500;
}

.form__done-copy p {
  max-height: 11rem;
  overflow: auto;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* On short laptop screens, tighten things so the Send button stays in view. */
@media (min-width: 1000px) and (max-height: 760px) {
  .hero {
    padding-top: 1.25rem;
  }

  .form {
    gap: 0.95rem;
  }

  textarea.input {
    height: 5.5rem;
    min-height: 5.5rem;
  }
}

/* Spam trap: only added when a form service is connected. Humans never see it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.footer__bottom a:not(.brand) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer__bottom a:not(.brand):hover {
  color: var(--ink);
}

.footer__bottom a.footer__privacy {
  display: inline;
  text-decoration: underline;
}

.footer__bottom .icon {
  width: 1.1em;
  height: 1.1em;
  transform: rotate(-90deg);
}

/* ---------- Motion -------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.9rem);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: pure CSS, so it runs whether or not the script has loaded. */
  .hero__inner > * {
    animation: rise 0.8s var(--ease) both;
  }

  .hero__inner > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero__inner > :nth-child(3) {
    animation-delay: 0.16s;
  }

  /* Scroll reveals. The hidden state only applies once the script has confirmed
     it is running (.reveal-ready), so content can never get stuck invisible. */
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(0.9rem);
  }

  .reveal-ready [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms);
  }

  /* The line drawings draw themselves in when they scroll into view. Each path
     is normalised to length 1 in the markup (pathLength="1"), so one rule
     animates them all. */
  .reveal-ready .draw svg path {
    stroke-dasharray: 1 2;
    stroke-dashoffset: 1.01;
  }

  .reveal-ready .draw.is-drawn svg path {
    animation: draw 1.2s cubic-bezier(0.65, 0, 0.2, 1) 0.15s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Print --------------------------------------------------------- */

@media print {
  .site-header,
  .hero__form,
  .skip {
    display: none !important;
  }

  .faq__item::details-content {
    block-size: auto !important;
    content-visibility: visible !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .draw svg path {
    stroke-dashoffset: 0 !important;
  }
}
