/* BobFix site. Colours are sampled from the logo. */
:root {
  --ink: #0a1c3c;          /* "bob" in the wordmark */
  --slate: #44546c;        /* the tagline */
  --paper: #f5f7fc;
  --surface: #ffffff;
  --line: #dce2ef;
  --blue: #1386f9;         /* top of the "F" */
  --indigo: #3c59f5;       /* middle of the "F" */
  --violet: #7820f0;       /* foot of the "x" */
  --visor: #0c2040;        /* the robot's visor */
  --visor-2: #142a52;
  --visor-line: #26407a;
  --eye: #45b8ff;
  --on-visor: #e8eeff;
  --on-visor-soft: #a4b5da;
  --ok: #5fe0a6;
  --bad: #ff9e63;

  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --text: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: #9aa8c7 var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  caret-color: var(--indigo);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--indigo); color: #fff; }

img, svg { display: block; }

a {
  color: var(--indigo);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--violet); }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #e8edf8;
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

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

h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */

.site-header { padding: 22px 0; }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img:first-child { width: 36px; height: auto; }
.brand img:last-child { width: 104px; height: auto; }

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
}
nav a {
  color: var(--slate);
  text-decoration: none;
}
nav a:hover { color: var(--ink); }
.nav-gh {
  color: var(--ink);
  border: 1.5px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
}
.nav-gh:hover { border-color: var(--indigo); color: var(--indigo); }

/* Hero */

/* clip, not hidden: the logo ring may bleed past the viewport edge without creating a scroll container */
.hero { padding: 56px 0 104px; overflow-x: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lede {
  margin-top: 28px;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--slate);
}
.lede strong {
  color: var(--ink);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(60, 89, 245, 0.7);
}
.btn-primary:hover {
  background: #2f47d6;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(60, 89, 245, 0.8);
}
.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.fineprint {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--slate);
}

/* The visor: the live demo */

.visor-wrap { position: relative; }

.ring {
  position: absolute;
  width: 136%;
  left: -18%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.9;
  pointer-events: none;
}

.visor {
  position: relative;
  margin: 0;
  background: var(--visor);
  color: var(--on-visor);
  border-radius: 34px;
  padding: 26px;
  box-shadow: 0 40px 70px -30px rgba(12, 32, 64, 0.55), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
}

.visor-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.visor-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--on-visor);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #081733;
  border-radius: 12px;
  width: fit-content;
}
.seg button {
  font: 500 0.9rem var(--text);
  color: var(--on-visor-soft);
  background: transparent;
  border: 0;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.seg button:hover { color: var(--on-visor); }
.seg button[aria-checked="true"] {
  background: var(--visor-2);
  color: #fff;
  box-shadow: 0 0 0 1px var(--visor-line) inset;
}
.seg button:focus-visible { outline-color: var(--eye); }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.tab {
  background: var(--visor-2);
  border-radius: 18px;
  padding: 18px;
  min-height: 212px;
  display: flex;
  flex-direction: column;
}

.tab-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--eye);
}

.calls {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.calls li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(8, 23, 51, 0.6);
  animation: arrive 0.5s var(--ease-out) both;
}
.calls .path { color: var(--on-visor-soft); }
.status {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.status.wait { color: var(--on-visor-soft); }

.session {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.session.ok { color: var(--ok); }
.session.bad { color: var(--bad); }
.session svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.session:not(:empty) { animation: arrive 0.5s var(--ease-out) both; }

.visor-foot { margin-top: 18px; }

.explain {
  color: var(--on-visor-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  min-height: 4.65em;
}

.verdict-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--visor-line);
}

.verdict {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--on-visor);
}
.verdict .ok { color: var(--ok); }
.verdict .bad { color: var(--bad); }

.replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 0.9rem var(--text);
  color: var(--on-visor);
  background: transparent;
  border: 1px solid var(--visor-line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.replay:hover { border-color: var(--eye); background: rgba(69, 184, 255, 0.08); }
.replay:focus-visible { outline-color: var(--eye); }
.replay svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(6px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* How it works */

.how {
  background: var(--surface);
  padding: 112px 0;
  border-block: 1px solid var(--line);
}

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
}

.how-intro p {
  margin-top: 22px;
  max-width: 30rem;
  color: var(--slate);
  font-size: 1.1rem;
}

.run {
  list-style: none;
  margin: 0;
  padding: 0 0 0 34px;
  position: relative;
  counter-reset: step;
}
.run::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--violet));
  border-radius: 2px;
}
.run > li { position: relative; }
.run > li + li { margin-top: 28px; }
.run > li:not(.run-mode) { counter-increment: step; }
.run > li:not(.run-mode)::before {
  content: counter(step);
  position: absolute;
  left: -34px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--indigo);
  color: var(--indigo);
  font: 700 0.7rem/16px var(--display);
  text-align: center;
}
.run h3 + p {
  margin-top: 6px;
  color: var(--slate);
  max-width: 38rem;
}
.run-mode {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--on-visor);
  background: var(--visor);
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  margin-left: -34px;
  font-variant-ligatures: none;
}
.run > .run-mode:not(:first-child) { margin-top: 44px; }

/* Install */

.install { padding: 112px 0; }

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}

.path h3 { font-size: 1.35rem; }
.path > p {
  margin-top: 12px;
  color: var(--slate);
}

.path-alt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
}
.path-alt .cmd { margin-top: 20px; }

.steps {
  list-style: none;
  counter-reset: s;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 48px;
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: 700 0.95rem/32px var(--display);
  text-align: center;
}
.steps li > * + * { margin-top: 12px; }

.note {
  font-size: 0.93rem;
  color: var(--slate);
}

.cmd {
  position: relative;
  background: var(--visor);
  border-radius: var(--radius);
}
.cmd pre {
  margin: 0;
  padding: 46px 18px 16px;
  overflow-x: auto;
  scrollbar-color: var(--visor-line) transparent;
}
.cmd code {
  background: none;
  padding: 0;
  color: var(--on-visor);
  font-size: 0.88rem;
  line-height: 1.7;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font: 600 0.8rem var(--text);
  color: var(--on-visor);
  background: var(--visor-2);
  border: 1px solid var(--visor-line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}
.copy:hover { border-color: var(--eye); }
.copy:focus-visible { outline-color: var(--eye); }
.copy.done { color: var(--ok); border-color: var(--ok); }

/* Use it */

.use {
  background: var(--surface);
  padding: 112px 0;
  border-block: 1px solid var(--line);
}

.use-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.prompt {
  margin-top: 24px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--paper);
}
.prompt + .prompt { margin-top: 14px; }
.prompt-mode {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--indigo);
}
.prompt-text {
  margin-top: 6px;
  font-size: 1.1rem;
  color: var(--ink);
}

.use-note {
  margin-top: 24px;
  color: var(--slate);
  max-width: 32rem;
}

.tree-title { margin-top: 14px; }

.tree {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 20px;
  margin: 22px 0 0;
  font-size: 0.95rem;
}
.tree dt,
.tree dd {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.tree dt {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 600;
}
.tree dt:not(:first-of-type) { padding-left: 18px; }
.tree dd { color: var(--slate); }
.tree dt:last-of-type,
.tree dd:last-of-type { border-bottom: 0; }
.tree dt:last-of-type { color: var(--indigo); }

/* Proof */

.proof {
  background: var(--visor);
  color: var(--on-visor);
  padding: 112px 0;
}
.proof h2 { color: #fff; }

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

.checks {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 1.15rem;
}
.checks li {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.checks li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  transform: translateY(3px);
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.refuse {
  margin-top: 30px;
  color: var(--on-visor-soft);
  max-width: 32rem;
}
.proof code {
  background: var(--visor-2);
  color: var(--on-visor);
}

.term {
  margin: 0;
  background: #071530;
  border: 1px solid var(--visor-line);
  border-radius: 20px;
  padding: 26px 28px;
  overflow-x: auto;
  scrollbar-color: var(--visor-line) transparent;
}
.term code {
  background: none;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--on-visor);
  font-variant-numeric: tabular-nums;
}
.t-dim { color: #7d8fb8; }
.t-ok { color: var(--ok); }
.t-strong { font-weight: 600; }

/* Footer */

.site-footer { padding: 40px 0 48px; }

.footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--slate);
  font-size: 0.93rem;
}
.footer-row img { width: 80px; height: auto; }
.footer-row a { margin-left: auto; }

/* Narrow screens */

@media (max-width: 960px) {
  .hero-grid,
  .how-grid,
  .install-grid,
  .use-grid,
  .proof-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .hero { padding-top: 32px; }
  .ring { width: 116%; left: -8%; }
}

@media (max-width: 640px) {
  nav a:not(.nav-gh) { display: none; }
  .hero, .how, .install, .use, .proof { padding-block: 72px; }
  .visor { padding: 18px; border-radius: 26px; }
  .tabs { grid-template-columns: 1fr; }
  .seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .seg button { font-size: 0.82rem; padding: 8px 6px; line-height: 1.25; }
  .tab { min-height: 0; }
  .path-alt { padding: 22px; }
  .footer-row a { margin-left: 0; }
}

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