@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.175 0.011 65);
  --bg-sunk: oklch(0.15 0.01 65);
  --surface: oklch(0.215 0.013 65);
  --surface-2: oklch(0.25 0.015 65);
  --line: oklch(0.32 0.016 65);
  --line-soft: oklch(0.27 0.014 65);
  --text: oklch(0.95 0.016 85);
  --muted: oklch(0.77 0.02 80);
  --faint: oklch(0.66 0.02 75);
  --ball: oklch(0.91 0.19 116);
  --ball-deep: oklch(0.82 0.18 116);
  --ball-ink: oklch(0.24 0.05 116);
  --collar: oklch(0.78 0.13 55);
  --radius: 14px;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.82em; }
p code, li code, dd code {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--ball); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ball); color: var(--ball-ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.paw { fill: currentColor; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: oklch(0.175 0.011 65 / 0.88);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em; margin: 0;
}
.brand .paw { width: 26px; height: 26px; color: var(--ball); }
.nav nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px;
  font-weight: 550; font-size: 0.95rem;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-gh {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; margin-left: 6px;
}
.nav-gh svg { width: 17px; height: 17px; }
.nav-gh:hover { border-color: var(--ball); }
.stars {
  font-family: var(--mono); font-size: 0.78em; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text);
}
.stars::before { content: "★ "; color: var(--ball); }

/* type */
.eyebrow {
  margin: 0 0 18px; color: var(--ball); font-weight: 650; font-size: 0.95rem; letter-spacing: 0.01em;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.02; }
h1 { font-size: clamp(3rem, 8.2vw, 7.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 780; text-wrap: balance; }
h3 { font-size: 1.3rem; font-weight: 720; letter-spacing: -0.02em; line-height: 1.2; }

.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -2%; right: -4%; bottom: 0.02em; height: 0.15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13 C 40 4, 70 18, 105 9 S 170 5, 197 11' fill='none' stroke='%23d8ec4c' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* hero */
.hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-paw {
  position: absolute; width: min(56vw, 640px); height: auto; right: -12vw; top: -6vw;
  fill: oklch(0.91 0.19 116 / 0.045); transform: rotate(18deg); pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title title" "lede ctas";
  column-gap: clamp(24px, 5vw, 72px); row-gap: clamp(24px, 3vw, 36px); align-items: end;
}
.hero-grid > div:first-child { grid-area: title; }
.hero-side { display: contents; }
.hero-side .lede { grid-area: lede; margin: 0; }
.hero-side .ctas { grid-area: ctas; }
.lede { margin: 0 0 28px; font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 46ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px;
  padding: 0 22px; border-radius: 999px; text-decoration: none;
  font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-ball { background: var(--ball); color: var(--ball-ink); }
.btn-ball:hover { background: var(--ball-deep); }
.btn-ball .stars { background: oklch(0.24 0.05 116 / 0.14); color: var(--ball-ink); }
.btn-ball .stars::before { color: var(--ball-ink); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

.demo { margin: clamp(40px, 6vw, 72px) 0 0; position: relative; }
.window {
  border-radius: var(--radius); overflow: hidden; background: var(--bg-sunk);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 40px 90px -30px oklch(0.05 0.01 65 / 0.9), 0 0 0 8px oklch(0.91 0.19 116 / 0.05);
}
.window-bar {
  display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--line-soft);
}
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-url {
  margin-left: 12px; font-family: var(--mono); font-size: 0.72rem; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-video { width: 100%; height: auto; aspect-ratio: 1200 / 720; background: var(--bg-sunk); }
.facts {
  list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: 8px 22px; color: var(--muted); font-size: 0.95rem;
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ball); flex: none;
}

/* features */
.features { padding: clamp(64px, 9vw, 120px) 0; background: var(--bg-sunk); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.features h2 { margin-bottom: clamp(36px, 5vw, 60px); }
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "term term term term tg tg"
    "board board server server tg tg"
    "safe safe safe safe phone phone";
}
.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; min-width: 0;
}
.card-text { padding: 26px 26px 20px; }
.card-text p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; max-width: 62ch; }
.card > img {
  margin: auto 0 0 26px; width: calc(100% - 26px); height: auto;
  border-top-left-radius: 10px; border: 1px solid var(--line); border-right: 0; border-bottom: 0;
}
.card > img.img-top { flex: 1 1 auto; height: 0; min-height: 200px; object-fit: cover; object-position: left top; }
.c-term { grid-area: term; }
.c-tg { grid-area: tg; }
.c-board { grid-area: board; }
.c-server { grid-area: server; }
.c-safe { grid-area: safe; }
.c-phone { grid-area: phone; }
.phone-crop {
  margin: auto 26px 0; flex: 1 1 auto; min-height: 360px; position: relative;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; overflow: hidden;
}
.phone-crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-crop-short { min-height: 300px; }

.c-safe { justify-content: space-between; }
.guards { list-style: none; margin: 0; padding: 0 26px; display: grid; gap: 10px; }
.guards li {
  display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 14px 16px; background: var(--bg-sunk); border: 1px solid var(--line-soft); border-radius: 10px;
}
.guards li > code { color: var(--ball); font-size: 0.8rem; }
.guards li span { color: var(--text); font-size: 0.98rem; }
.fine { color: var(--faint); font-size: 0.9rem; margin: 0; }
.c-safe .fine { padding: 18px 26px 24px; }

/* install */
.install { padding: clamp(64px, 9vw, 120px) 0; }
.install h2 { margin-bottom: 32px; }
.cmd {
  display: flex; align-items: stretch; gap: 0;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 6px oklch(0.91 0.19 116 / 0.06);
}
.cmd-line {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; overflow-x: auto; scrollbar-width: thin;
}
.cmd-line code { font-size: clamp(0.8rem, 1.3vw, 0.98rem); white-space: nowrap; color: var(--text); }
.nw { white-space: nowrap; }
.prompt { font-family: var(--mono); color: var(--ball); font-weight: 700; user-select: none; }
.copy {
  flex: none; border: 0; border-left: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 700 0.95rem var(--sans); padding: 0 22px; cursor: pointer; min-width: 92px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.copy:hover { background: var(--surface-2); }
.copy.done { background: var(--ball); color: var(--ball-ink); }
.copy:focus-visible { outline-offset: -4px; }
.req { margin: 14px 0 0; color: var(--muted); font-size: 0.98rem; }

.steps {
  list-style: none; counter-reset: s; margin: 44px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
}
.steps li { counter-increment: s; color: var(--muted); font-size: 1rem; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 50%; border: 1px solid var(--line); font-family: var(--mono); font-size: 0.85rem; color: var(--ball);
}
.steps strong { color: var(--text); font-weight: 700; }

.alt { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line-soft); }
.alt p { margin: 6px 0 18px; color: var(--muted); }
.cmd-sm { box-shadow: none; }
.cmd-sm .cmd-line { padding: 16px 20px; }
.cmd-sm .cmd-line code { font-size: clamp(0.76rem, 1.15vw, 0.9rem); }

.warn {
  display: flex; gap: 14px; align-items: flex-start; margin: 40px 0 0; padding: 16px 18px;
  border: 1px solid oklch(0.78 0.13 55 / 0.45); background: oklch(0.78 0.13 55 / 0.08);
  border-radius: 12px; color: var(--text); font-size: 0.98rem; max-width: 820px;
}
.warn svg { width: 20px; height: 20px; flex: none; color: var(--collar); margin-top: 3px; }
.warn code { white-space: normal; overflow-wrap: anywhere; }

/* compare */
.compare { padding: clamp(64px, 9vw, 112px) 0; background: var(--bg-sunk); border-top: 1px solid var(--line-soft); }
.compare h2 { margin-bottom: 36px; }
.vs { margin: 0; display: grid; }
.vs > div {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--line-soft); align-items: baseline;
}
.vs dt { font-weight: 720; font-size: 1.25rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.vs dd { margin: 0; color: var(--muted); font-size: 1.1rem; }
.vs-us {
  border-top: 0 !important; margin-top: 8px; padding: 24px !important;
  background: var(--surface); border: 1px solid var(--line) !important; border-radius: var(--radius);
}
.vs-us dt { color: var(--ball); }
.vs-us dt .paw { width: 22px; height: 22px; }
.vs-us dd { color: var(--text); }

/* outro */
.outro { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line-soft); }
.outro-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.outro h2 { max-width: none; }

/* footer */
.foot { padding: 36px 0 48px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 0.95rem; }
.foot-in { display: grid; gap: 10px; }
.foot p { margin: 0; }
.foot a { color: var(--text); text-underline-offset: 3px; }
.foot a:hover { color: var(--ball); }
.brand-sm { font-size: 1.05rem; color: var(--text); }
.brand-sm .paw { width: 22px; height: 22px; }

/* responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "title" "lede" "ctas"; align-items: start; }
  .br-lg { display: none; }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "term term" "tg board" "tg server" "safe phone";
  }
  .guards li { grid-template-columns: 1fr; gap: 4px; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li { position: relative; padding-left: 50px; min-height: 34px; }
  .steps li::before { position: absolute; left: 0; top: -4px; margin: 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hide-sm { display: none; }
  .nav-gh { margin-left: 0; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "term" "tg" "board" "server" "safe" "phone"; }
  .card-text { padding: 22px 20px 18px; }
  .card > img { margin-left: 20px; width: calc(100% - 20px); }
  .phone-crop { margin: auto 20px 0; min-height: 420px; }
  .guards { padding: 0 20px; }
  .guards li { grid-template-columns: 1fr; gap: 4px; }
  .c-safe .fine { padding: 16px 20px 22px; }
  .cmd { flex-direction: column; }
  .cmd-line { align-items: flex-start; padding: 18px; }
  .cmd-line code { white-space: normal; overflow-wrap: anywhere; font-size: 0.82rem; line-height: 1.7; }
  .card > img.img-top { flex: none; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .copy { border-left: 0; border-top: 1px solid var(--line); min-height: 46px; }
  .vs > div { grid-template-columns: 1fr; gap: 6px; }
  .vs-us { padding: 20px !important; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .outro .btn { flex: 0 1 auto; }
  .facts { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
