/* Drawknife Software — one stylesheet, no scripts.
 *
 * The look: a tool-maker's technical drawing on a dark sheet. Slate for the sheet,
 * cool steel for text and line work, and a single warm accent, the colour of a
 * fresh wood shaving, kept for the things you can act on and for status.
 *
 * Fonts are served from /fonts, in this repository. Nothing is fetched from another
 * origin, so a visit tells nobody but our host that it happened.
 *   Bricolage Grotesque  headings and text (variable: weight 200-800, optical size)
 *   IBM Plex Mono        the technical details: status lines, drawing labels, addresses
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-opsz.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --sheet: #101a24;
  --plate: #16232f;
  --scribe: #2a3b4d;
  --steel: #d3dde6;
  --mist: #8fa1b2;
  --shaving: #f2b866;

  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
    monospace;

  --page: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 36rem;
}

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

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

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

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

a {
  color: var(--steel);
  text-decoration-color: var(--shaving);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.22em;
}

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.8rem;
  background: var(--shaving);
  color: var(--sheet);
  border-radius: 4px;
  z-index: 2;
}

.skip:focus {
  top: 0.75rem;
}

/* Page frame: one centred column that every band shares */

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  border-bottom: 1px solid var(--scribe);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark svg {
  width: 1.75rem;
  height: auto;
}

.mark-steel {
  fill: none;
  stroke: var(--steel);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-shaving {
  fill: none;
  stroke: var(--shaving);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--mist);
  text-decoration: none;
}

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

/* Headings */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.04;
}

h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 750;
  max-width: 13ch;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

p {
  margin: 0 0 1.05em;
  max-width: var(--measure);
}

.mono {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0;
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem);
}

.hero .lede {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--mist);
  max-width: 34rem;
}

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

.button {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--scribe);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--steel);
}

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

.button.primary {
  background: var(--shaving);
  border-color: var(--shaving);
  color: var(--sheet);
}

.button.primary:hover {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--sheet);
}

/* The drawing: a drawknife as a draughtsman would set it out. The one drawn thing
   on the site. It is line work only, in the same steel as the text. */

.drawing {
  margin: 0;
  border: 1px solid var(--scribe);
  border-radius: 10px;
  background: var(--plate);
  overflow: hidden;
}

.drawing svg {
  display: block;
  width: 100%;
  height: auto;
}

.drawing figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border-top: 1px solid var(--scribe);
  color: var(--mist);
}

.drawing .caption-text {
  flex: 1 1 24rem;
  max-width: 48rem;
  color: var(--steel);
}

.grid-line {
  fill: none;
  stroke: var(--scribe);
  stroke-width: 1;
  opacity: 0.55;
}

.outline {
  fill: none;
  stroke: var(--steel);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.outline.thin {
  stroke-width: 1;
  opacity: 0.6;
}

.dimension {
  fill: none;
  stroke: var(--mist);
  stroke-width: 1;
}

.label {
  font-family: var(--mono);
  font-size: 15px;
  fill: var(--mist);
}

/* Sections */

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

.section + .section {
  border-top: 1px solid var(--scribe);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--mist);
  margin: 0;
}

/* How we work */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}

.principles li {
  padding-top: 1.1rem;
  border-top: 2px solid var(--steel);
}

.principles p {
  margin: 0.5rem 0 0;
  color: var(--mist);
}

/* Contact */

.contact {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.6rem 2rem;
  align-items: baseline;
}

.contact dt {
  color: var(--mist);
}

.contact dd {
  margin: 0;
}

@media (max-width: 34rem) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .contact dd {
    margin-bottom: 0.9rem;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--scribe);
  padding-block: 2rem 3rem;
  font-size: 0.9rem;
  color: var(--mist);
}

.site-footer p {
  max-width: 46rem;
  margin-bottom: 0.5em;
}

.site-footer a {
  color: var(--mist);
}

.site-footer a:hover {
  color: var(--steel);
}

/* Policy pages and the not-found page */

.doc {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.doc > * {
  max-width: 40rem;
}

.doc h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 0.5em;
}

.doc h2 {
  font-size: 1.3rem;
  letter-spacing: -0.012em;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}

.doc ul {
  padding-left: 1.2em;
}

.doc li {
  margin-bottom: 0.4em;
}

.doc p,
.doc li {
  color: var(--steel);
}

.draft {
  border: 1px solid var(--shaving);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 2rem;
  color: var(--shaving);
}

.draft p {
  margin: 0;
  color: var(--shaving);
}

.doc .meta {
  color: var(--mist);
}
