/* KNC Keys — services site
   Palette grounded in the workbench: graphite tools, steel springs,
   KNC red from the existing brand, amber for lube. */

:root {
  --ink: #1e2126;
  --graphite: #33383f;
  --steel: #6e757e;
  --hairline: #d5d7d9;
  --bench: #f4f3f1;
  --paper: #ffffff;
  /* --brand is the logo red, used for marks, rules and graphic accents.
     --red is a deeper shade used wherever red carries text or fills a
     button, because white on #ed1c24 doesn't clear contrast minimums. */
  --brand: #ed1c24;
  --red: #c20000;
  --red-deep: #8f0000;
  --amber: #b0762a;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: clamp(1.15rem, 1.6vw, 1.35rem);
  --t-lg: clamp(1.5rem, 2.6vw, 2rem);
  --t-xl: clamp(2rem, 4.4vw, 3.25rem);
  --t-2xl: clamp(2.6rem, 7vw, 5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bench);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

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

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 46rem; }

/* ---------- notice ---------- */

.notice {
  background: var(--ink);
  color: #efeeec;
  font-size: var(--t-sm);
  padding: 0.7rem 0;
}

.notice strong { color: #fff; }

.notice p { margin: 0; max-width: none; }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 243, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.wordmark img {
  height: clamp(2rem, 4.5vw, 2.6rem);
  width: auto;
}

.foot-logo {
  height: 2.4rem;
  width: auto;
  margin-bottom: 1rem;
}

.nav {
  display: flex;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  font-size: var(--t-sm);
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--graphite);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

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

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--t-2xl);
  font-weight: 800;
  margin-bottom: 1.2rem;
}

.hero .lede {
  font-size: var(--t-md);
  color: var(--graphite);
  max-width: 34ch;
}

.hero-note {
  font-size: var(--t-sm);
  color: var(--steel);
  border-left: 2px solid var(--red);
  padding-left: 0.9rem;
  max-width: 40ch;
  margin-bottom: 1.8rem;
}

/* exploded switch diagram */

.switch-fig { margin: 0; }

.switch-fig svg { width: 100%; height: auto; }

.switch-fig figcaption {
  font-size: var(--t-xs);
  color: var(--steel);
  margin-top: 0.9rem;
  max-width: 34ch;
}

.dg-label {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 11.5px;
  fill: var(--graphite);
}

.dg-label-lead { fill: var(--red); font-weight: 600; }

/* ---------- buttons: keycap press ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: var(--t-sm);
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  background: var(--red);
  color: #fff;
  box-shadow: 0 3px 0 var(--red-deep);
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.btn:hover { background: #d10606; }

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--red-deep);
}

.btn-quiet {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--hairline);
  border: 1px solid var(--hairline);
}

.btn-quiet:hover { background: #fbfbfa; }

.btn-quiet:active { box-shadow: 0 0 0 var(--hairline); }

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

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

.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.band-paper { background: var(--paper); border-block: 1px solid var(--hairline); }

.band-ink { background: var(--ink); color: #e9e8e6; }

.band-ink h2 { color: #fff; }

.band-ink p { color: #c6c8ca; }

.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.section-head h2 { font-size: var(--t-xl); margin-bottom: 0.7rem; }

.section-head p { color: var(--steel); }

/* ---------- order builder ---------- */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.field { margin-bottom: 1.5rem; }

.field > label,
.field > .field-title {
  display: block;
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: var(--t-sm);
  margin-bottom: 0.5rem;
}

.field .hint {
  font-size: var(--t-xs);
  color: var(--steel);
  margin: 0 0 0.6rem;
}

select,
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  font: inherit;
  font-size: var(--t-sm);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}

textarea { min-height: 6rem; resize: vertical; }

.pick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.pick {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  background: var(--paper);
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  display: block;
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick .pick-name {
  display: block;
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: var(--t-sm);
}

.pick .pick-price {
  display: block;
  font-size: var(--t-xs);
  color: var(--steel);
  margin-top: 0.15rem;
}

.pick:has(input:checked) {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.pick:has(input:focus-visible) {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* receipt */

.receipt {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--brand);
  border-radius: 4px;
  padding: 1.5rem;
  position: sticky;
  top: 5.5rem;
}

.receipt h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.receipt-lines {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--t-xs);
  border-top: 1px solid var(--hairline);
  padding-top: 0.9rem;
  margin-bottom: 0.9rem;
}

.rline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.3rem;
}

.rline span:first-child { color: var(--graphite); }

.rline-total {
  border-top: 1px solid var(--hairline);
  margin-top: 0.5rem;
  padding-top: 0.7rem;
  font-size: var(--t-sm);
  font-weight: 600;
}

.rline-total span:last-child { color: var(--red); }

.receipt .empty {
  font-size: var(--t-sm);
  color: var(--steel);
  margin: 0;
}

.receipt .fineprint {
  font-size: var(--t-xs);
  color: var(--steel);
  margin: 1rem 0 0;
}

.status {
  margin-top: 1rem;
  font-size: var(--t-sm);
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  display: none;
}

.status.is-shown { display: block; }

.status.ok { background: #eef6ee; border: 1px solid #b9d6ba; color: #235c28; }

.status.bad { background: #fdeeee; border: 1px solid #eab8b8; color: #8f0000; }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 52rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1rem;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: var(--t-sm);
  color: var(--red);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  background: var(--paper);
}

.steps h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }

.steps p { margin: 0; color: var(--steel); font-size: var(--t-sm); }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.stats div { border-top: 2px solid var(--brand); padding-top: 0.8rem; }

.stats dt {
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  line-height: 1;
}

.stats dd {
  margin: 0.4rem 0 0;
  font-size: var(--t-sm);
  color: var(--steel);
}

.band-ink .stats dd { color: #b6b9bc; }

/* ---------- giving ---------- */

.giving {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 58rem;
}

.giving li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}

.giving li:first-child { border-top: 1px solid var(--hairline); }

.giving .when {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-xs);
  color: var(--steel);
}

.giving h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }

.giving p { margin: 0; font-size: var(--t-sm); color: var(--graphite); }

.giving a { color: var(--red); }

/* ---------- prose ---------- */

.prose h2 { font-size: var(--t-lg); margin: 2.5rem 0 0.9rem; }

.prose h2:first-child { margin-top: 0; }

.prose p, .prose li { color: var(--graphite); }

.prose ul { max-width: var(--measure); padding-left: 1.1rem; }

.prose li { margin-bottom: 0.4rem; }

.pull {
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: var(--t-md);
  line-height: 1.35;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding-left: 1.2rem;
  margin: 2rem 0;
  max-width: 34ch;
}

.portrait { margin: 0 0 2rem; }

.portrait img { border-radius: 4px; }

.portrait figcaption {
  font-size: var(--t-xs);
  color: var(--steel);
  margin-top: 0.6rem;
}

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

.foot {
  background: var(--ink);
  color: #b6b9bc;
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  font-size: var(--t-sm);
}

.foot a { color: #efeeec; }

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.foot h4 {
  color: #fff;
  font-size: var(--t-sm);
  margin-bottom: 0.7rem;
}

.foot ul { list-style: none; margin: 0; padding: 0; }

.foot li { margin-bottom: 0.4rem; }

.foot p { color: #b6b9bc; }

.foot-base {
  border-top: 1px solid #34383e;
  padding-top: 1.5rem;
  font-size: var(--t-xs);
  color: #8b9096;
}

/* ---------- responsive ---------- */

@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .receipt { position: static; }
}

@media (max-width: 34rem) {
  .giving li { grid-template-columns: 1fr; gap: 0.35rem; }
  .steps li { grid-template-columns: 1.9rem 1fr; }
  .steps li::before { width: 1.9rem; height: 1.9rem; }
}
/* ===== Header and menu, matched to the Leftovers page =====
   Paste this at the very bottom of styles.css. */
.masthead{position:sticky;top:0;z-index:40;background:rgba(244,243,241,.92);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--hairline,#d5d7d9)}
.masthead .wrap{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;min-height:4.25rem;flex-wrap:wrap}
.wordmark{display:inline-flex;align-items:center;text-decoration:none}
.wordmark img{height:clamp(2rem,4.5vw,2.6rem);width:auto}
.nav{display:flex;gap:1.25rem;flex-wrap:wrap;font-size:.9375rem;font-weight:500}
.nav a{text-decoration:none;color:var(--graphite,#33383f);padding:.25rem 0;border-bottom:2px solid transparent;white-space:nowrap}
.nav a:hover,.nav a[aria-current]{color:var(--ink,#1e2126);border-bottom-color:var(--brand,#ed1c24)}