/* =====================================================================
   KEYKAN — Homepage UI kit
   Built to spec: KEYKAN_Website_Content_v1.md
   ===================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); }

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

/* Smooth scrolling for every in-page anchor link. scroll-margin-top offsets
   targets so the section heading clears the fixed nav instead of hiding
   beneath it. Disabled when the user prefers reduced motion. */
html { scroll-behavior: smooth; }
.kk-hero[id], .kk-section[id] { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Primitives ---------- */

/* Sky-blue mono eyebrow (the spec calls for blue, not muted) */
.kk-eyebrow {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3FA9F5;
}
.kk-eyebrow--muted { color: var(--fg-muted); }
.kk-eyebrow--accent { color: var(--accent); }

/* Tag pill — Sky-Blue mono caps used on the "Currently Building" cards */
.kk-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--link);
  padding: 6px 10px;
  border: 1px solid rgba(63,169,245,0.32);
}

/* Buttons */
.kk-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--dur-fast) var(--ease-std), border-color var(--dur-base) var(--ease-std), color var(--dur-base) var(--ease-std);
}
.kk-btn--primary { background: var(--cta); color: var(--cta-fg); }
.kk-btn--primary:hover { background: var(--cta-hover); }
.kk-btn--primary:active { background: var(--cta-press); }
.kk-btn--primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Gold button used on the Offscreen newsletter section only */
.kk-btn--gold { background: var(--accent); color: var(--bg); }
.kk-btn--gold:hover { background: var(--accent-bright); }

/* White button on cobalt block — used in Final CTA */
.kk-btn--invert { background: #fff; color: var(--cta); }
.kk-btn--invert:hover { background: #f1f4ff; }

.kk-btn--ghost { background: transparent; color: var(--fg); border: 1px solid var(--rule); padding: 13px 23px; }
.kk-btn--ghost:hover { border-color: var(--rule-bright); }

.kk-btn .kk-arrow { display: inline-block; transition: transform var(--dur-base) var(--ease-out); }
.kk-btn:hover .kk-arrow { transform: translateX(3px); }

/* Sky-Blue text link with → */
.kk-text-link {
  color: var(--link);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-base) var(--ease-std), border-color var(--dur-base) var(--ease-std);
}
.kk-text-link:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
.kk-text-link .kk-arrow { transition: transform var(--dur-base) var(--ease-out); }
.kk-text-link:hover .kk-arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.kk-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background var(--dur-base) var(--ease-std), backdrop-filter var(--dur-base) var(--ease-std), box-shadow var(--dur-base) var(--ease-std), border-color var(--dur-base) var(--ease-std);
  border-bottom: 1px solid transparent;
}
.kk-nav.is-scrolled {
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.kk-nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.kk-nav__logo { display: inline-flex; align-items: center; }
.kk-nav__logo img { height: 22px; }
.kk-nav__center { display: flex; gap: 36px; }
.kk-nav__center a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--dur-base) var(--ease-std), border-color var(--dur-base) var(--ease-std);
}
.kk-nav__center a:hover { color: var(--link); border-bottom-color: var(--link); }
.kk-nav__cta { font-size: 13px; padding: 10px 18px; }

/* ---------- Layout shell ---------- */
.kk-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.kk-rule { border-top: 1px solid var(--rule); }

/* ---------- Hero ---------- */
.kk-hero {
  padding: 200px 0 60px;
}
.kk-hero__eyebrow { margin: 28px 0 40px; }
.kk-hero__stack {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0;
  max-width: none;
  text-wrap: nowrap;
}
.kk-hero__stack .kk-stack-line { display: block; }
.kk-hero__stack .kk-dot { color: var(--accent); }
.kk-hero__sub {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 48px;
  max-width: 720px;
}
.kk-hero__sub .kk-em { color: var(--link); }
.kk-hero__sub .kk-em--strong { color: var(--fg); font-weight: 500; }
.kk-hero__actions { display: flex; align-items: center; gap: 28px; }
.kk-hero__actions .kk-btn--primary { font-size: 16px; padding: 16px 28px; }

/* ---------- Trust Bar ---------- */
.kk-trust {
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.kk-trust__stat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kk-trust__num {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.kk-trust__lbl {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255,255,255,0.6);
  max-width: 200px;
}

/* ---------- Section header ---------- */
.kk-section {
  padding: 80px 0;
}
.kk-section__head { margin-bottom: 44px; }
.kk-section__head .kk-eyebrow { margin-bottom: 24px; }
.kk-section__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0;
  max-width: 900px;
}
.kk-section__title .kk-dim { color: var(--fg-muted); }
.kk-section__lede {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 24px 0 0;
  max-width: 640px;
}
/* Gold underline rule (used on the Four Pillars header per spec) */
.kk-rule--gold {
  width: 64px; height: 3px; background: var(--accent); margin-top: 32px;
}

/* ---------- Currently Building cards ---------- */
.kk-building { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kk-build-card {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 36px 32px;
  display: flex; flex-direction: column;
  transition: border-color var(--dur-base) var(--ease-std), transform var(--dur-base) var(--ease-std);
  position: relative;
}
.kk-build-card:hover { border-color: var(--rule-bright); }
.kk-build-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.kk-build-card__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  margin: 0 0 16px;
}
.kk-build-card__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 28px;
  flex: 1;
}
.kk-build-card__cta { margin-top: auto; }

/* Live badge with pulsing dot */
.kk-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 6px 10px;
  border: 1px solid #ff3b3b;
  background: rgba(255,59,59,0.06);
}
.kk-live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: #ff3b3b;
  box-shadow: 0 0 0 0 rgba(255,59,59,0.8);
  animation: kk-pulse 1.6s var(--ease-out) infinite;
}
@keyframes kk-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,59,0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(255,59,59,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); }
}

/* ---------- Four Pillars ---------- */
.kk-pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.kk-pillar {
  background: var(--bg);
  padding: 40px;
  display: flex; flex-direction: column; gap: 20px;
  transition: background var(--dur-base) var(--ease-std);
}
.kk-pillar:hover { background: var(--bg-elevated); }
.kk-pillar__head { display: flex; align-items: baseline; gap: 20px; }
.kk-pillar__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.kk-pillar__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  margin: 0;
}
.kk-pillar__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
  max-width: 480px;
}
.kk-pillar__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.kk-pillar__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 4px 0;
}
.kk-pillar__tag + .kk-pillar__tag::before { content: "·"; margin: 0 8px 0 0; color: var(--fg-dim); }

/* ---------- About ---------- */
.kk-about__grid {
  display: block;
  max-width: 760px;
}
.kk-about__copy p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0 0 24px;
}
.kk-about__copy p.kk-lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--fg);
  font-weight: 400;
  margin-bottom: 32px;
}
.kk-about__copy p.kk-secondary { color: var(--fg-muted); }
.kk-credentials { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--rule); }
.kk-credentials li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  display: flex; gap: 12px; align-items: baseline;
}
.kk-credentials li::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  flex: 0 0 8px;
  align-self: center;
}

/* Core Tension card */
.kk-tension {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}
.kk-tension__panel { padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.kk-tension__panel + .kk-tension__panel { border-left: 1px solid var(--rule); }
.kk-tension__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.kk-tension__panel--expert .kk-tension__lbl { color: var(--accent); }
.kk-tension__panel--beginner .kk-tension__lbl { color: var(--link); }
.kk-tension__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  line-height: 1;
}
.kk-tension__body {
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
}
.kk-tension__sep {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: var(--bg);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  z-index: 1;
}
.kk-tension__quote {
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* ---------- Selected Work (compact table) ---------- */
.kk-work-sec { padding: 60px 0; }
.kk-work-sec__head { margin-bottom: 40px; }
.kk-worktable {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule);
}
.kk-worktable__row {
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-base) var(--ease-std);
}
.kk-worktable__row:hover { background: var(--bg-elevated); }
.kk-worktable__name,
.kk-worktable__blurb,
.kk-worktable__stat {
  padding: 18px 24px 18px 0;
  vertical-align: middle;
  text-align: left;
}
.kk-worktable__icon {
  width: 52px;
  padding: 16px 20px 16px 0;
  vertical-align: middle;
}
.kk-worktable__icon image-slot {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.kk-worktable__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
  width: 1%;
}
.kk-worktable__blurb {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg-muted);
  padding-left: 40px;
}
.kk-worktable__stat {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  text-align: right;
  white-space: nowrap;
  width: 1%;
  padding-right: 0;
}
.kk-worktable__statnum { display: block; }
.kk-worktable__statlbl {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.kk-worktable__note {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
  opacity: 0.6;
  letter-spacing: 0.01em;
  margin: 24px 0 0;
  max-width: none;
  /* Single line on desktop (it fits within the 1136px column); wraps
     instead of overflowing once the viewport gets narrow. */
  white-space: normal;
}

/* ---------- Timeline (rows, vertically centered) ---------- */
.kk-timeline-sec { padding: 60px 0; }
.kk-timeline-sec__head { margin-bottom: 40px; }
.kk-timeline {
  display: flex;
  flex-direction: column;
}
.kk-timeline-item {
  display: grid;
  grid-template-columns: 150px 280px 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.kk-timeline-item:last-child { border-bottom: none; }
.kk-timeline-item__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.kk-timeline-item__n { color: var(--accent); text-transform: uppercase; }
.kk-timeline-item__range { color: var(--fg-muted); }
.kk-timeline-item__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
  margin: 0;
}
.kk-timeline-item__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0;
  max-width: 720px;
  text-wrap: pretty;
}

/* ---------- Offscreen Newsletter ---------- */
.kk-offscreen {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
}
.kk-offscreen__main { padding: 64px; }
.kk-offscreen__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 10px;
  border: 1px solid var(--accent);
  margin-bottom: 28px;
}
.kk-offscreen__title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0 0 12px;
  line-height: 1;
}
.kk-offscreen__tagline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin: 0 0 28px;
}
.kk-offscreen__desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 32px;
  max-width: 540px;
}
.kk-offscreen__form { display: flex; max-width: 480px; margin-bottom: 16px; }
.kk-offscreen__input {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--fg);
  font-family: var(--font-body); font-size: 15px;
  outline: none;
}
.kk-offscreen__input::placeholder { color: var(--fg-dim); }
.kk-offscreen__input:focus { border-color: var(--accent); }
.kk-offscreen__reassure {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Sidebar: issue structure */
.kk-offscreen__side { padding: 64px 48px; }
.kk-offscreen__side-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.kk-issue-row {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
}
.kk-issue-row:last-child { border-bottom: 1px solid var(--rule); }
.kk-issue-row__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}
.kk-issue-row__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.kk-issue-row__access--premium { color: var(--accent); }
.kk-issue-row__access--free { color: var(--link); }

/* ---------- Audience Callout ---------- */
.kk-audience {
  padding: 60px 0;
  text-align: center;
}
.kk-audience__text {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 auto;
  max-width: 880px;
  text-wrap: balance;
}
.kk-audience__text strong { font-weight: 700; color: var(--link); }

/* ---------- Final CTA — Electric Cobalt full-width block ---------- */
.kk-final {
  background: var(--cta);
  padding: 88px 0;
  margin: 0 calc(50% - 50vw); /* full-bleed */
  width: 100vw;
  position: relative;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
}
.kk-final__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
.kk-final__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  margin: 0;
  max-width: 900px;
}
.kk-final__body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  margin: 0;
  max-width: 640px;
}
.kk-final__btn { font-size: 16px; padding: 18px 28px; margin-top: 16px; }

/* ---------- Contact ---------- */
.kk-contact-sec { padding: 60px 0; }
.kk-contact-sec__head { margin-bottom: 40px; }
.kk-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.kk-contact__card {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-std), background var(--dur-base) var(--ease-std);
  min-height: 220px;
}
.kk-contact__card:hover { border-color: var(--rule-bright); }
.kk-contact__card--cta { background: var(--cta); border-color: var(--cta); }
.kk-contact__card--cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.kk-contact__card-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.kk-contact__card--cta .kk-contact__card-lbl { color: rgba(255,255,255,0.78); }
.kk-contact__card-h {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  margin: 0;
}
.kk-contact__card--cta .kk-contact__card-h { color: #fff; }
.kk-contact__card-sub {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-muted);
  flex: 1;
  max-width: 380px;
}
.kk-contact__card--cta .kk-contact__card-sub { color: rgba(255,255,255,0.82); }
.kk-contact__card-cta {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--link);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.kk-contact__card--cta .kk-contact__card-cta { color: #fff; }
.kk-contact__card .kk-arrow { transition: transform var(--dur-base) var(--ease-out); }
.kk-contact__card:hover .kk-arrow { transform: translateX(3px); }

/* ---------- Footer ---------- */
.kk-footer {
  border-top: 1px solid var(--rule);
  padding: 32px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--fg-muted);
}
.kk-footer__logo { justify-self: start; display: inline-flex; }
.kk-footer__logo img { height: 18px; }
.kk-footer__nav {
  justify-self: center;
  display: flex;
  gap: 36px;
}
.kk-footer__nav a {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--dur-base) var(--ease-std), border-color var(--dur-base) var(--ease-std);
}
.kk-footer__nav a:hover { color: var(--link); border-bottom-color: var(--link); }
.kk-footer__copy { justify-self: end; text-transform: uppercase; }

/* ---------- Responsive trims ---------- */
@media (max-width: 1100px) {
  .kk-trust { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .kk-building { grid-template-columns: 1fr; }
  .kk-pillars { grid-template-columns: 1fr; }
  .kk-about__grid { gap: 48px; }
  .kk-offscreen__main { padding: 40px; }
  .kk-nav__center { display: none; }
  .kk-worktable__blurb { padding-left: 24px; }
  .kk-timeline-item { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .kk-contact__grid { grid-template-columns: 1fr; }
  .kk-footer { grid-template-columns: 1fr; justify-items: center; row-gap: 20px; text-align: center; }
  .kk-footer__logo, .kk-footer__copy { justify-self: center; }
}

/* ---------- Tablet (≤768) ---------- */
@media (max-width: 768px) {
  /* Hero headline must scale down AND wrap — the desktop nowrap would
     overflow the viewport on narrow screens. */
  .kk-hero { padding: 132px 0 48px; }
  .kk-hero__stack {
    font-size: clamp(32px, 6.4vw, 46px);
    line-height: 1.08;
    text-wrap: balance;
    white-space: normal;
  }
  .kk-hero__eyebrow { margin: 22px 0 28px; }
  .kk-hero__sub { font-size: 18px; margin-bottom: 36px; }

  .kk-section { padding: 56px 0; }
  .kk-section__head { margin-bottom: 32px; }
  .kk-work-sec, .kk-timeline-sec, .kk-contact-sec { padding: 48px 0; }

  .kk-trust { padding: 40px 0 48px; column-gap: 24px; row-gap: 40px; }
  .kk-trust__num { font-size: 44px; }

  .kk-offscreen__main { padding: 36px 28px; }
  .kk-offscreen__title { font-size: 34px; }

  .kk-final { padding: 64px 0; }
  .kk-final__title { font-size: clamp(44px, 11vw, 72px); }
  .kk-final__body { font-size: 18px; }
}

/* ---------- Small (≤640): restack work table, stack form ---------- */
@media (max-width: 640px) {
  /* The 4-column work table is re-laid-out as icon + (name/stat) + blurb
     so every game stays readable without horizontal scroll. */
  .kk-worktable tbody { display: block; }
  .kk-worktable__row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon name stat"
      "icon blurb blurb";
    column-gap: 16px;
    row-gap: 8px;
    padding: 20px 0;
    align-items: center;
  }
  .kk-worktable__icon { grid-area: icon; width: 52px; padding: 0; }
  .kk-worktable__name {
    grid-area: name; width: auto; white-space: normal;
    padding: 0; align-self: center;
  }
  .kk-worktable__stat {
    grid-area: stat; text-align: right; padding: 0; align-self: center;
  }
  .kk-worktable__blurb { grid-area: blurb; padding: 0; }

  /* Newsletter form goes full width and stacks input over button. */
  .kk-offscreen__form { flex-direction: column; max-width: none; gap: 12px; }
  .kk-offscreen__input { width: 100%; }
  .kk-offscreen__form .kk-btn { justify-content: center; width: 100%; }

  .kk-contact__card { padding: 28px 24px; min-height: 0; }
}

/* ---------- Phone (≤480) ---------- */
@media (max-width: 480px) {
  :root { --gutter: 20px; }

  .kk-hero { padding: 116px 0 40px; }
  .kk-hero__stack { font-size: clamp(26px, 7.6vw, 34px); }
  .kk-hero__sub { font-size: 16px; }

  .kk-section__title { font-size: clamp(30px, 8.4vw, 40px); }

  /* Trust bar holds its 2×2 grid (from the 1100 query); just tighten. */
  .kk-trust { column-gap: 16px; row-gap: 32px; }
  .kk-trust__num { font-size: 38px; }
  .kk-trust__lbl { font-size: 13px; }

  .kk-nav__inner { padding: 16px var(--gutter); }
  .kk-nav__cta { font-size: 12px; padding: 9px 14px; }

  .kk-build-card, .kk-pillar { padding: 28px 24px; }
  .kk-build-card__title, .kk-pillar__title, .kk-contact__card-h { font-size: 28px; }

  .kk-offscreen__main { padding: 28px 20px; }
  .kk-offscreen__title { font-size: 30px; }

  .kk-final__title { font-size: clamp(38px, 13vw, 56px); }
}
