/* Kinze website design system: base.
   Reset, element defaults, the type steps, layout primitives, focus and reduced motion.
   Reads tokens only (tokens/tokens.css). The one kind of raw value allowed here is a
   media-query width, because CSS cannot read a variable inside @media; each one names
   the breakpoint token it stands for. */

/* ---------- Font ---------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Archivo's Latin Extended subset (same version, same axes): the Lithuanian and Romanian letters
   (ą č ę ė į š ų ū ž ă ș ț). The range is Google Fonts' latin-ext range, so a page loads this
   file only when it holds one of those letters (WEB-173). */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

/* Cyrillic (Ukrainian, Russian). Archivo has none, so Roboto Flex, matched to Archivo by
   measurement, joins the Archivo family for the Cyrillic range only (WEB-173, Jason's pick
   2026-10-30). Its axes are relabeled so Archivo's weights and widths reach the matching design
   values; size-adjust matches cap height. The descriptors must repeat Archivo's, or font matching
   drops the face and the letters fall back to Arial. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/kinze-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  size-adjust: 97.2%;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Local Arial, resized to Archivo's measured width and metrics, so text does not reflow
   when Archivo arrives. Values measured from both font files with fontTools. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 98.4%;
  ascent-override: 89.2%;
  descent-override: 21.3%;
  line-gap-override: 0%;
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol[role="list"], ul[role="list"] { list-style: none; padding: 0; }

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

input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
:where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
:where(a) { color: inherit; }
:where(button, input, select, textarea):disabled { cursor: not-allowed; }

[hidden] { display: none !important; }

/* ---------- Element defaults ---------- */

html { background: var(--kw-surface); }

body {
  min-height: 100vh;
  background: var(--kw-surface);
  color: var(--kw-text);
  font-family: var(--kw-font-sans);
  font-size: var(--kw-text-body-size);
  font-weight: var(--kw-text-body-weight);
  font-stretch: var(--kw-text-body-width);
  line-height: var(--kw-text-body-leading);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Any element that switches theme repaints its own ground and ink. */
[data-theme] { background-color: var(--kw-surface); color: var(--kw-text); }

h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, blockquote { text-wrap: pretty; }

h1 { font-size: var(--kw-text-display-size); font-weight: var(--kw-text-display-weight); font-stretch: var(--kw-text-display-width); line-height: var(--kw-text-display-leading); letter-spacing: var(--kw-text-display-tracking); }
h2 { font-size: var(--kw-text-h2-size); font-weight: var(--kw-text-h2-weight); font-stretch: var(--kw-text-h2-width); line-height: var(--kw-text-h2-leading); letter-spacing: var(--kw-text-h2-tracking); }
h3 { font-size: var(--kw-text-h3-size); font-weight: var(--kw-text-h3-weight); font-stretch: var(--kw-text-h3-width); line-height: var(--kw-text-h3-leading); letter-spacing: var(--kw-text-h3-tracking); }
h4, h5, h6 { font-size: var(--kw-text-h4-size); font-weight: var(--kw-text-h4-weight); font-stretch: var(--kw-text-h4-width); line-height: var(--kw-text-h4-leading); letter-spacing: var(--kw-text-h4-tracking); }

p { max-width: var(--kw-measure); }

/* A link inside running text: accent, underlined, offset like the homepage's. Navigation and
   action links are components and set their own look. */
:where(p, li, dd, figcaption, blockquote) a:not([class]) {
  color: var(--kw-accent-text);
  text-decoration-line: underline;
  text-decoration-thickness: var(--kw-border-hairline);
  text-underline-offset: var(--kw-space-1);
  transition: color var(--kw-duration-fast) var(--kw-ease-standard);
}
:where(p, li, dd, figcaption, blockquote) a:not([class]):hover { color: var(--kw-text); }

strong, b { font-weight: var(--kw-weight-semibold); }

hr {
  border: 0;
  border-top: var(--kw-border-hairline) dashed var(--kw-line);
  margin-block: var(--kw-space-stack);
}

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

/* ---------- Type steps, as classes ---------- */

.kw-numeral, .kw-display, .kw-h2, .kw-stat, .kw-quote, .kw-h3, .kw-h4,
.kw-lead, .kw-body, .kw-small, .kw-ui, .kw-label { margin: 0; }

.kw-numeral { font-size: var(--kw-text-numeral-size); font-weight: var(--kw-text-numeral-weight); font-stretch: var(--kw-text-numeral-width); line-height: var(--kw-text-numeral-leading); letter-spacing: var(--kw-text-numeral-tracking); color: var(--kw-accent-text); font-variant-numeric: tabular-nums; }
.kw-display { font-size: var(--kw-text-display-size); font-weight: var(--kw-text-display-weight); font-stretch: var(--kw-text-display-width); line-height: var(--kw-text-display-leading); letter-spacing: var(--kw-text-display-tracking); }
.kw-h2      { font-size: var(--kw-text-h2-size); font-weight: var(--kw-text-h2-weight); font-stretch: var(--kw-text-h2-width); line-height: var(--kw-text-h2-leading); letter-spacing: var(--kw-text-h2-tracking); }
.kw-stat    { font-size: var(--kw-text-stat-size); font-weight: var(--kw-text-stat-weight); font-stretch: var(--kw-text-stat-width); line-height: var(--kw-text-stat-leading); letter-spacing: var(--kw-text-stat-tracking); }
.kw-quote   { font-size: var(--kw-text-quote-size); font-weight: var(--kw-text-quote-weight); font-stretch: var(--kw-text-quote-width); line-height: var(--kw-text-quote-leading); letter-spacing: var(--kw-text-quote-tracking); }
.kw-h3      { font-size: var(--kw-text-h3-size); font-weight: var(--kw-text-h3-weight); font-stretch: var(--kw-text-h3-width); line-height: var(--kw-text-h3-leading); letter-spacing: var(--kw-text-h3-tracking); }
.kw-h4      { font-size: var(--kw-text-h4-size); font-weight: var(--kw-text-h4-weight); font-stretch: var(--kw-text-h4-width); line-height: var(--kw-text-h4-leading); letter-spacing: var(--kw-text-h4-tracking); }
.kw-lead    { font-size: var(--kw-text-lead-size); font-weight: var(--kw-text-lead-weight); font-stretch: var(--kw-text-lead-width); line-height: var(--kw-text-lead-leading); color: var(--kw-text-muted); max-width: var(--kw-measure); }
.kw-body    { font-size: var(--kw-text-body-size); font-weight: var(--kw-text-body-weight); font-stretch: var(--kw-text-body-width); line-height: var(--kw-text-body-leading); }
.kw-small   { font-size: var(--kw-text-small-size); font-weight: var(--kw-text-small-weight); font-stretch: var(--kw-text-small-width); line-height: var(--kw-text-small-leading); }
.kw-ui      { font-size: var(--kw-text-ui-size); font-weight: var(--kw-text-ui-weight); font-stretch: var(--kw-text-ui-width); line-height: var(--kw-text-ui-leading); }
.kw-label   { font-size: var(--kw-text-label-size); font-weight: var(--kw-text-label-weight); font-stretch: var(--kw-text-label-width); line-height: var(--kw-text-label-leading); letter-spacing: var(--kw-text-label-tracking); text-transform: var(--kw-text-label-transform); }

.kw-muted  { color: var(--kw-text-muted); }
.kw-accent { color: var(--kw-accent-text); }

/* ---------- Layout primitives ---------- */

.kw-container        { width: var(--kw-container); margin-inline: auto; }
.kw-container-narrow { width: min(var(--kw-container-narrow), 100%); }

/* A section is a band of the page: its own ground, its own vertical rhythm.
   Theme it with data-theme="dark"; give it the alternate light ground with .kw-section--sunken. */
.kw-section          { padding-block: var(--kw-space-section-y); background: var(--kw-surface); color: var(--kw-text); }
.kw-section--sunken  { background: var(--kw-surface-sunken); }
.kw-section--flush   { padding-block: 0; }
.kw-section-gap      { margin-block-start: var(--kw-space-section-y); }
.kw-section-title    { margin-block-end: var(--kw-space-stack); }

/* Section head: title left, lead and action right; stacks below md. */
.kw-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: end;
  gap: var(--kw-space-head-gap);
  margin-block-end: var(--kw-space-stack);
}
@media (max-width: 700px) { /* --kw-bp-md */
  .kw-section-head { grid-template-columns: minmax(0, 1fr); gap: var(--kw-space-5); }
}

/* Vertical rhythm between children. Set --kw-gap on the element to change the step. */
.kw-stack   { display: flex; flex-direction: column; gap: var(--kw-gap, var(--kw-space-4)); }
/* Things in a row that wrap: buttons, chips, tags. */
.kw-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--kw-gap, var(--kw-space-3)); }
/* A grid of equal cards that wraps to fit. Set --kw-min for the narrowest card. */
.kw-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--kw-min, var(--kw-layout-card-min)), 100%), 1fr)); gap: var(--kw-gap, var(--kw-space-6)); }

/* Visually hidden but read aloud. */
.kw-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Focus ---------- */

:focus-visible {
  outline: var(--kw-border-focus) solid var(--kw-focus);
  outline-offset: var(--kw-border-focus);
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link: first thing a keyboard reaches. */
.kw-skip {
  position: fixed; inset-block-start: var(--kw-space-2); inset-inline-start: var(--kw-space-2);
  z-index: var(--kw-z-skip);
  padding: var(--kw-space-3) var(--kw-space-4);
  background: var(--kw-button-primary-bg); color: var(--kw-button-primary-fg);
  transform: translateY(-200%);
}
.kw-skip:focus-visible { transform: none; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; /* reduced-motion */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; /* reduced-motion */
    scroll-behavior: auto !important;
  }
}
/* The reader's own Reduce motion switch (Display settings) sets data-motion="off" on <html>:
   the same reset as the system setting, for people who cannot change that one. */
html[data-motion="off"], html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: 0.01ms !important; /* reduced-motion */
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important; /* reduced-motion */
  scroll-behavior: auto !important;
}

/* Trademark mark after a product name (Kinze Parts IQ). Raised and small, and it does not open up the line. */
/* Keeps a product name and its mark together inside a flex or grid row. */
.kw-brandname { white-space: nowrap; }
.kw-tm { font-size: var(--kw-mark-size); line-height: 0; vertical-align: super; }
