/* GitBob — gitbob.app
   Dark-only by design: the site mirrors the app, which ships a single dark theme today. */

:root {
  --bg: #0f1115;
  --panel: #161920;
  --raised: #1c2029;
  --line: #262b36;
  --text: #d7dce5;
  --muted: #8b93a3;
  --strong: #f3f5f9;
  --cyan: #3ee0f5;
  --violet: #b46cff;
  --lane-yellow: #e9b949;
  --lane-green: #8fd18f;
  --lane-pink: #df7ad6;
  --danger: #f08a7e;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --lane-space: 30px;   /* distance from lane to content */
  --lane-x: 6px;        /* lane position inside the gutter-padded box */
  --node: 12px;

  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --lane-space: 64px; --lane-x: 10px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--strong); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--strong); color: var(--bg); padding: 8px 14px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

h1, h2, h3 {
  font-family: var(--display);
  color: var(--strong);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

p { margin: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(15 17 21 / 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--strong); text-decoration: none;
  font: 700 1.25rem/1 var(--display); letter-spacing: -0.01em;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 0.9375rem;
}
.nav-links a:hover { color: var(--strong); background: var(--panel); }
.nav-links .nav-cta {
  color: var(--strong); border: 1px solid var(--line); background: var(--panel);
}
.nav-links .nav-cta:hover { border-color: #3a4150; }

@media (max-width: 719px) {
  .nav-links li:not(:last-child) { display: none; }
}

/* ---------- The lane ----------
   The page is laid out like a commit graph: one lane runs from the hero (HEAD)
   to the bottom, every section is a commit on it, and the roadmap is a branch
   that has not been merged. */

.lane-host {
  position: relative;
  padding-left: calc(var(--gutter) + var(--lane-space));
  padding-bottom: 96px;
}

.lane-host::before {
  content: "";
  position: absolute;
  top: 120px;
  bottom: 96px;
  left: calc(var(--gutter) + var(--lane-x));
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan) 0%, #7fa6fa 45%, var(--violet) 100%);
  transform-origin: top;
  border-radius: 2px;
}

/* root commit at the bottom of the lane */
.lane-host::after {
  content: "";
  position: absolute;
  bottom: 90px;
  left: calc(var(--gutter) + var(--lane-x) + 1px - var(--node) / 2);
  width: var(--node); height: var(--node);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px var(--bg);
}

.commit { position: relative; }

/* the commit node, centred on the lane and aligned with the section heading */
.commit::before {
  content: "";
  position: absolute;
  top: var(--node-top, 0.7em);
  left: calc(-1 * var(--lane-space) + var(--lane-x) + 1px - var(--node) / 2);
  width: var(--node); height: var(--node);
  border-radius: 50%;
  background: var(--node-color, var(--cyan));
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 1;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding-top: 112px;
  --node-top: 118px;
}

/* HEAD: hollow ring, like the app marks the checked-out commit */
.commit--head::before {
  --node: 20px;
  background: var(--bg);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 0 4px var(--bg), 0 0 24px rgb(62 224 245 / 0.45);
}

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.875rem; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 5px 14px 5px 10px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lane-yellow);
  box-shadow: 0 0 0 3px rgb(233 185 73 / 0.18);
}

h1 {
  margin-top: 24px;
  font-size: clamp(2.375rem, 1.3rem + 4.6vw, 4.75rem);
  font-weight: 720;
  line-height: 1.0;
  letter-spacing: -0.028em;
  font-variation-settings: "opsz" 96;
  max-width: 15ch;
}

.lede {
  margin-top: 24px;
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--text);
}

.cta-row {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font: 650 1rem/1 var(--body); text-decoration: none;
}

.btn-primary {
  color: #0b0d12;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  box-shadow: 0 8px 28px -10px rgb(140 140 255 / 0.6);
}
.btn-primary:hover { color: #0b0d12; filter: brightness(1.08); }

.download-soon {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px; border-radius: 10px;
  border: 1px dashed #3a4150;
  color: var(--muted); font-size: 0.9375rem;
  cursor: default;
}
.download-soon strong { color: var(--text); font-weight: 600; }

.fineprint { margin-top: 16px; font-size: 0.875rem; color: var(--muted); }

.mascot {
  width: 280px;
  margin-bottom: -56px;          /* Bob sits on top of the window */
  position: relative; z-index: 2;
  filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.5));
}

/* ---------- Window frames ---------- */

.window {
  display: block;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.window-bar {
  display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem; color: var(--muted);
}
.window-bar i {
  width: 10px; height: 10px; border-radius: 50%; background: #343a47;
}
.window-bar span { margin-left: auto; margin-right: auto; padding-right: 51px; }

.hero-shot {
  position: relative;
  margin-top: 24px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.02),
    0 40px 80px -30px rgb(0 0 0 / 0.8),
    0 0 120px -40px rgb(62 224 245 / 0.35),
    40px 0 140px -60px rgb(180 108 255 / 0.4);
}

a.window { transition: border-color 0.2s; }
a.window:hover { border-color: #3a4150; }
a.window:focus-visible { border-radius: 12px; }

/* ---------- Highlights ---------- */

.highlights-section { margin-top: 96px; --node-color: #5cd3f7; --node-top: 4px; }

.highlights {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.highlights li {
  padding: 28px 28px 8px 0;
}
.highlights li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.highlights svg {
  width: 26px; height: 26px; margin-bottom: 16px;
  fill: none; stroke: var(--cyan); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.highlights li:nth-child(2) svg { stroke: #7fb8fa; }
.highlights li:nth-child(3) svg { stroke: #9a8ffc; }
.highlights li:nth-child(4) svg { stroke: var(--violet); }
.highlights p { margin-top: 8px; color: var(--muted); font-size: 0.975rem; }

@media (max-width: 1000px) {
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlights li:nth-child(3) { padding-left: 0; border-left: 0; }
  .highlights li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
}
@media (max-width: 560px) {
  .highlights { grid-template-columns: 1fr; }
  .highlights li, .highlights li + li { padding: 22px 0 6px; border-left: 0; }
  .highlights li + li { border-top: 1px solid var(--line); margin-top: 16px; }
}

/* ---------- Feature sections ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  margin-top: 144px;
  --node-top: 0;
}
.feature .feature-text { position: relative; }

/* the node should line up with the heading, not the vertically centred block */
.feature::before { display: none; }
.feature-text::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: calc(-1 * var(--lane-space) + var(--lane-x) + 1px - var(--node) / 2);
  width: var(--node); height: var(--node);
  border-radius: 50%;
  background: var(--node-color, var(--cyan));
  box-shadow: 0 0 0 4px var(--bg);
}
#features .feature:nth-child(1) { --node-color: #79bdf9; }
#features .feature:nth-child(2) { --node-color: #8aa8fb; }
#features .feature:nth-child(3) { --node-color: #9a95fc; }

.feature--flip .feature-text { order: 2; }
.feature--flip .feature-shot { order: 1; }
/* when flipped, the text column is on the right, so the node is drawn from the section */
.feature--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature--flip .feature-text::before { display: none; }
.feature--flip::before {
  display: block;
  top: 50%;
  margin-top: -6px;
}
.feature--flip { --node-color: #8aa8fb; }

.feature-text > p { margin-top: 16px; color: var(--text); max-width: 52ch; }

.ticks {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: 10px;
  color: var(--muted); font-size: 0.975rem;
}
.ticks li {
  position: relative; padding-left: 26px;
}
.ticks li::before {
  content: "";
  position: absolute; left: 2px; top: 0.5em;
  width: 10px; height: 6px;
  border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(-45deg);
}

.feature-shot {
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.75);
}

@media (max-width: 900px) {
  .feature, .feature--flip {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 112px;
  }
  .feature--flip .feature-text { order: 0; }
  .feature--flip .feature-shot { order: 0; }
  .feature--flip::before { display: none; }
  .feature--flip .feature-text::before { display: block; }
}

/* ---------- Real Git ---------- */

.real-git { margin-top: 160px; --node-color: #a68af9; --node-top: 0.8em; }

.rg-intro p { margin-top: 16px; max-width: 62ch; }

.cmd-table {
  width: 100%;
  margin-top: 40px;
  border-collapse: collapse;
  font-size: 0.975rem;
}
.cmd-table thead th {
  text-align: left; font-weight: 500;
  color: var(--muted); font-size: 0.875rem;
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--line);
}
.cmd-table tbody th {
  text-align: left; vertical-align: top;
  font-weight: 600; color: var(--strong);
  width: 30%;
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--line);
}
.cmd-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.cmd-table code {
  display: inline-block;
  font: 500 0.9rem/1.4 var(--mono);
  color: var(--cyan);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  margin-right: 12px;
  overflow-wrap: anywhere;
}
.cmd-table td span { display: inline-block; padding-top: 3px; }

@media (max-width: 640px) {
  .cmd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cmd-table, .cmd-table tbody, .cmd-table tr, .cmd-table th, .cmd-table td { display: block; width: auto; }
  .cmd-table tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .cmd-table tbody th, .cmd-table td { border: 0; padding: 0; }
  .cmd-table td { margin-top: 8px; }
  .cmd-table td span { display: block; margin-top: 6px; }
}

.trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
}
.trust > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.trust p { margin-top: 10px; color: var(--muted); }

@media (max-width: 760px) {
  .trust { grid-template-columns: 1fr; }
  .trust > div { padding: 22px; }
}

/* ---------- Roadmap: an unmerged branch ---------- */

.roadmap { margin-top: 160px; --node-color: #ae7bfb; --node-top: 0.6em; }
.rm-lede { margin-top: 12px; color: var(--muted); }

.branch {
  position: relative;
  margin-top: 40px;
  --branch-x: 18px;
}

/* curve leaving the main lane */
.fork {
  position: absolute;
  top: -22px;
  left: calc(-1 * var(--lane-space) + var(--lane-x) + 1px);
  width: calc(var(--lane-space) - var(--lane-x) - 1px + var(--branch-x) + 1px);
  height: 30px;
  border-top: 2px solid var(--violet);
  border-right: 2px solid var(--violet);
  border-top-right-radius: 16px;
}

/* the dashed, not-yet-merged lane */
.branch::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 14px;
  left: var(--branch-x);
  border-left: 2px dashed rgb(180 108 255 / 0.7);
}

.rm-list {
  list-style: none; margin: 0;
  padding: 8px 0 0 calc(var(--branch-x) + 30px);
  display: grid; gap: 4px;
  max-width: 68ch;
}
.rm-list li {
  position: relative;
  padding: 7px 0;
  color: var(--text);
}
.rm-list li::before {
  content: "";
  position: absolute;
  top: calc(7px + 0.8em - 6px);
  left: -33px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
}

/* ---------- Get started ---------- */

.get-started { margin-top: 160px; --node-color: var(--violet); --node-top: 0.6em; }
.gs-lede { margin-top: 16px; max-width: 62ch; }

.steps {
  list-style: none; margin: 40px 0 0; padding: 0;
  counter-reset: step;
  display: grid; gap: 28px;
  max-width: 720px;
}
.steps { grid-template-columns: minmax(0, 1fr); }
.steps li { counter-increment: step; min-width: 0; }
.steps li > p {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; color: var(--strong);
}
.steps li > p::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel);
  font: 600 0.875rem/1 var(--display); color: var(--cyan);
  flex: none;
}

.code {
  position: relative;
  margin-top: 12px;
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.code pre {
  margin: 0;
  padding: 16px 92px 16px 18px;
  overflow-x: auto;
  font: 0.9375rem/1.6 var(--mono);
  color: var(--text);
}
.copy {
  position: absolute; top: 10px; right: 10px;
  min-width: 68px; height: 32px; padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  font: 500 0.8125rem/1 var(--body);
  cursor: pointer;
}
.copy:hover { border-color: #3a4150; color: var(--strong); }
.copy[data-state="done"] { color: var(--lane-green); border-color: rgb(143 209 143 / 0.4); }

.gs-note { margin-top: 32px; color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding-block: 28px;
  color: var(--muted); font-size: 0.9rem;
}
.footer-inner p:last-child { margin-left: auto; }
.footer-inner a { color: var(--text); text-decoration: none; }
.footer-inner a:hover { color: var(--strong); text-decoration: underline; }

/* ---------- Mobile hero ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; --node-top: 62px; }
  .mascot { width: 150px; justify-self: end; margin: -8px 8px -34px 0; }
}

@media (max-width: 719px) {
  .lane-host::before { top: 64px; }
  .highlights-section { margin-top: 72px; }
  .real-git, .roadmap, .get-started { margin-top: 120px; }
  .window-bar { height: 22px; padding: 0 9px; gap: 5px; }
  .window-bar i { width: 7px; height: 7px; }
  .window-bar span { display: none; }
  .hero-shot, .window { border-radius: 8px; }
}

/* ---------- One orchestrated entrance: the lane draws down from HEAD ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .lane-host::before { animation: lane-draw 1.4s cubic-bezier(.2,.7,.2,1) both; }
  html.js .hero-shot { animation: rise 0.9s 0.15s cubic-bezier(.2,.7,.2,1) both; }
  html.js .mascot { animation: hop 0.7s 0.55s cubic-bezier(.3,1.4,.5,1) both; }

  @keyframes lane-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes hop { from { opacity: 0; transform: translateY(20px) scale(.92); } to { opacity: 1; transform: none; } }
}

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

.footer-links { display: flex; gap: 20px; }

@media (max-width: 640px) {
  .cmd-table tbody th { width: auto; }
  .code { display: flex; flex-direction: column; }
  .code .copy { position: static; order: -1; align-self: flex-end; margin: 8px 8px 0 0; }
  .code pre { padding: 4px 16px 14px; font-size: 0.8125rem; }
}
