/* KFL Tooling: aluminum, graphite, pushbutton blue. Archivo, expanded for display. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations");
}
:root {
  --alu: #f4eee4;        /* warm paper */
  --sheet: #fbf8f3;      /* card */
  --ink: #2a221d;        /* walnut */
  --steel: #6a5d53;      /* secondary text */
  --rule: #d9cdbd;
  --blue: #2f5d46;       /* pine */
  --blue-ink: #234736;
  --focus: #c98a2b;      /* brass, focus ring only */
  --measure: 34rem;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--alu);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

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

/* type scale: 1.25 ratio from 17px */
h1, h2, h3 { font-variation-settings: "wdth" 125; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; font-variation-settings: "wdth" 112; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.25rem; color: var(--steel); max-width: 30rem; }

/* header */
.site-head { background: var(--ink); color: #fff; }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-variation-settings: "wdth" 125; font-size: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.brand svg { flex: none; }
.brand small { font-weight: 400; font-variation-settings: "wdth" 100; color: #bfb2a6; font-size: .8rem; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { color: #e6ddd3; text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.nav .btn { color: #fff; }

.btn {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  padding: .7rem 1.15rem; border-radius: 4px; font-weight: 650; border: 0; font: inherit; font-weight: 650; cursor: pointer;
}
.btn:hover { background: var(--blue-ink); color: #fff; }
.btn.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.quiet:hover { background: var(--ink); color: #fff; }

/* hero: the engineering drawing */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.drawing { background: var(--sheet); border: 1px solid var(--rule); padding: clamp(.75rem, 2vw, 1.5rem); }
.drawing svg { width: 100%; height: auto; display: block; }
.drawing figcaption { font-size: .9rem; color: var(--steel); margin-top: .75rem; }
@media (prefers-reduced-motion: no-preference) {
  .dim { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.1s ease-out .3s forwards; }
  .dim-t { opacity: 0; animation: fade .4s ease-out 1.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 1; } }
}

/* sections */
.band { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.band.sheet { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band h2 { margin-bottom: 1rem; }
.band > .wrap > p { color: var(--steel); }

/* category index: rows, not cards */
.cats { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.cats li { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1.5rem; align-items: center; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.cats img { width: 9rem; aspect-ratio: 5/4; object-fit: contain; }
.cats h3 a { color: var(--ink); text-decoration: none; }
.cats h3 a:hover { color: var(--blue); }
.cats p { margin: .35rem 0 0; color: var(--steel); }
.cats .count { font-variant-numeric: tabular-nums; color: var(--steel); white-space: nowrap; }

/* order steps: a real sequence */
.steps { list-style: none; counter-reset: s; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(s); font-variation-settings: "wdth" 125; font-weight: 800; font-size: 2.2rem; line-height: 1; display: block; margin-bottom: .5rem; color: var(--blue); }
.steps p { color: var(--steel); }

/* materials table */
table { border-collapse: collapse; width: 100%; margin-top: 1.5rem; font-size: 1rem; }
th, td { text-align: left; padding: .8rem .75rem .8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
tbody th { font-weight: 700; white-space: nowrap; }
td { color: var(--steel); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.cta { background: var(--ink); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: #d8cdc2; }
.cta .wrap { display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* category pages */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: .75rem; }
.parts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.part { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: clamp(1.25rem, 4vw, 3rem); padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.part figure { margin: 0; background: #fff; border: 1px solid var(--rule); padding: 1rem; display: flex; gap: .5rem; align-items: center; justify-content: center; }
.part figure img { max-height: 15rem; width: auto; }
.part figure.multi img { max-height: 11rem; min-width: 0; flex: 1 1 0; object-fit: contain; }
.part figure.pair { flex-direction: column; }
.part figure.pair img:first-child { max-height: 15rem; }
.part figure.pair img + img { max-height: 7rem; }
.part h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
.pn { font-variant-numeric: tabular-nums; color: var(--steel); margin: .3rem 0 .9rem; font-size: .95rem; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 1rem 0 1.25rem; font-size: .98rem; }
.specs dt { font-weight: 700; }
.specs dd { margin: 0; color: var(--steel); }
.note { border-left: 3px solid var(--blue); padding: .5rem 0 .5rem 1rem; color: var(--steel); max-width: var(--measure); }

/* custom work */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.case figure { margin: 0; background: #fff; border: 1px solid var(--rule); padding: 1.25rem; }

/* quote form */
form.quote { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.5rem; max-width: 46rem; }
form.quote .full { grid-column: 1 / -1; }
label { display: block; font-weight: 650; margin-bottom: .35rem; }
label span { font-weight: 400; color: var(--steel); }
input, select, textarea {
  width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #b3a596; border-radius: 4px; background: #fff; color: var(--ink);
}
textarea { min-height: 9rem; resize: vertical; }
.form-status { grid-column: 1 / -1; min-height: 1.5em; }

.site-foot { padding: 2.5rem 0; color: var(--steel); font-size: .95rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-foot a { color: var(--steel); }

@media (max-width: 52rem) {
  .hero .wrap, .split, .case { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .part { grid-template-columns: 1fr; }
  .part figure img { max-height: 13rem; }
  .cats li { grid-template-columns: 6rem 1fr; }
  .cats img { width: 6rem; }
  .cats .count { grid-column: 2; }
  form.quote { grid-template-columns: 1fr; }
  .nav { margin-left: 0; gap: .9rem; }
  table { font-size: .93rem; }
  tbody th { white-space: normal; }
}

/* file attachments on the quote form */
input[type="file"] { padding: .55rem; background: var(--sheet); cursor: pointer; }
.hint { font-size: .92rem; color: var(--steel); margin: .45rem 0 0; }
.file-list { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--steel); font-size: .95rem; }

/* buying */
.cart-link { position: relative; }
.cart-count { display: inline-block; min-width: 1.35em; padding: 0 .35em; margin-left: .35em; border-radius: 999px; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 700; text-align: center; line-height: 1.45; font-variant-numeric: tabular-nums; }
form.buy { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: .25rem; display: grid; gap: .75rem; max-width: 36rem; }
form.buy + form.buy { margin-top: .5rem; }
.buy-name { font-weight: 700; margin: 0; }
.buy-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.buy-row label { margin: 0; font-size: .9rem; }
.buy-row select, .buy-row input { margin-top: .3rem; width: auto; min-width: 7rem; }
.buy-row input[name="qty"] { width: 5rem; min-width: 0; }
.price { font-size: 1.35rem; font-weight: 750; font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; min-width: 6.5rem; }
.added { color: var(--steel); }
.alt { font-size: .93rem; margin-top: .9rem; }
.alt a { color: var(--steel); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.cart-table td { color: var(--ink); vertical-align: middle; }
.cart-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-sub { color: var(--steel); font-size: .9rem; }
.cart-qty { width: 4.5rem; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.cart-totals { display: grid; grid-template-columns: max-content max-content; gap: .35rem 2rem; justify-content: end; margin: 1.25rem 0; font-variant-numeric: tabular-nums; }
.cart-totals dt { color: var(--steel); }
.cart-totals dd { margin: 0; text-align: right; }
.cart-note { color: var(--steel); margin-left: auto; text-align: right; max-width: none; }
.cart > p:last-child { text-align: right; max-width: none; }
.cart-status { display: block; margin-top: .5rem; color: var(--steel); }
@media (max-width: 52rem) { .cart-note, .cart > p:last-child { text-align: left; } .cart-totals { justify-content: start; } }
.buy-row label { display: flex; flex-direction: column; }
.cart-table th.num { text-align: right; }
.test-note { margin: 0 0 1rem auto; text-align: left; }
.cart-count[hidden] { display: none; }

/* KFL Print Shop additions */
.banner { background: #9e2b25; color: #fff; font-size: .95rem; padding: .5rem 0; text-align: center; }
.cards { list-style: none; margin: 2rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.card img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--rule); }
.card > div { padding: 1rem 1.25rem 1.25rem; }
.card h3 { margin: 0 0 .4rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.card p { color: var(--steel); margin: 0 0 .6rem; }
.card .price-tag { color: var(--ink); font-weight: 700; margin: 0; }
.drawing img { display: block; width: 100%; height: auto; }
.cats li { grid-template-columns: 1fr auto; }
.btn, .card, .drawing, input, select, textarea { border-radius: 6px; }
