@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ground: #f3ebe6;
  --ink: #161413;
  --soft: rgb(22 20 19 / 52%);
  --faint: rgb(22 20 19 / 14%);
  --pad: clamp(20px, 3.4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* one screen, nothing scrolls */
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  color: var(--ink);
  font: 400 16px/1.5 "Instrument Sans", system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

p,
h1,
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- bars ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.2vw, 44px) var(--pad);
}

.wordmark {
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.wordmark span {
  font-weight: 400;
}

.tabs {
  display: flex;
  gap: clamp(20px, 3.4vw, 52px);
}

.tabs a,
.foot-links a,
.actions a,
.actions button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--soft);
  transition: color 0.2s ease;
}

.tabs a {
  font-size: clamp(15px, 1.15vw, 17px);
}

.tabs a:hover,
.tabs a[aria-current="page"],
.foot-links a:hover,
.foot-links a[aria-current="page"],
.actions a:hover,
.actions button:hover {
  color: var(--ink);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--faint);
  border-radius: 5px;
  color: var(--soft);
  font: 500 11px/1 "Instrument Sans", system-ui, sans-serif;
  letter-spacing: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

[aria-current="page"] kbd,
kbd.pressed {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ground);
}

.foot {
  color: var(--soft);
  font-size: 13px;
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.esc {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body:has(.panel:target) .esc {
  opacity: 1;
}

/* ---------- stage: one panel at a time ---------- */
.stage {
  position: relative;
  min-height: 0;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 var(--pad);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), visibility 0s 0.35s;
}

.panel:target,
.stage:not(:has(.panel:target)) .home {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s var(--ease) 0.1s, transform 0.7s var(--ease) 0.1s, visibility 0s;
}

.mark {
  width: clamp(104px, 10vw, 150px);
  height: auto;
  fill: var(--ink);
}

/* products, research, blog */
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px);
  width: min(1040px, 100%);
}

.col-h {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 400;
}

.list {
  width: min(560px, 100%);
  margin: 0;
  list-style: none;
}

.columns .list {
  width: 100%;
}

.list .empty {
  display: grid;
  padding: 22px 0;
}

.list .empty .name {
  color: var(--soft);
}

.entries .empty {
  grid-template-columns: 1fr auto;
  align-items: baseline;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.meta {
  color: var(--soft);
  font-size: 14px;
}

.list li + li {
  border-top: 1px solid var(--faint);
}

.list a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name key" "desc key";
  align-items: center;
  column-gap: 24px;
  padding: 22px 0;
}

.name {
  grid-area: name;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.desc {
  grid-area: desc;
  color: var(--soft);
  transition: color 0.2s ease;
}

.list kbd {
  grid-area: key;
}

.list a:hover .desc {
  color: var(--ink);
}

/* about, privacy */
.lede {
  max-width: 15em;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

.lede.small {
  max-width: 18em;
}

.note {
  max-width: 34em;
  color: var(--soft);
  font-size: 15px;
  text-align: center;
  text-wrap: pretty;
}

.facts {
  display: flex;
  gap: clamp(32px, 5vw, 72px);
  text-align: center;
}

.facts dt {
  color: var(--soft);
  font-size: 13px;
}

/* contact */
.email {
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.actions {
  display: flex;
  gap: 32px;
  font-size: 15px;
}

/* ---------- touch: no keyboard, so no hints ---------- */
@media (hover: none) {
  kbd,
  .esc {
    display: none;
  }

  .tabs a[aria-current="page"] {
    text-decoration: underline 1px;
    text-underline-offset: 6px;
  }
}

@media (max-width: 760px) {
  .columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .list a,
  .list .empty {
    padding: 14px 0;
  }
}

@media (max-width: 640px) {
  header.bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .tabs {
    gap: 18px;
    flex-wrap: wrap;
  }

  .facts {
    flex-direction: column;
    gap: 16px;
  }

  .foot {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel:target,
  .stage:not(:has(.panel:target)) .home {
    transform: none;
    transition: none;
  }
}

.list .empty > * {
  grid-area: auto;
}
