/* Builders n Bots site. System fonts only (no third-party requests), light and dark, mobile first. */
:root {
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --ink: #14172A;
  --muted: #565C74;
  --line: #D9DCEA;
  --field-line: #7F859F;
  --accent: #2B3FD9;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6E9FB;
  --signal: #A05400;
  --signal-soft: #FBEEDA;
  --danger: #B3261E;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F1A; --surface: #161929; --ink: #E8EAF5; --muted: #A0A6C0; --line: #282C44; --field-line: #636B8F;
    --accent: #8E9BFF; --accent-ink: #0D0F1A; --accent-soft: #1D2245;
    --signal: #F0B45C; --signal-soft: #2B2213; --danger: #F2847C; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 12px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 900; line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; }
h3 { font-size: 1.1rem; font-weight: 800; line-height: 1.25; }
p { margin: 0; }
.fine { font-size: 0.85rem; color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 8px; }

header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
.brand { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand i { font-style: normal; color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 500; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--accent); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: 10px; padding: 11px 20px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--field-line); }
.btn.small { padding: 7px 14px; font-size: 0.92rem; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }

.hero .wrap { display: grid; gap: 32px; padding-block: 24px 56px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 48px; padding-block: 44px 72px; } }
.pitch { display: grid; gap: 20px; align-content: start; }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.2rem; line-height: 1.5; max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.proof { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; color: var(--muted); }
.proof b { color: var(--ink); }

/* Assistant panel */
.asst { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; min-width: 0; scroll-margin-top: 16px; }
.asst-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.asst-head h2 { font-size: 1.05rem; letter-spacing: 0; }
.asst-head small { display: block; color: var(--muted); font-size: 0.8rem; font-family: var(--font-body); font-weight: 400; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); flex: none; }
.log { height: clamp(200px, 36dvh, 320px); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.98rem; line-height: 1.45; }
.msg.assistant { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.pending { color: var(--muted); font-style: italic; }
.msg.err { background: var(--signal-soft); color: var(--signal); }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: 0.82rem; padding: 0; text-align: center; }
.chips { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; flex-wrap: nowrap; }
.chips button { flex: none; background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.chips button:disabled { opacity: 0.5; cursor: default; }
.say { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.say input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; }
.asst-note { padding: 0 14px 12px; }
.asst-note:empty { display: none; }

.launch { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 5; box-shadow: 0 6px 20px rgba(20, 23, 42, 0.25); border-radius: 999px; }

section.band { border-top: 1px solid var(--line); padding-block: 52px; }
.sec-top { display: grid; gap: 8px; margin-bottom: 26px; max-width: 62ch; }
.sec-top p { color: var(--muted); }

.pkgs { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.pkg { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: 6px 24px; padding: 18px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.pkg:last-child { border-bottom: 0; }
.pkg p { color: var(--muted); font-size: 0.98rem; }
.pkg .price { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.pkg small { display: block; color: var(--muted); font-family: var(--font-body); font-size: 0.82rem; }
@media (max-width: 700px) { .pkg { grid-template-columns: minmax(0, 1fr); } .pkg .price { text-align: left; } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; }
.steps li { counter-increment: s; display: grid; gap: 4px; align-content: start; }
.steps li::before { content: "0" counter(s); font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; }
.steps p { color: var(--muted); font-size: 0.98rem; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 8px; }
.card p { color: var(--muted); }
dl.faq { margin: 0; display: grid; gap: 14px; }
dl.faq dt { font-weight: 700; }
dl.faq dd { margin: 2px 0 0; color: var(--muted); }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.days button { flex: none; background: var(--surface); border: 1px solid var(--field-line); border-radius: 12px; padding: 8px 14px; cursor: pointer; text-align: center; line-height: 1.25; min-width: 4.6rem; }
.days button b { display: block; font-family: var(--font-display); }
.days button span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.days button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.days button[aria-pressed="true"] span { color: var(--bg); }
.times { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; }
.times button { font-family: var(--font-mono); background: var(--accent-soft); color: var(--accent); border: 2px solid transparent; border-radius: 10px; padding: 10px 18px; cursor: pointer; font-variant-numeric: tabular-nums; }
.times button[aria-pressed="true"] { border-color: var(--accent); }
.times button:disabled { background: var(--bg); color: var(--muted); text-decoration: line-through; cursor: default; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; max-width: 34rem; }
label { display: grid; gap: 5px; font-weight: 700; font-size: 0.92rem; }
label input, label textarea { background: var(--bg); border: 1px solid var(--field-line); border-radius: 8px; padding: 10px 12px; font-weight: 400; width: 100%; }
label input::placeholder, label textarea::placeholder, .say input::placeholder { color: var(--muted); opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok { background: var(--accent-soft); color: var(--ink); font-weight: 700; padding: 12px 14px; border-radius: 10px; max-width: 34rem; border: 2px solid var(--accent); }
.warn { color: var(--danger); font-size: 0.95rem; font-weight: 600; }
.status { background: var(--signal-soft); color: var(--signal); border-radius: 10px; padding: 10px 14px; font-weight: 600; max-width: 34rem; }

.prose { max-width: 68ch; display: grid; gap: 14px; }
.prose h2 { margin-top: 18px; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }

footer { border-top: 1px solid var(--line); padding-block: 28px calc(84px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: grid; gap: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- Multi-page additions ---- */
.top nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.page-hero .wrap { padding-block: 36px 8px; display: grid; gap: 12px; max-width: 1120px; }
h1.page-title, h2.page-title { font-family: var(--font-display); font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 900; line-height: 1.06; letter-spacing: -0.02em; }
.page-hero p.lede { max-width: 62ch; }
.page-section { scroll-margin-top: 8px; }
.teasers .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.teaser { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.teaser p { color: var(--muted); }
.teaser .price { font-family: var(--font-mono); color: var(--ink); font-size: 0.9rem; }
.teaser a.more { font-weight: 700; }
.cta-band { background: var(--ink); color: var(--bg); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; padding-block: 36px; }
.cta-band h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.cta-band .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { padding-left: 1.6rem; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.8rem; height: 0.4rem; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg) translateY(-50%); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.note { border-left: 4px solid var(--signal); background: var(--signal-soft); color: var(--ink); padding: 12px 16px; border-radius: 0 10px 10px 0; max-width: 62ch; }

/* The assistant as a drawer on pages that do not have it in the hero */
.drawer { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px)); z-index: 30; box-shadow: 0 10px 40px rgba(20, 23, 42, 0.35); border-radius: 16px; }
.drawer .asst { max-height: calc(100dvh - 32px); }
.drawer .log { height: clamp(180px, 40dvh, 340px); }
.asst-close { margin-left: auto; background: transparent; border: 0; font-size: 1.4rem; line-height: 1; padding: 4px 10px; cursor: pointer; color: var(--muted); border-radius: 8px; }

/* ---- Solutions page ---- */
dl.fits { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
dl.fits > div { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 4px 24px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
dl.fits > div:last-child { border-bottom: 0; }
dl.fits dt { font-family: var(--font-display); font-weight: 800; }
dl.fits dd { margin: 0; color: var(--muted); }
@media (max-width: 700px) { dl.fits > div { grid-template-columns: minmax(0, 1fr); } }

/* An example workflow. Complete when nothing moves; the steps light up in turn only when motion is allowed. */
.flowfig { margin: 0; display: grid; gap: 12px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
@media (min-width: 701px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.flow li { position: relative; display: grid; gap: 6px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.flow li > span:not(.tag) { color: var(--muted); font-size: 0.95rem; }
.flow .tag { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.flow li:not(:last-child)::after { content: "\2193"; position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); color: var(--muted); font-size: 1.1rem; line-height: 1; }
@media (min-width: 701px) { .flow li:not(:last-child)::after { content: "\2192"; left: auto; right: -22px; bottom: auto; top: 50%; transform: translateY(-50%); } }
@keyframes flow-lit { 0%, 22% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } 28%, 100% { border-color: var(--line); box-shadow: none; } }
@media (prefers-reduced-motion: no-preference) {
  .flow li { animation: flow-lit 8s infinite; }
  .flow li:nth-child(2) { animation-delay: 2s; }
  .flow li:nth-child(3) { animation-delay: 4s; }
  .flow li:nth-child(4) { animation-delay: 6s; }
}
