/* Morgan Maschines — v1
   Paper ground, ink line work, one signal colour used for dimensions and actions. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --paper: #f4f1ea;
  --paper-2: #ece8dd;
  --ink: #12161a;
  --ink-2: #4e545a;
  --rule: #cfc9ba;
  --accent: #bf3f17;
  --accent-h: #a33310;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --pad: 22px;
  --maxw: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) {
  :root { --pad: 44px; }
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--rule) var(--paper);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd, dt { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- type helpers ---------- */

.label,
.strip,
.fact dt,
figcaption,
.site-foot,
.small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-2);
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */

.site-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--rule);
}

.mark {
  display: grid;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.45;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 4px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; }
.nav a:hover { color: var(--accent); }

.head-cta {
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
}
.head-cta:hover { color: var(--accent-h); }

@media (min-width: 860px) {
  .site-head {
    grid-template-columns: auto 1fr auto;
    padding: 22px 44px;
    gap: 40px;
  }
  .nav {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    gap: 30px;
    overflow: visible;
  }
}

/* ---------- layout ---------- */

.hero-grid,
.section-grid,
.contact-inner,
.site-foot {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

.hero { padding-top: clamp(40px, 7vw, 84px); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 24px;
  align-items: center;
}

.hero-copy { grid-column: 1 / -1; }

h1 {
  font-size: clamp(2.55rem, 6.4vw, 4.9rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
h1 .stop { color: var(--accent); }

.lead {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 24px;
  background: var(--accent);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 2px;
  transition: background 0.18s ease, transform 0.18s var(--ease);
}
.btn:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.18s ease, color 0.18s ease;
}
.link:hover { color: var(--accent); text-decoration-color: currentColor; }

.hero-figure { grid-column: 1 / -1; margin: 40px 0 0; }

.valve-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.valve-svg .ln { fill: none; stroke: var(--ink); stroke-width: 2; }
.valve-svg .ln-thin { fill: none; stroke: var(--ink); stroke-width: 1; }
.valve-svg .cl { fill: none; stroke: var(--rule); stroke-width: 1; }
.valve-svg .dim { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.valve-svg .dim-thin { fill: none; stroke: var(--accent); stroke-width: 0.9; opacity: 0.55; }
.valve-svg .bore-fill { fill: var(--accent); opacity: 0.08; stroke: none; }
.valve-svg .dot { fill: var(--accent); stroke: none; }
.valve-svg .lbl text {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  fill: var(--ink-2);
}
.valve-svg .lbl { opacity: 1; transition: opacity 0.5s ease 0.2s; }
.js .valve-svg .lbl { opacity: 0; }
.js .valve-svg.is-ready .lbl { opacity: 1; }

figcaption {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: clamp(48px, 8vw, 92px) var(--pad) 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
  font-size: 11px;
  color: var(--ink-2);
}
.strip li { display: flex; list-style: none; }
.strip li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--rule);
}

@media (min-width: 900px) {
  .strip { max-width: var(--maxw); margin-inline: auto; }
}

@media (min-width: 1000px) {
  .hero-copy { grid-column: 1 / span 7; }
  .hero-figure {
    grid-column: 8 / span 5;
    margin: 0;
    margin-right: calc(-1 * (44px + max(0px, (100vw - 1368px) / 2)));
  }
  .valve-svg { max-height: 76vh; }
}

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

.section {
  margin-top: clamp(64px, 10vw, 120px);
  border-top: 1px solid var(--rule);
  padding-block: clamp(40px, 6vw, 88px) clamp(56px, 9vw, 104px);
}

.section-grid {
  display: grid;
  gap: 32px;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.intro {
  max-width: 54ch;
  font-size: 18px;
  color: var(--ink-2);
}

.steps {
  list-style: none;
  margin-top: 34px;
  border-top: 1px solid var(--rule);
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 7px;
}

.step h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 650;
  letter-spacing: -0.012em;
}

.step p {
  margin-top: 6px;
  max-width: 54ch;
  color: var(--ink-2);
  font-size: 16px;
}

.rows { margin-top: 30px; border-top: 1px solid var(--rule); }

.row {
  display: grid;
  gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.18s ease, color 0.18s ease;
}

.row dt {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.row dd {
  color: var(--ink-2);
  max-width: 56ch;
  transition: color 0.18s ease;
}

@media (min-width: 700px) {
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: baseline; }
}

@media (hover: hover) {
  .row { padding-inline: 12px; margin-inline: -12px; }
  .row:hover { background: var(--ink); color: var(--paper); }
  .row:hover dd { color: rgba(244, 241, 234, 0.72); }
}

.facts {
  margin-top: 30px;
  border-top: 1px solid var(--rule);
}

.fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.fact dt { padding-top: 3px; }
.fact dd { font-size: 16px; overflow-wrap: anywhere; }
.fact dd a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.fact dd a:hover { color: var(--accent); text-decoration-color: currentColor; }

@media (min-width: 640px) {
  .fact { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
}

@media (min-width: 900px) {
  .section-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .section-head { grid-column: 1 / span 4; }
  .section-body { grid-column: 6 / span 7; }
}

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

.contact {
  margin-top: clamp(64px, 10vw, 120px);
  background: var(--ink);
  color: var(--paper);
}

.contact-inner {
  padding-block: clamp(56px, 9vw, 112px);
}

.contact h2 { max-width: 14ch; }

.contact p {
  margin-top: 20px;
  max-width: 46ch;
  color: rgba(244, 241, 234, 0.76);
}

.contact .actions { margin-top: 32px; }

.btn-light { background: var(--accent); }
.btn-light:hover { background: #d24a20; }

.link-light {
  color: var(--paper);
  text-decoration-color: rgba(244, 241, 234, 0.4);
}
.link-light:hover { color: #f0a184; text-decoration-color: currentColor; }

.small {
  margin-top: 40px;
  color: rgba(244, 241, 234, 0.55);
}

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

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 22px 40px;
  font-size: 10px;
}
.site-foot a:hover { color: var(--accent); }

/* ---------- motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .row { transition: none; }
}
