/* Shared by every landing page. Each page defines its own palette and fonts through
   these tokens: --bg --fg --muted --line --accent --surface --sans --mono --display. */

@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
/* full JetBrains Mono (with box drawing and arrows) for terminal replays */
@font-face { font-family: "JetBrains Mono Term"; src: url("fonts/jetbrains-mono-term.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono Term"; src: url("fonts/jetbrains-mono-term-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Departure Mono"; src: url("fonts/departure-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
kbd, code, pre { font-family: var(--mono); }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 56px; display: flex; align-items: center; gap: 20px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.nav__brand img { width: 26px; height: 26px; }
.nav__links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--fg); }
.nav__links .nav__cta {
  color: var(--accent-ink, #fff); background: var(--accent);
  padding: 6px 14px; border-radius: 99px; font-weight: 500;
}
.nav__links .nav__cta:hover { color: var(--accent-ink, #fff); filter: brightness(1.08); }
@media (max-width: 640px) { .nav__links .hide-sm { display: none; } }

/* ---------- install command ---------- */
.cmd {
  display: flex; align-items: center; gap: 4px;
  max-width: 100%;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font: 400 13.5px/1.5 var(--mono);
}
.cmd__text { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 6px 0; }
.cmd__text::-webkit-scrollbar { display: none; }
.cmd__text .p { color: var(--muted); user-select: none; margin-right: .6ch; }
.copy {
  flex: none; position: relative;
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.copy:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }
.copy svg { width: 16px; height: 16px; grid-area: 1 / 1; transition: opacity .2s, transform .25s; }
.copy .ok { opacity: 0; transform: scale(.6); color: var(--ok, #28a745); }
.copy.done .ok { opacity: 1; transform: none; }
.copy.done .cp { opacity: 0; transform: scale(.6); }
.cmd-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.cmd-note a { color: var(--fg); text-underline-offset: 3px; }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- family footer ---------- */
.foot { margin-top: 120px; border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.foot__fam { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 40px; }
.foot__fam h2 { grid-column: 1 / -1; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; color: var(--muted); }
.fam {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.fam:hover { border-color: color-mix(in srgb, var(--fg) 25%, transparent); transform: translateY(-1px); }
.fam[aria-current="page"] { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.fam img { width: 36px; height: 36px; flex: none; }
.fam b { display: block; color: var(--fg); font-weight: 600; font-size: 14px; line-height: 1.3; }
.fam span { display: block; font-size: 12.5px; line-height: 1.35; }
.foot__row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot__row a { text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.foot__row a:hover { color: var(--fg); }
@media (max-width: 860px) { .foot__fam { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot__fam { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .rv { opacity: 1; transform: none; }
}
