@font-face {
  font-family: 'Lexend';
  src: url('fonts/Lexend.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Clarendon';
  src: url('fonts/LibreClarendonNormal-68Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #fff;
  --ink: #09090b;
  --muted: rgba(0, 0, 0, 0.62);
  --line: rgba(0, 0, 0, 0.12);
  --chip: #f4f4f5;
  --accent: #eda220;
  --badge-bg: #fbecd2;
  --badge-ink: #8e6113;
  --serif: 'Libre Clarendon', Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --pad: clamp(20px, 4vw, 48px);
  --gap: clamp(5rem, 8vw, 9rem);
  --window: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 28px 60px -18px rgba(0, 0, 0, 0.28);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-size: clamp(16px, 0.925vw, 24px);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 'Lexend', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.92em;
}

kbd {
  padding: 0.05rem 0.4rem;
  border: 1px solid #e4e4e7;
  border-radius: 0.5rem;
  background: var(--chip);
  font-size: 0.8em;
  font-weight: 500;
}

.wrap {
  width: 100%;
  max-width: calc(72rem + 2 * var(--pad));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: var(--bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 2.1rem;
  height: auto;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 500;
}

.nav nav a {
  text-decoration: none;
}

.nav nav a:not(.btn):hover {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--chip);
}

.nav .btn {
  height: 2.25rem;
  padding: 0 1rem;
}

.hero {
  padding-top: clamp(3rem, 10vh, 7rem);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.badge span {
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-weight: 600;
  font-size: 0.625rem;
  line-height: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 34ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.6;
  text-wrap: balance;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  height: 2.75rem;
  padding: 0 0.25rem 0 1.125rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.prompt {
  color: var(--muted);
  margin-right: 0.375rem;
}

.copy {
  height: 2.25rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.copy:hover {
  background: #27272a;
}

.req {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

#demo {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #121212;
  box-shadow: var(--window);
}

.player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  height: 1.875rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chapters button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0.875rem 0 0;
  border: 0;
  border-top: 3px solid var(--line);
  background: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.35;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.chapters button::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  height: 3px;
  width: var(--progress, 0%);
  border-radius: 3px;
  background: var(--accent);
}

.chapters button:hover,
.chapters button[aria-current='true'] {
  color: var(--ink);
}

section {
  padding-top: var(--gap);
}

h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
}

h3 {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 1.0625rem;
}

/* hairline grid: the 1px gap shows the background as dividers */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--line);
}

.grid article {
  padding: 2rem;
  background: var(--bg);
}

.grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

#install .cta {
  margin-top: 0;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: var(--gap);
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.footer img {
  width: 1.5rem;
  height: auto;
}

@media (max-width: 900px) {
  .chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .nav nav a:not(.btn) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
