/* Zonum Precision. Drawing-sheet system: paper, ink, hairlines, one orange. */

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/familjen-grotesk-400-700.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-400-600.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
}

:root {
  --paper: #eceeef;
  --paper-2: #e0e3e5;
  --ink: #111315;
  --ink-2: #41464b;
  --ink-3: #5a6066;
  --rule: #c3c8cc;
  --orange: #f8991c;
  --orange-ink: #9a4a08;
  --on-dark: #eceeef;
  --on-dark-2: #b4babf;
  --on-dark-3: #8b9298;

  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;

  --h2: clamp(34px, 4.4vw, 60px);
  --h2-lg: clamp(36px, 4.8vw, 64px);
  --wrap: 1240px;
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

p,
li,
dd {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 0.12s ease, color 0.12s ease;
}

a:hover {
  text-decoration-thickness: 2px;
  color: var(--orange-ink);
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.dark :focus-visible {
  outline-color: var(--orange);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-family: var(--sans);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.025em;
  word-spacing: 0.06em;
  text-wrap: balance;
}

h2 {
  font-size: var(--h2);
  line-height: 1.08;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 19px;
  color: var(--ink-2);
}

.dark .lead {
  color: var(--on-dark-2);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--ink);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  display: block;
  padding: 4px 0;
  flex-shrink: 0;
  line-height: 0;
}

.brand img {
  width: 146px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
  text-underline-offset: 0.35em;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-quote {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-quote:hover {
  background: var(--orange);
  color: var(--ink);
}

.nav-quote .short {
  display: none;
}

.nav-toggle {
  flex: none;
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  font: 600 17px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--orange);
}

.dark .btn:hover {
  background: var(--on-dark);
  border-color: var(--on-dark);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.arrow-link {
  display: inline-block;
  padding: 10px 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
}

.arrow-link::after {
  content: "\2192";
  content: "\2192" / "";
  display: inline-block;
  margin-left: 0.4em;
  text-decoration: none;
}

.arrow-link.ext::after,
.ext::after {
  content: "\2197";
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.3em;
}

.dl::before {
  content: "\2193";
  content: "\2193" / "";
  display: inline-block;
  margin-right: 0.3em;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.text-btn {
  min-height: 44px;
  padding: 6px 4px;
}

.text-btn:hover {
  text-decoration-thickness: 2px;
  color: var(--orange-ink);
}

.dark .text-btn:hover {
  color: var(--orange);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(56px, 7vw, 104px) 0 clamp(56px, 7vw, 104px);
  border-top: 1px solid var(--ink);
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 56px clamp(48px, 7vw, 104px);
  align-items: start;
}

.split-head {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.head-action {
  margin: 32px 0 0;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 5vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px clamp(40px, 6vw, 88px);
  align-items: end;
}

.kicker {
  margin: 0 0 24px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 15.5ch;
}

.lede {
  margin: 32px 0 0;
  max-width: 34em;
  font-size: clamp(19px, 1.6vw, 22px);
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 40px;
}

/* ---------- Figures (title-block captions) ---------- */

.fig {
  margin: 0;
}

.fig-mat {
  background: var(--paper-2);
  border: 1px solid var(--ink);
}

.fig-mat img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fig figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  border: 1px solid var(--ink);
  border-top: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
}

.fig figcaption span {
  padding: 10px 14px;
}

.fig figcaption span:first-child {
  border-right: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
}

.side-fig .fig-mat img {
  aspect-ratio: 1 / 1;
  object-position: 18% 58%;
}

/* ---------- Title-block table ---------- */

.titleblock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.tb-cell {
  padding: 20px 22px 22px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.tb-wide {
  grid-column: 1 / -1;
}

.tb-cell dt {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}

.tb-cell dd {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- Subtract ---------- */

.subtract {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.subtract-logo a {
  display: block;
  padding: 16px 18px;
  background: var(--ink);
}

.subtract .arrow-link {
  display: inline-block;
  padding: 10px 0;
}

.subtract h3 {
  font-size: 20px;
}

.subtract p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 52ch;
}

/* ---------- Process (ink band) ---------- */

.process-band {
  border-top: 0;
  padding-bottom: clamp(72px, 8vw, 120px);
}

.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--on-dark-2);
}

.process::after {
  content: "";
  position: absolute;
  top: -8px;
  right: 0;
  width: 2px;
  height: 15px;
  background: var(--orange);
}

.process li {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  align-content: start;
  padding-top: 32px;
}

.process li::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 2px;
  height: 15px;
  background: var(--orange);
}

.process h3 {
  font-size: 26px;
  margin-bottom: 14px;
  align-self: start;
}

.process-cta {
  margin: 56px 0 0;
}

.process p {
  margin: 0;
  font-size: 17px;
  color: var(--on-dark-2);
}

/* ---------- Section heads and layouts ---------- */

.head-row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(40px, 6vw, 96px);
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.head-row h2 {
  font-size: var(--h2);
  line-height: 1.04;
  max-width: 16ch;
}

.head-row .lead {
  margin: 0;
}

.head-row--stack {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.head-row--stack h2 {
  max-width: 24ch;
}

.head-row--stack .lead {
  max-width: 62ch;
}

.head-action {
  margin: 28px 0 0;
}

.machining-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 40px clamp(32px, 5vw, 72px);
  align-items: stretch;
}

.machining-grid .side-fig {
  display: flex;
  flex-direction: column;
}

.machining-grid .side-fig .fig-mat {
  flex: 1;
  min-height: 0;
  position: relative;
}

.machining-grid .side-fig .fig-mat img {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
}

/* Services grid and first-pass list */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(40px, 6vw, 96px);
  border-top: 1px solid var(--ink);
}

.svc {
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--rule);
}

.svc h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.svc p {
  margin: 0;
  max-width: 54ch;
  color: var(--ink-2);
  font-size: 17px;
}

.firstpass {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px clamp(32px, 5vw, 72px);
  margin-top: clamp(56px, 7vw, 96px);
  padding: 40px 0 0;
  border-top: 1px solid var(--ink);
}

.firstpass h3 {
  font-size: 26px;
}

.firstpass ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.firstpass li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 17px;
}

.firstpass li:first-child {
  padding-top: 0;
}

.firstpass strong {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
}

.firstpass p {
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 58ch;
}

/* ---------- Tools ---------- */

.tools {
  border-top: 1px solid var(--ink);
}

.tool {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px clamp(32px, 5vw, 72px);
  padding: 32px 0 36px;
  border-bottom: 1px solid var(--rule);
}

.tool h2,
.tool h3 {
  font-size: 26px;
  line-height: 1.12;
}

.tool .meta {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

.tool p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 64ch;
}

.tool-links a {
  display: inline-block;
  padding: 10px 0;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 18px 0 0 !important;
  font-family: var(--sans);
  font-weight: 500;
}

.install {
  display: inline-block;
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--ink);
}

.tools-foot {
  margin: 36px 0 0;
}

/* ---------- About ---------- */

.about-section {
  padding: clamp(80px, 9vw, 128px) 0;
  background: var(--paper-2);
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px clamp(40px, 6vw, 96px);
  align-items: end;
}

.about h2 {
  font-size: var(--h2-lg);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.about-body p {
  margin: 0 0 18px;
  font-size: 19px;
  color: var(--ink-2);
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  content: "+" / "";
  flex-shrink: 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--orange-ink);
}

.faq summary:hover {
  color: var(--orange-ink);
}

.faq details p {
  margin: -4px 0 26px;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 17px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}

/* ---------- Dark band: contact and footer ---------- */

.dark {
  background: var(--ink);
  color: var(--on-dark);
}

.dark a:hover {
  color: var(--orange);
}

.contact {
  border-top: 0;
  padding-bottom: clamp(72px, 8vw, 120px);
}

.contact h2 {
  font-size: var(--h2-lg);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px clamp(48px, 7vw, 104px);
  align-items: start;
}

.contact-intro {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.direct {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.direct li {
  padding: 16px 0;
  border-top: 1px solid #353a3e;
}

.direct .label {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--on-dark-2);
}

.direct .value {
  display: block;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.direct li:first-child .value {
  font-size: clamp(20px, 2.2vw, 26px);
}

.direct .text-btn {
  min-width: 44px;
  min-height: 44px;
  margin-left: 10px;
  font-size: 16px;
  font-weight: 400;
  color: var(--on-dark-2);
}

/* Form */

.form {
  color-scheme: dark;
}

.form-tabs {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid #353a3e;
}

.form-tabs button {
  min-height: 44px;
  margin-bottom: -1px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--on-dark-2);
  font: 600 18px/1.2 var(--sans);
  cursor: pointer;
  transition: color 0.12s ease;
}

.form-tabs button:hover {
  color: var(--on-dark);
}

.form-tabs button[aria-pressed="true"] {
  color: var(--on-dark);
  border-bottom-color: var(--orange);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
}

.field {
  display: grid;
  gap: 4px;
  align-content: start;
}

.field.is-full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--on-dark-2);
}

.field .opt {
  color: var(--on-dark-3);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--on-dark-3);
  border-radius: 0;
  background: transparent;
  color: var(--on-dark);
  font: 400 18px var(--serif);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--on-dark-3);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-color: var(--orange);
}

.field input[aria-invalid="true"] {
  border-bottom-color: #ff9f8e;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23b4babf' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 28px;
}

.field select option {
  background: var(--paper);
  color: var(--ink);
}

.field input[type="file"] {
  padding: 14px 0 12px;
  color: var(--on-dark-2);
  font-size: 16px;
}

.field input[type="file"]::file-selector-button {
  margin-right: 16px;
  padding: 9px 16px;
  border: 1px solid var(--on-dark-3);
  border-radius: 0;
  background: transparent;
  color: var(--on-dark);
  font: 600 15px var(--sans);
  cursor: pointer;
}

.field input[type="file"]::file-selector-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.field-hint {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--on-dark-2);
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75);
  cursor: pointer;
}

[data-show] {
  display: none;
}

.form[data-mode="machining"] [data-show="machining"],
.form[data-mode="software"] [data-show="software"] {
  display: grid;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-status {
  margin: 22px 0 0;
  font-size: 16px;
  color: var(--on-dark);
}

.form-status:empty {
  margin: 0;
}

.form-status.is-error {
  color: #ff9f8e;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 32px;
}

.form-foot p {
  margin: 0;
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--on-dark-2);
}

.form-done {
  padding: 8px 0 8px 28px;
  border-left: 2px solid var(--orange);
}

.form-done h3 {
  font-size: 32px;
  margin-bottom: 14px;
}

.form-done p {
  margin: 0 0 14px;
  color: var(--on-dark-2);
  max-width: 48ch;
}

.form-done .text-btn {
  margin-top: 10px;
  color: var(--on-dark);
}

/* Footer */

.footer {
  padding: 56px 0 36px;
  border-top: 1px solid #353a3e;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.footer-top img {
  width: 190px;
  height: auto;
}

.footer-top p {
  margin: 0 0 0 auto;
  max-width: 40ch;
  text-align: right;
  color: var(--on-dark-2);
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin: 40px 0 0;
  padding: 24px 0;
  border-top: 1px solid #353a3e;
  border-bottom: 1px solid #353a3e;
}

.footer-links a {
  font-family: var(--sans);
  font-size: 16px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--on-dark-3);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  transform: translate(-50%, 16px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--on-dark-3);
  font: 600 15px var(--sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Resources page ---------- */

.page-head {
  padding: clamp(56px, 8vw, 120px) 0 clamp(40px, 5vw, 72px);
}

.page-head h1 {
  font-size: clamp(44px, 5.5vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.page-head .lead {
  max-width: 52ch;
  margin-top: 32px;
}

.page-head + .section {
  border-top: 0;
  padding-top: 0;
}

.note-line {
  margin: 56px 0 0;
  max-width: 60ch;
  color: var(--ink-2);
}

/* ---------- 404 ---------- */

.lost {
  padding: clamp(72px, 12vw, 176px) 0;
}

.lost h1 {
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.lost p {
  margin: 28px 0 0;
  max-width: 40ch;
  font-size: 20px;
  color: var(--ink-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .nav-links a {
    padding: 12px 10px;
  }
}

@media (max-width: 1200px) {
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 48px 40px;
    border-top: 0;
  }

  .process::after {
    display: none;
  }

  .process li {
    grid-template-rows: none;
    grid-row: auto;
    border-top: 1px solid var(--on-dark-2);
  }
}

@media (max-width: 1080px) {
  .split,
  .contact-grid,
  .about,
  .hero-grid,
  .head-row,
  .machining-grid,
  .firstpass,
  .tool {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-head,
  .contact-intro {
    position: static;
  }

  .hero-fig,
  .side-fig {
    max-width: 640px;
  }

  .side-fig .fig-mat img {
    aspect-ratio: 4 / 3;
  }

  .about {
    align-items: start;
  }

  .head-row h2,
  .about h2,
  .hero h1 {
    max-width: 20ch;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    gap: 0;
  }

  .nav-cta {
    margin-left: auto;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav.is-open {
    border-bottom-color: var(--ink);
  }

  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    padding: 8px 24px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
  }

  .nav.is-open .nav-links a {
    padding: 14px 0;
    font-size: 19px;
    border-bottom: 1px solid var(--rule);
  }

  .svc-grid {
    grid-template-columns: 1fr;
  }

  .subtract {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .subtract .arrow-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .brand img {
    width: 120px;
    height: auto;
  }

  .wrap {
    width: calc(100% - 36px);
  }

  .nav-quote .long {
    display: none;
  }

  .nav-quote .short {
    display: inline;
  }

  .nav-quote {
    padding: 0 14px;
    min-height: 44px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.4vw, 52px);
  }

  .actions .btn {
    width: 100%;
  }

  .titleblock {
    grid-template-columns: 1fr;
  }

  .subtract {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .process {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-tabs {
    gap: 24px;
  }

  .form-foot .btn {
    width: 100%;
  }

  .footer-links {
    gap: 12px 24px;
  }

  .footer-top p {
    margin-left: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main:focus {
  outline: none;
}

.turnstile-slot {
  margin-top: 20px;
}

.turnstile-slot:empty {
  margin: 0;
}
