:root {
  --bg: #e7e1d4;
  --bg-elev: #f4efe6;
  --ink: #17191a;
  --muted: #3f3c36;
  --line: rgba(23, 25, 26, 0.16);
  --accent: #1d5a44;
  --brass: #8a5a32;
  --bg-rgb: 231, 225, 212;
  color-scheme: light;
  --sans: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", "Segoe UI Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #090b0a;
  --bg-elev: #121614;
  --ink: #ebe6dc;
  --muted: #b2aca0;
  --line: rgba(235, 230, 220, 0.16);
  --accent: #9fc3ab;
  --brass: #c4a27a;
  --bg-rgb: 9, 11, 10;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

body,
.site-header,
.button,
.method-grid article,
.theme-switch button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

a {
  color: inherit;
}

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

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

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.grid-overlay,
.grain,
.scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 72%);
}

.grain {
  z-index: 1;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="dark"] .grain {
  opacity: 0.16;
  mix-blend-mode: overlay;
}

.scan {
  z-index: 4;
  inset: auto 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.45;
  animation: scan 14s linear infinite;
}

.page {
  position: relative;
  z-index: 2;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem max(1.25rem, calc((100% - 1120px) / 2));
  background: rgba(var(--bg-rgb), 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}

.logo svg {
  width: 28px;
  height: 22px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 1.35rem;
}

.nav a,
.kicker,
.legend,
.readout,
.theme-switch button,
.button,
.fact-index,
.client-index,
.method-index,
.specimen-bar,
.field span,
.captcha-head label,
.captcha-refresh,
.footer,
.mono-line {
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
}

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

.theme-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: rgba(var(--bg-rgb), 0.4);
}

.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.64rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
}

[data-theme="dark"] .theme-switch [data-theme-set="dark"],
[data-theme="light"] .theme-switch [data-theme-set="light"] {
  background: var(--ink);
  color: var(--bg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  grid-template-areas:
    "copy figure"
    "legend legend";
  gap: 1.5rem 2rem;
  align-items: center;
  min-height: calc(100svh - 4.6rem);
  padding: 2.5rem 0 1.5rem;
  position: relative;
}

.hero-copy {
  grid-area: copy;
  container-type: inline-size;
  position: relative;
  z-index: 1;
  align-self: end;
  padding-bottom: 1.5rem;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.72rem;
}

.hero h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.7rem, 11cqi, 5.15rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.line {
  display: block;
  position: relative;
}

.line-display {
  font-family: var(--sans);
  font-weight: 600;
}

.line-human {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-top: 0.06em;
}

.js .line .ghost {
  visibility: hidden;
  user-select: none;
}

.js .line .typed {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}

.caret {
  display: inline-block;
  width: 0.5ch;
  height: 0.78em;
  margin-left: 0.06em;
  transform: translateY(0.08em);
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
  vertical-align: baseline;
}

.mono-line {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.deck {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  font-size: 1.2rem;
  line-height: 1.5;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  font-size: 0.68rem;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
}

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

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  background: transparent;
  color: var(--accent);
}

.hero-figure {
  grid-area: figure;
  position: relative;
  height: min(62vh, 540px);
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.constellation,
.armillary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  pointer-events: none;
}

.constellation {
  opacity: 0.55;
  overflow: visible;
}

.armillary {
  opacity: 0.38;
  animation: spin 150s linear infinite;
}

.droid {
  position: relative;
  z-index: 1;
  width: min(230px, 68%);
  height: auto;
  aspect-ratio: 280 / 500;
  color: var(--ink);
}

.droid * {
  vector-effect: non-scaling-stroke;
}

.optic,
.core {
  fill: var(--brass);
  stroke: none;
}

.readout {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.62rem;
  color: var(--muted);
}

.readout div {
  display: flex;
  gap: 0.4rem;
}

.readout dt {
  margin: 0;
}

.readout dd {
  margin: 0;
  color: var(--ink);
}

.legend {
  grid-area: legend;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0;
  list-style: none;
  margin: 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.66rem;
  color: var(--muted);
}

.legend li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding-right: 1.1rem;
  margin-right: 1.1rem;
  border-right: 1px solid var(--line);
}

.legend li:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

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

.section {
  padding: 5.5rem 0;
  scroll-margin-top: 6.5rem;
}

.section-head {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2.25rem;
}

.section-head h2,
.contact-copy h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.35rem;
  line-height: 1.45;
}

.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: start;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.facts li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.8rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-index,
.client-index,
.method-index {
  color: var(--accent);
  font-size: 0.7rem;
  padding-top: 0.35rem;
}

.facts h3,
.client-row h3,
.method-grid h3 {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.facts p,
.client-row p,
.method-grid p,
.contact-copy p,
.specimen-note {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.client-row {
  display: grid;
  grid-template-columns: 4rem minmax(8rem, 14rem) 1fr;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

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

.client-row h3 {
  font-size: 1.65rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.method-grid article {
  background: var(--bg);
  padding: 1.25rem 1.15rem 1.5rem;
  min-height: 240px;
}

.method-grid article:hover {
  background: var(--bg-elev);
}

.method-index {
  display: block;
  margin-bottom: 2.5rem;
}

.close {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.85fr);
  gap: 3.5rem;
  align-items: start;
}

.specimen {
  border: 1px solid var(--line);
  background: rgba(var(--bg-rgb), 0.55);
}

.specimen-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
}

.specimen-bar span:first-child::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: translateY(0.02rem);
}

.specimen-page {
  margin: 0.85rem;
  padding: 1.6rem 1.35rem 1.35rem;
  background: #f6f3ec;
  color: #1c1d1a;
}

.specimen-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1d5a44;
}

.specimen-page h3 {
  margin: 0.7rem 0 0.55rem;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.specimen-page p {
  margin: 0;
  max-width: 34ch;
  color: #3c4038;
}

.specimen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.35rem 0 0;
}

.specimen-meta div {
  min-width: 7rem;
}

.specimen-meta dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d5a44;
}

.specimen-meta dd {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
}

.specimen-note {
  padding: 0 0.95rem 0.95rem;
  font-size: 0.95rem;
}

.contact-copy .kicker {
  margin-bottom: 0.8rem;
}

.contact-copy > p {
  margin-top: 1rem;
  max-width: 36rem;
}

.mail {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.75rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span,
.captcha-head label {
  font-size: 0.64rem;
  color: var(--muted);
}

.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.captcha-refresh {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.64rem;
  cursor: pointer;
  padding: 0;
}

.captcha-refresh:hover {
  color: var(--ink);
}

#captcha-image {
  width: 168px;
  height: 56px;
  border: 1px solid var(--line);
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.55rem 0;
  outline: none;
}

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

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--accent);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.5em;
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.64rem;
}

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

@keyframes scan {
  from {
    top: -5%;
  }
  to {
    top: 105%;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .hero,
  .practice-grid,
  .close,
  .section-head {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "copy"
      "figure"
      "legend";
    min-height: 0;
    padding-top: 1.5rem;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo theme"
      "nav nav";
    row-gap: 0.75rem;
  }

  .logo {
    grid-area: logo;
  }

  .theme-switch {
    grid-area: theme;
  }

  .hero-copy {
    align-self: start;
    padding-bottom: 0;
  }

  .hero-figure {
    height: 340px;
    min-height: 0;
  }

  .droid {
    width: min(168px, 48%);
  }

  .client-row {
    grid-template-columns: 3rem 1fr;
  }

  .client-row p {
    grid-column: 2;
  }

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

  .nav {
    grid-area: nav;
    justify-content: space-between;
  }
}

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

  .legend li {
    border-right: 0;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0;
  }

  .readout {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

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

  .scan,
  .armillary,
  .caret,
  body,
  .site-header,
  .button,
  .method-grid article,
  .theme-switch button {
    animation: none;
    transition: none;
  }

  .js .line .ghost {
    visibility: visible;
  }

  .js .line .typed {
    display: none;
  }
}
