/* ==========================================================================
   KIP Innovations prototype: reset, typography, accessibility
   ========================================================================== */

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

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

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background-color: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  color: inherit;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 { font-size: var(--text-4xl); line-height: var(--lh-hero); letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-3);
  text-wrap: pretty;
}
p:last-child {
  margin-bottom: 0;
}

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

ul, ol {
  list-style: none;
}

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

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

button {
  cursor: pointer;
  text-align: left;
}

table {
  border-collapse: collapse;
  width: 100%;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-3);
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-3);
  background: var(--c-black);
  color: var(--c-invert);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}
.skip-link:focus {
  top: var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
