/* ==========================================================================
   Key-Cert — Base
   Reset, @font-face, typography defaults, focus styles, motion guard.
   ========================================================================== */

/* ---- font-face: self-hosted, Latin subset, variable where available ---- */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-variable.woff2") format("woff2-variations"),
       url("../fonts/roboto-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}


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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.65;
  color: var(--kc-ink);
  background: var(--kc-white);
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a {
  color: var(--kc-blue-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .15em;
}

a:not([class]) { color: var(--kc-blue-deep); }

ul, ol {
  list-style: none;
  padding: 0;
}

table { border-collapse: collapse; }

/* ---- typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--kc-marine);
  text-wrap: balance;
  overflow-wrap: break-word;
}

p, .lede, .eyebrow, .btn, .chip, .card {
  overflow-wrap: break-word;
}

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }
h4 { font-size: 1.125rem; }

p {
  max-width: 68ch;
}

small, .small {
  font-size: var(--step-small);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kc-blue-deep);
}

.eyebrow--on-dark { color: var(--kc-blue); }

.mono {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.lede {
  font-size: 1.1875rem;
  color: var(--kc-slate);
  max-width: 60ch;
}

/* ---- skip link ---- */
.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -80px;
  z-index: 1000;
  background: var(--kc-marine);
  color: var(--kc-white);
  padding: var(--space-12) var(--space-24);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-decoration: none;
  transition: top var(--motion-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-16);
}

/* ---- focus ---- */
:focus {
  outline: none;
}

:focus-visible {
  /* Two-tone ring so focus stays ≥3:1 against light AND dark section
     backgrounds: the white ring reads on marine, the marine ring reads
     on white/mist — at least one is always strongly visible. */
  outline: 2px solid var(--kc-white);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--kc-marine);
  border-radius: 2px;
}

/* ---- visually hidden (still available to AT) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- selection ---- */
::selection {
  background: var(--kc-blue);
  color: var(--kc-white);
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
}
