:root {
  color-scheme: light;
  --ink: #191a17;
  --muted: #66675f;
  --paper: #f5f2eb;
  --line: #d8d4ca;
  --acid: #d7ff45;
  --blue: #4c6fff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 100%;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 20rem;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
}
.skip-link:focus {
  top: 1rem;
}
:focus-visible {
  outline: 0.2rem solid var(--blue);
  outline-offset: 0.2rem;
}

.site-header,
footer {
  max-width: 80rem;
  margin: auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font:
    800 1.4rem / 1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  text-decoration: none;
  letter-spacing: -0.08em;
}
nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
nav a {
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}
nav a:hover {
  text-decoration: underline;
}
.nav-github {
  border: 1px solid var(--ink);
  padding: 0.65rem 1rem;
}

main > section {
  max-width: 80rem;
  margin: auto;
  padding: clamp(4.5rem, 9vw, 8rem) 2rem;
  border-bottom: 1px solid var(--line);
}
.hero {
  min-height: 43rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}
.eyebrow {
  margin: 0 0 1.4rem;
  font:
    700 0.75rem / 1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1,
h2 {
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin: 0;
}
h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
}
h1 em {
  font-style: normal;
  color: var(--blue);
}
.lede {
  max-width: 38rem;
  margin: 2rem 0;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.button:hover {
  transform: translate(-0.15rem, -0.15rem);
  box-shadow: 0.2rem 0.2rem 0 var(--ink);
}
.button.primary {
  background: var(--ink);
  color: white;
}

.token-window {
  max-width: 23rem;
  justify-self: end;
  background: #fff;
  border: 1px solid var(--ink);
  box-shadow: 0.75rem 0.75rem 0 var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transform: rotate(1.2deg);
}
.token-window img {
  display: block;
  width: 100%;
  height: auto;
}
.flow {
  margin: 0 0 2.5rem;
  overflow-x: auto;
}
.flow figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.flow img {
  display: block;
  width: 100%;
  min-width: 40rem;
  height: auto;
  border: 1px solid var(--line);
  background: #fff;
}
.window-bar {
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.85rem;
  border-bottom: 1px solid var(--ink);
  background: #eeece6;
}
.window-bar span {
  width: 0.6rem;
  height: 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.window-bar strong {
  margin-left: auto;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
.token {
  padding: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.token div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: center;
  min-height: 2rem;
}
.label {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
.token code {
  font-size: clamp(0.78rem, 2vw, 0.95rem);
  overflow-wrap: anywhere;
}
.permissions {
  display: flex;
  gap: 0.35rem;
}
.pill {
  padding: 0.18rem 0.45rem;
  background: #ecece7;
  font-size: 0.7rem;
}
.pill.write {
  background: #dbe2ff;
  color: #2946b6;
}
.scope-note {
  padding: 1rem 1.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.scope,
.interfaces {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: clamp(3rem, 9vw, 9rem);
}
h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}
.scope-copy {
  min-width: 0;
}
.scope-copy > p {
  max-width: 40rem;
  margin: 0 0 2.5rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
}

.interfaces {
  background: white;
  max-width: none;
  padding-left: max(2rem, calc((100vw - 76rem) / 2));
  padding-right: max(2rem, calc((100vw - 76rem) / 2));
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.cards article {
  background: white;
  padding: 1.7rem;
  min-height: 19rem;
  display: flex;
  flex-direction: column;
}
.card-number {
  font:
    700 0.75rem / 1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: var(--muted);
}
.cards h3 {
  margin: auto 0 1rem;
  font-size: 1.35rem;
}
.cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.self-host {
  background: var(--ink);
  color: white;
  max-width: none;
  padding-left: max(2rem, calc((100vw - 76rem) / 2));
}
.self-host h2 {
  max-width: 53rem;
}
.self-host > p:not(.eyebrow) {
  max-width: 40rem;
  color: #bfc0b8;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 2rem 0;
}
.button.light {
  color: var(--ink);
  background: var(--acid);
  border-color: var(--acid);
}
.button.light:hover {
  box-shadow: 0.2rem 0.2rem 0 white;
}

footer {
  border: 0;
  min-height: 6rem;
  gap: 1.5rem;
}
.footer-copy {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
footer > a:last-child {
  font-size: 0.85rem;
  font-weight: 700;
}

@media (max-width: 56rem) {
  .hero,
  .scope,
  .interfaces {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 5rem;
  }
  .token-window {
    max-width: 35rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .cards article {
    min-height: 12rem;
  }
}

@media (max-width: 42rem) {
  .site-header {
    padding: 1rem 1.25rem;
  }
  nav a:not(.nav-github) {
    display: none;
  }
  main > section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  footer {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1.5rem 1.25rem;
  }
  .footer-copy {
    flex-basis: 100%;
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition-duration: 0.01ms;
  }
}
