/* DAxWorks
 *
 * Colours are the brand's own constants from brand/src/build.py, not new
 * values: INK, PURPLE, WHITE and the HAIR rule colour. Two of them are
 * approximations taken from a JPEG and are not canonical. If the real values
 * ever surface, they change here and in build.py, nowhere else.
 *
 * Type is the brand's own pairing, the same two families brand/src/fonts.sh
 * fetches: Playfair Display for the wordmark and headings, Inter for
 * everything else. This site is a brand extension, not a new identity.
 */

:root {
  --ink:     #0F172A;
  --purple:  #5B2BD6;
  --paper:   #FFFFFF;
  --hair:    #E2E0DC;
  --muted:   #5A6478;

  --measure: 64ch;
  --gutter:  clamp(1rem, 5vw, 4rem);
  --rhythm:  clamp(3.5rem, 9vw, 7rem);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Light is the default, deliberately, rather than following the operating
 * system. Dark is opt-in through the header toggle and remembered per browser.
 *
 * The dark palette keeps the brand ink and white. The purple is lightened,
 * because #5B2BD6 on #0F172A is far below any usable contrast. That tint is
 * derived for this page and is not a brand colour. The hairline and muted
 * tones are alphas of the text colour rather than invented hexes. */
:root[data-theme="dark"] {
  --ink:    #FFFFFF;
  --paper:  #0F172A;
  --purple: #A78BFA;
  --hair:   rgba(255, 255, 255, .16);
  --muted:  rgba(255, 255, 255, .68);
  color-scheme: dark;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

a { color: inherit; }

/* Underline offset so a descender never collides with the rule. */
main a:not(.button) {
  text-decoration-color: var(--purple);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

main a:not(.button):hover { text-decoration-thickness: 2px; }

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

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
}

.masthead__mark { margin-inline-end: auto; display: inline-flex; }

.masthead__mark img { display: block; width: 172px; height: auto; }

.masthead nav { display: flex; gap: 1.5rem; font-size: .9375rem; }

/* On a phone the section anchors go and the language switcher stays. The page
 * is four sections long, so the anchors are a convenience; language is not. */
@media (max-width: 45.999rem) {
  .masthead__nav { display: none; }
}

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

.masthead nav a:hover { color: var(--ink); }

.lang {
  display: flex;
  gap: .5rem;
  font-size: .9375rem;
  color: var(--muted);
}

.lang [aria-current] { color: var(--ink); }

.lang a { text-decoration: none; }

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

/* ---------- hero ---------- */

.hero { padding-block: clamp(3rem, 10vw, 7rem) var(--rhythm); }

.hero h1 {
  max-width: 20ch;
  margin: 0 0 1.75rem;
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  line-height: 1.06;
}

.hero p {
  max-width: 54ch;
  margin: 0 0 2.5rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: .8rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--purple); border-color: var(--purple); }

.button[disabled] { opacity: .55; cursor: progress; }

/* ---------- sections ---------- */

section { padding-block: var(--rhythm); border-top: 1px solid var(--hair); }

section > h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

/* ---------- what we do ---------- */

.capabilities { margin: 0; }

.capabilities > div {
  display: grid;
  gap: .25rem 2.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--hair);
}

.capabilities > div:first-of-type { border-top: 0; padding-top: 0; }

@media (min-width: 46rem) {
  .capabilities > div { grid-template-columns: 17rem 1fr; }
}

.capabilities dt { font-weight: 600; }

.capabilities dd { margin: 0; max-width: 58ch; color: var(--muted); }

.tooling {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  font-size: .9375rem;
  color: var(--muted);
}

/* ---------- the arc ----------
 * The five stages are a real sequence, which is why they are an ordered list
 * on a rule rather than five cards. The hairline ticks make it read as a
 * scale, which is the same shape as the capability levels the company sells.
 * The final stage is marked because it is the argument of the whole page.
 */

.arc {
  display: grid;
  gap: 0;
  margin: 0 0 3.5rem;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
}

.arc li {
  position: relative;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 1px solid var(--hair);
}

.arc li::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 11px;
  height: 1px;
  background: var(--hair);
}

.arc li:last-child { color: var(--purple); border-left-color: var(--purple); }

.arc li:last-child::before { background: var(--purple); height: 2px; width: 15px; }

@media (min-width: 52rem) {
  .arc {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    border-top: 1px solid var(--hair);
  }

  .arc li {
    padding: 1.25rem 1rem 0 0;
    border-left: 0;
  }

  .arc li::before {
    left: 0;
    top: -1px;
    width: 1px;
    height: 11px;
  }

  .arc li:last-child { border-left: 0; }

  .arc li:last-child::before { width: 2px; height: 15px; }
}

.principles { display: grid; gap: 2.5rem; }

@media (min-width: 58rem) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.principles h3 {
  margin: 0 0 .5rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.principles p { margin: 0; color: var(--muted); }

/* ---------- about ---------- */

.prose { max-width: var(--measure); }

.prose p { margin: 0 0 1.5rem; }

.domains {
  display: grid;
  gap: .5rem 2.5rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  font-size: .9375rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

/* ---------- contact ---------- */

.contact { display: grid; gap: 3rem; align-items: start; }

@media (min-width: 58rem) {
  .contact { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; }
}

.field { display: grid; gap: .375rem; margin-bottom: 1.25rem; }

.field label { font-size: .9375rem; font-weight: 600; }

.field input,
.field textarea {
  padding: .7rem .8rem;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field input:hover,
.field textarea:hover { border-color: var(--muted); }

.field textarea { min-height: 8rem; resize: vertical; }

/* Visible only while focused, which is the entire point of a skip link. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip:focus-visible { left: var(--gutter); top: .5rem; }

.prose .coda { margin-top: 2.5rem; }

/* Not display:none: a bot that reads the computed style skips those. */
.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.status { margin: 1.25rem 0 0; font-size: .9375rem; }

.status:empty { margin: 0; }

.status[data-state="error"] { color: var(--purple); }

.note { max-width: 46ch; font-size: .875rem; color: var(--muted); }

.aside p { margin: 0 0 1rem; }

/* ---------- footer ---------- */

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--hair);
  font-size: .9375rem;
  color: var(--muted);
}

.colophon .place { margin-inline-start: auto; }

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

/* ---------- wordmark, theme toggle, icon links, back to top ---------- */

/* The wordmark swaps with the theme attribute rather than with a <picture>
 * media query, because the toggle is a choice the visitor made and a media
 * query would keep answering the operating system instead. */
.masthead__mark img { display: block; width: 172px; height: auto; }

.masthead__mark .mark-dark { display: none; }

:root[data-theme="dark"] .masthead__mark .mark-light { display: none; }

:root[data-theme="dark"] .masthead__mark .mark-dark { display: block; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }

.theme-toggle svg { width: 16px; height: 16px; }

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Icons carry meaning here: they say what kind of contact each line is, which
 * is why they sit in front of the label rather than replacing it. */
.links { margin: 0; padding: 0; list-style: none; }

.links li {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .875rem;
}

.links svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.links .mail { font-size: 1.125rem; }

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
}

.to-top.is-visible { opacity: 1; visibility: visible; }

.to-top:hover { border-color: var(--purple); color: var(--purple); }

.to-top svg { width: 18px; height: 18px; }

html { scroll-behavior: smooth; }

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

  .to-top { transition: none; }
}
