/* ==========================================================================
   JOHNCENT — "Precision, concealed."
   A datasheet with taste: paper ground, drawn lines, one red accent,
   and exactly one motion — push to open.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Surface */
  --paper:        #F3F1EC;   /* warm workshop-paper ground */
  --surface:      #FFFFFF;   /* product cells — merges with white-bg product shots */
  --structure:    #E8E6E1;   /* alternate bands, table headers */
  --hairline:     #D8D6D0;   /* every rule and border on light ground */
  --hairline-2:   #C4C1BA;   /* hover / emphasis rule */

  /* Ink */
  --ink:          #131518;
  --ink-2:        #62666A;
  --ink-3:        #8B8F93;

  /* Machine band — the one dark surface */
  --machine:      #17191C;
  --machine-2:    #1E2125;
  --machine-line: #2E3235;
  --machine-ink:  #E8E6E1;
  --machine-ink2: #8E9398;

  /* Accent — Johncent's own brand red, doubling as the dimension-line red */
  --accent:       #DA251D;
  --accent-dark:  #A81A14;

  /* Type */
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Structure */
  --container: 1360px;
  --gutter: 40px;
  --section-y: clamp(72px, 9vw, 140px);

  /* Motion — the damped soft-close curve, used for everything that moves */
  --ease-damped: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-press: 90ms;
  --dur-drawer: 420ms;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border-radius: 0;
}

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

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

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

/* --------------------------------------------------------------------------
   3. THE SHEET — sections stack, each drawing its own vertical hairlines.
      Horizontal section rules run full-bleed and cross them. The page reads
      as one continuous drawing sheet.
   -------------------------------------------------------------------------- */

.section { border-top: 1px solid var(--hairline); }
.section:first-of-type { border-top: 0; }

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  border-inline: 1px solid var(--hairline);
}

.section--pad > .wrap { padding-block: var(--section-y); }
.section--structure { background: var(--structure); }

/* The one dark band */
.section--machine {
  background: var(--machine);
  color: var(--machine-ink);
  border-top-color: var(--machine);
}
.section--machine .wrap { border-inline-color: var(--machine-line); }

/* Registration ticks — punctuation where rules meet the rails, not wallpaper */
.tick {
  position: relative;
}
.tick::before,
.tick::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--hairline-2);
  pointer-events: none;
}
.tick::before { left: calc(var(--gutter) * -1); border-left: 1px solid var(--hairline-2); }
.tick::after  { right: calc(var(--gutter) * -1); border-right: 1px solid var(--hairline-2); }
.section--machine .tick::before,
.section--machine .tick::after { border-color: var(--machine-line); }

/* --------------------------------------------------------------------------
   4. TYPE
   -------------------------------------------------------------------------- */

.u-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.section--machine .u-label { color: var(--machine-ink2); }
.u-label--accent { color: var(--accent); }

/* Tabular numerals for every dimension, count and code on the page */
.u-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.h-hero {
  font-size: clamp(44px, 6.1vw, 86px);
  font-weight: 600;
  font-variation-settings: "wdth" 108;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.h-sect {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  font-variation-settings: "wdth" 106;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.h-card {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.008em;
}

.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}
.section--machine .lede { color: var(--machine-ink2); }

.body { color: var(--ink-2); max-width: 62ch; }
.body + .body { margin-top: 1em; }

/* --------------------------------------------------------------------------
   5. SECTION HEADER — the repeated row that makes the page feel engineered
   -------------------------------------------------------------------------- */

.sect-head {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
  padding-block: 28px 0;
  margin-bottom: 56px;
}
.sect-head__index { padding-top: 6px; }
.sect-head__meta {
  text-align: right;
  padding-top: 6px;
  align-self: start;
}
.sect-head__body { max-width: 62ch; }
.sect-head .h-sect + .lede { margin-top: 20px; }

/* --------------------------------------------------------------------------
   6. BUTTONS — square, ink, drawn
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--dur-press) linear, border-color var(--dur-press) linear;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-2);
}
.btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

.btn--light {
  background: var(--machine-ink);
  border-color: var(--machine-ink);
  color: var(--machine);
}
.btn--light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn__arrow { transition: transform var(--dur-press) linear; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Text link with a drawn underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hairline-2);
  padding-bottom: 2px;
  font-weight: 500;
  transition: border-color var(--dur-press) linear, color var(--dur-press) linear;
}
.link:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------------
   7. HEADER / NAV
   -------------------------------------------------------------------------- */

.utility {
  background: var(--ink);
  color: var(--machine-ink2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.utility .wrap {
  border-inline-color: #2A2D30;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 9px;
}
.utility ul { display: flex; gap: 28px; flex-wrap: wrap; }
.utility a:hover { color: #fff; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 241, 236, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-block: 18px;
}
.brand { flex: none; }
.brand img { width: 132px; }

.nav { display: flex; gap: 34px; margin-left: auto; }
.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  padding-block: 4px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-damped);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.masthead .btn { padding: 12px 20px; font-size: 13px; }

/* Only ever shown inside the open mobile drawer */
.nav__cta { display: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--hairline-2);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 18px; height: 1.5px;
  background: var(--ink);
  transition: transform 200ms var(--ease-damped), opacity 120ms linear;
}
.nav-toggle span { top: 50%; margin-top: -0.75px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after  { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */

.hero > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
  padding-block: 0;
  align-items: stretch;
}

.hero__copy {
  padding-block: clamp(56px, 7vw, 104px) clamp(48px, 6vw, 88px);
  padding-right: clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__kicker { margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.hero__kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
  flex: none;
}
.hero .h-hero { margin-bottom: 26px; }
.hero .lede { max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Media side — sits in a white cell, like a specimen tray */
.hero__media {
  position: relative;
  background: var(--surface);
  border-left: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 72px);
  min-height: clamp(360px, 44vw, 560px);
}
.hero__specimen { position: relative; width: 100%; max-width: 480px; }
.hero__specimen img { width: 100%; mix-blend-mode: multiply; }

/* The dimension-line overlay — drawing/photo hybrid */
.dim-overlay {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.dim-line {
  stroke: var(--accent);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.dim-ext {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.75;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.dim-text {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: var(--accent);
  text-transform: uppercase;
}
.dim-arrow { fill: var(--accent); }

/* Draw-on, once, at load */
.js .dim-overlay .dim-line,
.js .dim-overlay .dim-ext {
  stroke-dasharray: var(--len, 300);
  stroke-dashoffset: var(--len, 300);
}
.js .dim-overlay.is-drawn .dim-line,
.js .dim-overlay.is-drawn .dim-ext {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 620ms var(--ease-damped);
}
.js .dim-overlay .dim-text,
.js .dim-overlay .dim-arrow { opacity: 0; }
.js .dim-overlay.is-drawn .dim-text,
.js .dim-overlay.is-drawn .dim-arrow {
  opacity: 1;
  transition: opacity 300ms linear 420ms;
}

/* Fact strip beneath the hero */
.factstrip { border-top: 1px solid var(--hairline); }
.factstrip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-inline: 0;
}
.factstrip__item {
  padding: 22px var(--gutter);
  border-left: 1px solid var(--hairline);
}
.factstrip__item:first-child { border-left: 0; }
.factstrip__value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 6px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   9. SPECIMEN GRID — parts-drawer cells with collapsed shared borders
   -------------------------------------------------------------------------- */

.specimens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.spec {
  position: relative;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 0;
  padding: 0;
  transition: transform var(--dur-press) ease-in;
}
.spec.is-pressed { transform: translateY(2px); }
.spec:hover .spec__figure img { transform: scale(1.03); }

.spec__figure {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 16%;
  overflow: hidden;
}
.spec__figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 420ms var(--ease-damped);
}

.spec__code {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.spec__body {
  display: block;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--hairline);
  margin-top: auto;
  /* Equalises every cell in a row regardless of how the name wraps */
  min-height: 96px;
}
.spec__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.spec__attr {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* The push cue */
.spec__cue {
  position: absolute;
  bottom: 18px; right: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 200ms linear, transform 200ms var(--ease-damped);
}
.spec:hover .spec__cue { opacity: 1; transform: translateY(0); }

/* The drawer — slides out laterally, damped, like a soft-close in reverse */
.spec__drawer {
  position: absolute;
  inset: auto 0 0 0;
  background: var(--ink);
  color: #fff;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform var(--dur-drawer) var(--ease-damped);
  will-change: transform;
}
.spec.is-open .spec__drawer { transform: translateX(0); }
.spec.is-open .spec__cue { opacity: 0; }

.spec__drawer dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}
.spec__drawer dt { color: var(--machine-ink2); text-transform: uppercase; }
.spec__drawer dd { margin: 0; text-align: right; color: #fff; }
.spec__drawer .link {
  margin-top: 14px;
  font-size: 12px;
  color: #fff;
  border-color: #3A3E42;
}
.spec__drawer .link:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   10. CATEGORY INDEX — a plain, dense, scannable range list
   -------------------------------------------------------------------------- */

.catindex {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.catindex a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  transition: background 140ms linear, padding-left 220ms var(--ease-damped);
}
.catindex a:hover { background: var(--surface); padding-left: 28px; }
.catindex a:hover .catindex__arrow { color: var(--accent); transform: translateX(3px); }
.catindex__no { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.catindex__name { font-size: 15px; font-weight: 500; }
.catindex__arrow {
  color: var(--ink-3);
  transition: transform 200ms var(--ease-damped), color 140ms linear;
}

/* --------------------------------------------------------------------------
   11. MECHANISM — press / release / open
   -------------------------------------------------------------------------- */

.mech {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.mech__stage {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: clamp(28px, 4vw, 56px);
}
.mech__stage svg { width: 100%; height: auto; }

.mech-body   { fill: none; stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mech-fill   { fill: var(--structure); stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mech-spring { fill: none; stroke: var(--ink-2); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mech-door   { fill: var(--structure); stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mech-accent { stroke: var(--accent); stroke-width: 1.25; fill: none; vector-effect: non-scaling-stroke; }
.mech-hatch  { fill: url(#hatch); stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.mech-label  { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; fill: var(--ink-3); text-transform: uppercase; }

.mech__steps { counter-reset: step; }
.mech__step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 20px;
  padding-block: 22px;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
  transition: opacity 200ms linear;
}
.mech__step:last-child { border-bottom: 1px solid var(--hairline); }
.mech__step[aria-selected="false"] { opacity: 0.45; }
.mech__step[aria-selected="false"]:hover { opacity: 0.75; }
.mech__step-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 3px;
}
.mech__step h3 { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.mech__step p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* --------------------------------------------------------------------------
   12. CAPABILITY — the one dark band
   -------------------------------------------------------------------------- */

/* Uniform treatment: this is what makes mixed-source photography look intentional */
.treated {
  filter: grayscale(1) contrast(1.1) brightness(0.94);
}
.treated-wrap { position: relative; overflow: hidden; background: var(--machine); }
.treated-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #2A2E33;
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}
/* Grain, to unify sources */
.treated-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.cap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.cap__media { aspect-ratio: 4 / 3; }
.cap__media img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 50%; }
.cap .h-sect { color: var(--machine-ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--machine-line);
  margin-top: 64px;
}
.stat {
  padding: 26px 26px 26px 0;
  border-left: 1px solid var(--machine-line);
  padding-left: 26px;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value {
  font-family: var(--mono);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--machine-ink);
  line-height: 1;
  margin-bottom: 10px;
}
.stat__value sup { font-size: 0.45em; vertical-align: super; color: var(--accent); }

/* Process chain inside the dark band */
.chain {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--machine-line);
  border: 1px solid var(--machine-line);
  margin-top: 64px;
}
.chain__step { background: var(--machine); padding: 26px 24px; }
.chain__step h4 { font-size: 15px; font-weight: 600; margin: 12px 0 6px; color: var(--machine-ink); }
.chain__step p { font-size: 13.5px; color: var(--machine-ink2); margin: 0; line-height: 1.5; }

/* --------------------------------------------------------------------------
   13. PROCESS STRIP — OEM / ODM
   -------------------------------------------------------------------------- */

.process {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.process__step {
  background: var(--paper);
  padding: 28px 24px 30px;
  position: relative;
  transition: background 160ms linear;
}
.process__step:hover { background: var(--surface); }
.process__no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 22px;
}
.process__step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.005em; }
.process__step p { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.process__lead {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   14. QUALITY — split with the instrument photograph
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split--flip .split__media { order: -1; }
.split__media { aspect-ratio: 3 / 2; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

.qlist { border-top: 1px solid var(--hairline); margin-top: 36px; }
.qlist li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  padding-block: 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
.qlist span:first-child {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.qlist span:last-child { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   15. RFQ
   -------------------------------------------------------------------------- */

.rfq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
}

.channels { border-top: 1px solid var(--hairline); margin-top: 36px; }
.channels a, .channels div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-block: 15px;
  border-bottom: 1px solid var(--hairline);
}
.channels a { transition: color 140ms linear; }
.channels a:hover { color: var(--accent); }
.channels .u-label { padding-top: 2px; }
.channels__value { font-size: 15px; font-weight: 500; }
.channels__value--sm { font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink-2); }

.form { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hairline); }
.field { background: var(--surface); padding: 14px 18px 12px; }
.field label { display: block; margin-bottom: 4px; }
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 15px;
  outline: none;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field:focus-within { background: #FAFAF8; }
.field:focus-within .u-label { color: var(--accent); }

.field--file input[type="file"] { font-size: 13px; font-family: var(--mono); padding-top: 6px; }

.form__actions {
  background: var(--surface);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.form__note { font-size: 12px; color: var(--ink-3); margin: 0; }

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */

.footer { background: var(--machine); color: var(--machine-ink2); }
.footer .wrap { border-inline-color: var(--machine-line); }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: clamp(56px, 6vw, 88px) 56px;
}
.footer__brand img { width: 140px; margin-bottom: 22px; }
.footer__brand p { font-size: 14px; line-height: 1.6; max-width: 34ch; margin: 0; }
.footer h4 { margin-bottom: 18px; }
.footer li + li { margin-top: 11px; }
.footer a { font-size: 14px; transition: color 140ms linear; }
.footer a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid var(--machine-line);
  padding-block: 22px 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   17. PAGE HEAD (inner pages)
   -------------------------------------------------------------------------- */

.pagehead > .wrap { padding-block: clamp(48px, 6vw, 88px) clamp(40px, 5vw, 64px); }
.crumbs { display: flex; gap: 10px; margin-bottom: 26px; }
.crumbs a:hover { color: var(--accent); }
.pagehead .h-sect { max-width: 20ch; }
.pagehead .lede { margin-top: 20px; }

/* Filter rail on the products page */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.filters button {
  flex: 1 1 auto;
  background: var(--paper);
  border: 0;
  padding: 13px 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 140ms linear, color 140ms linear;
  white-space: nowrap;
}
.filters button:hover { background: var(--surface); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------------------
   18. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .specimens { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .nav, .masthead .btn { display: none; }
  .nav-toggle { display: block; }

  .masthead.is-open .nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 0;
  }
  .masthead.is-open .nav a {
    padding: 14px var(--gutter);
    border-top: 1px solid var(--hairline);
    font-size: 16px;
  }
  .masthead.is-open .nav a::after { display: none; }

  /* The primary conversion path has to survive the breakpoint */
  .masthead.is-open .nav__cta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px var(--gutter) 8px;
    padding: 15px 22px;
    background: var(--ink);
    color: #fff;
    border-top: 0;
    font-weight: 600;
    font-size: 15px;
  }

  .hero > .wrap { grid-template-columns: 1fr; }
  .hero__copy { padding-right: 0; }
  .hero__media { border-left: 0; border-top: 1px solid var(--hairline); margin-inline: calc(var(--gutter) * -1); }

  .factstrip .wrap { grid-template-columns: repeat(2, 1fr); }
  .factstrip__item:nth-child(3) { border-left: 0; }
  .factstrip__item:nth-child(n+3) { border-top: 1px solid var(--hairline); }

  .sect-head {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 40px;
  }
  .sect-head__meta { text-align: left; }

  .mech, .cap, .split, .rfq { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }

  /* SVG text is in viewBox units, so it shrinks with the drawing. Scale it back up. */
  .dim-text { font-size: 12px; }
  .mech__stage { padding: 20px 12px; }
  .mech__stage .dim-text,
  .mech-label { font-size: 15px; }

  /* No hover on touch: a dimmed step reads as disabled, so keep them all lit.
     Tapping still drives the diagram. */
  .mech__step[aria-selected="false"] { opacity: 1; }
  .mech__step { padding-block: 18px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--machine-line); }

  .catindex { grid-template-columns: 1fr; }
  .utility { display: none; }
}

@media (max-width: 620px) {
  .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .qlist li, .channels a, .channels div { grid-template-columns: 1fr; gap: 4px; }
  .footer__top { grid-template-columns: 1fr; gap: 34px; }
  .spec__drawer { padding: 14px; }
  .spec__drawer dl { font-size: 9.5px; }

  /* Narrow cells wrap both name and attribute — give the body room for that */
  .spec__body { min-height: 118px; padding: 14px 14px 16px; }
  .spec__code { top: 10px; left: 10px; }
  .spec__figure { padding: 12%; }
}

/* --------------------------------------------------------------------------
   19. REDUCED MOTION — motion is a nicety, never a requirement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .dim-overlay .dim-line,
  .js .dim-overlay .dim-ext { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .dim-overlay .dim-text,
  .js .dim-overlay .dim-arrow { opacity: 1; }
}

/* --------------------------------------------------------------------------
   20. PRINT — it is a datasheet, after all
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .utility, .nav-toggle, .form, .footer__bottom { display: none; }
  body { background: #fff; }
  .section--machine { background: #fff; color: #000; }
  .section--machine .h-sect, .stat__value { color: #000; }
}
