/* Karo Floors · componenten (referentie)
   Laad eerst ../tokens/tokens.css, dan dit bestand. Alle waarden komen uit de tokens.
   Donkere band: zet de klasse kf-inverse op de sectie. Voorbeeld van alles: voorbeeld.html. */

/* ---------- tekststijlen ---------- */
.kf-display { font-size: var(--kf-text-5xl); line-height: var(--kf-leading-tight); font-weight: 700; }
.kf-h1 { font-size: var(--kf-text-3xl); line-height: 1.08; font-weight: 700; }
.kf-h2 { font-size: var(--kf-text-2xl); line-height: var(--kf-leading-snug); font-weight: 650; }
.kf-h3 { font-size: var(--kf-text-lg); line-height: 1.25; font-weight: 600; }
.kf-body { font-size: var(--kf-text-base); line-height: var(--kf-leading-body); }
.kf-small { font-size: var(--kf-text-sm); line-height: 1.55; }
.kf-label { font-size: var(--kf-text-xs); line-height: 1.4; font-weight: 600; letter-spacing: var(--kf-tracking-label); }
@media (max-width: 1023px) { .kf-display { font-size: var(--kf-text-4xl); } }

body {
  margin: 0;
  background: var(--kf-bg);
  color: var(--kf-text);
  font-family: var(--kf-font);
  font-size: var(--kf-text-base);
  line-height: var(--kf-leading-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- typografie ---------- */
.kf-display, .kf-h1, .kf-h2 { margin: 0; font-stretch: var(--kf-stretch-display); text-wrap: balance; }
.kf-h3 { margin: 0; text-wrap: balance; }
.kf-body, .kf-small { margin: 0; }
.kf-label { margin: 0; text-transform: uppercase; font-stretch: var(--kf-stretch-label); }
.kf-eyebrow { color: var(--kf-link); }
.kf-measure { max-width: 65ch; }

/* ---------- knoppen ---------- */
.kf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--kf-space-2);
  padding: var(--kf-space-3) var(--kf-space-4);
  border: 1px solid transparent;
  border-radius: var(--kf-radius-md);
  font-family: inherit;
  font-size: var(--kf-text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--kf-duration) var(--kf-ease), border-color var(--kf-duration) var(--kf-ease), color var(--kf-duration) var(--kf-ease);
}
.kf-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kf-btn--primary { background: var(--kf-primary); color: var(--kf-on-primary); }
.kf-btn--primary:hover { background: var(--kf-primary-hover); }
.kf-btn--secondary { background: transparent; color: var(--kf-text); border-color: var(--kf-border-input); }
.kf-btn--secondary:hover { border-color: var(--kf-text); }
.kf-btn:focus-visible, .kf-btn.is-focus { outline: 2px solid var(--kf-focus); outline-offset: 2px; }
.kf-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--kf-space-3); }

/* ---------- sectiekop ---------- */
.kf-section-head { display: grid; gap: var(--kf-space-3); max-width: 65ch; }
.kf-section-head .kf-lead { margin: var(--kf-space-2) 0 0; color: var(--kf-text-muted); }

/* ---------- scheiding met planken ---------- */
.kf-plank-divider { display: block; width: 100%; height: 8px; overflow: hidden; }
.kf-plank-divider svg { display: block; height: 8px; width: 100%; }
.kf-plank-divider .plank { fill: var(--kf-border); }
.kf-plank-divider .plank-accent { fill: var(--kf-primary); }

/* ---------- donkere band ---------- */
.kf-band {
  position: relative;
  overflow: hidden;
  padding: var(--kf-space-7) var(--kf-space-6);
  background: var(--kf-bg);
  color: var(--kf-text);
}
.kf-band__text { position: relative; z-index: 1; display: grid; gap: var(--kf-space-3); max-width: 58%; }
.kf-band__text .kf-lead { margin: var(--kf-space-2) 0 var(--kf-space-4); color: var(--kf-text-muted); max-width: 52ch; }
.kf-band__planks { position: absolute; top: 0; right: 0; width: 46%; height: 100%; }
.kf-band__planks .plank { fill: var(--kf-surface-alt); }
.kf-band__planks .plank-accent { fill: var(--kf-primary); }

/* ---------- voor en na ---------- */
.kf-ba { position: relative; margin: 0; --pos: 50%; }
.kf-ba__frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--kf-radius-lg); background: var(--kf-zand-300); }
.kf-ba__img { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--kf-space-4); font-size: var(--kf-text-sm); line-height: 1.55; color: var(--kf-zand-900); }
.kf-ba__img--before { background: var(--kf-zand-400); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.kf-ba__img--after { justify-content: flex-end; text-align: right; background: var(--kf-zand-100); }
.kf-ba__img span { max-width: min(22ch, 40%); }
.kf-ba__tag { position: absolute; top: var(--kf-space-4); padding: var(--kf-space-1) var(--kf-space-2); border-radius: var(--kf-radius-sm); background: var(--kf-espresso); color: var(--kf-zand); font-size: var(--kf-text-xs); font-weight: 600; letter-spacing: var(--kf-tracking-label); text-transform: uppercase; font-stretch: var(--kf-stretch-label); pointer-events: none; }
.kf-ba__tag--before { left: var(--kf-space-4); }
.kf-ba__tag--after { right: var(--kf-space-4); }
.kf-ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.kf-ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--kf-kalk); pointer-events: none; }
.kf-ba__knob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: var(--kf-radius-md); background: var(--kf-terracotta); color: var(--kf-kalk); box-shadow: var(--kf-shadow-md); }
.kf-ba__knob svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kf-ba__range:focus-visible ~ .kf-ba__handle .kf-ba__knob { outline: 2px solid var(--kf-focus); outline-offset: 2px; }
.kf-ba figcaption { margin-top: var(--kf-space-3); font-size: var(--kf-text-sm); color: var(--kf-text-muted); }

/* ---------- formulier ---------- */
.kf-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--kf-space-5) var(--kf-space-4); }
.kf-field { display: grid; gap: var(--kf-space-2); align-content: start; }
.kf-field__label { font-size: var(--kf-text-sm); font-weight: 600; color: var(--kf-text); }
.kf-field__hint { margin: 0; font-size: var(--kf-text-sm); line-height: 1.55; color: var(--kf-text-muted); }
.kf-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--kf-space-3);
  border: 1px solid var(--kf-border-input);
  border-radius: var(--kf-radius-md);
  background: var(--kf-surface);
  color: var(--kf-text);
  font-family: inherit;
  font-size: var(--kf-text-base);
  line-height: 1.3;
  box-shadow: var(--kf-shadow-sm);
}
select.kf-input { appearance: none; padding-right: var(--kf-space-6); background-image: none; }
.kf-select { position: relative; }
.kf-select svg { position: absolute; right: var(--kf-space-3); top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--kf-text-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.kf-input:focus-visible, .kf-input.is-focus { outline: 2px solid var(--kf-focus); outline-offset: 2px; }
.kf-input[aria-invalid="true"] { border-color: var(--kf-error); }
.kf-field__error { display: flex; gap: var(--kf-space-2); align-items: flex-start; margin: 0; font-size: var(--kf-text-sm); line-height: 1.55; color: var(--kf-error); }
.kf-field__error svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.kf-header { display: flex; align-items: center; gap: var(--kf-space-6); padding: var(--kf-space-4) var(--kf-space-5); background: var(--kf-bg); border-bottom: 1px solid var(--kf-border); }
.kf-header__logo { display: block; flex: none; line-height: 0; }
.kf-header__logo img { display: block; height: 36px; width: auto; }
.kf-header__logo .on-dark { display: none; }
.kf-inverse .kf-header__logo .on-light { display: none; }
.kf-inverse .kf-header__logo .on-dark { display: block; }
.kf-nav { display: flex; gap: var(--kf-space-5); margin-right: auto; }
.kf-nav a { color: var(--kf-text); font-size: var(--kf-text-sm); font-weight: 500; text-decoration: none; text-underline-offset: 6px; }
.kf-nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.kf-nav a[aria-current="page"] { color: var(--kf-link); text-decoration: underline; text-decoration-thickness: 2px; }
.kf-nav a:focus-visible, .kf-header__logo:focus-visible { outline: 2px solid var(--kf-focus); outline-offset: 4px; border-radius: var(--kf-radius-sm); }

@media (max-width: 767px) {
  .kf-form-grid { grid-template-columns: minmax(0, 1fr); }
  .kf-band { padding: var(--kf-space-7) var(--kf-gutter) var(--kf-space-8); }
  .kf-band__text { max-width: none; }
  .kf-band__planks { top: auto; bottom: 0; width: 100%; height: 34%; }
  .kf-nav { display: none; }
  .kf-header { gap: var(--kf-space-4); padding: var(--kf-space-3) var(--kf-gutter); }
  .kf-header__logo img { height: 28px; }
  .kf-header .kf-row { margin-left: auto; }
  .kf-header .kf-btn--secondary { display: none; }
  .kf-ba__img { padding: var(--kf-space-3); font-size: var(--kf-text-xs); }
}
@media (prefers-reduced-motion: reduce) {
  .kf-btn { transition: none; }
}
