/* The Kindex design language, as decided on the design canvas: one monospace typeface, square corners,
   no brand color, the name as the mark, and robots drawn in dots. The values are copied from the canvas's
   tokens.css, so a change there must be repeated here. */
:root {
  --ui: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --head-weight: 500;
  --head-track: -0.03em;

  /* An arrival takes its time. Blocks of one group arrive in reading order, this far apart. */
  --ease-arrive: cubic-bezier(0.25, 0.8, 0.25, 1);
  --time-arrive: 520ms;
  --stagger: 50ms;

  /* Light theme. Graphite with black ink. */
  --ground: #c9c9c6;
  --line: #a8a8a5;
  --ink: #0c0c0c;
  --ink-soft: #262624;
  --quiet: #585855;

  --gutter: clamp(20px, 4vw, 48px);
  --page-width: 1080px;
  --robot-width: 340px;
  --robot-width-small: 220px;
  /* The robot drawing is 30 dots wide and 40 dots tall. */
  --robot-ratio: 30 / 40;

  color-scheme: light dark;
}

/* Dark theme. White on near-black. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0d0b;
    --line: #232a24;
    --ink: #e9efe8;
    --ink-soft: #cfd6ce;
    --quiet: #7b867c;
  }
}

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

html { background: var(--ground); }

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  background: var(--ground);
  color: var(--ink);
  font: 14.5px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

.bar { padding: var(--gutter) 0; }

.mark {
  color: inherit;
  font-size: 17px;
  font-weight: var(--head-weight);
  letter-spacing: var(--head-track);
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: var(--gutter);
  padding: var(--gutter) 0;
}

.pitch h1 {
  margin: 0 0 24px;
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: var(--head-weight);
  line-height: 1.08;
  letter-spacing: var(--head-track);
  text-wrap: balance;
}

.pitch p {
  max-width: 48ch;
  margin: 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* The drawing is a mask, so its dots take the ink color of whichever theme is showing. */
.robot {
  justify-self: center;
  width: min(100%, var(--robot-width));
  aspect-ratio: var(--robot-ratio);
  background: var(--ink);
  -webkit-mask: url("robot.svg") center / contain no-repeat;
  mask: url("robot.svg") center / contain no-repeat;
}

.foot {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 12.5px;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .robot { order: -1; justify-self: start; width: var(--robot-width-small); }
}

@media (prefers-reduced-motion: no-preference) {
  .mark, .pitch h1, .pitch p, .robot, .foot {
    animation: arrive var(--time-arrive) var(--ease-arrive) both;
  }
  .pitch h1 { animation-delay: var(--stagger); }
  .pitch p { animation-delay: calc(2 * var(--stagger)); }
  .robot { animation-delay: calc(3 * var(--stagger)); }
  .foot { animation-delay: calc(4 * var(--stagger)); }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
}
