/* ─────────────────────────────────────────────────────────────
   Tinker Bot Solutions — design tokens (light · green accent · roomy)
   ───────────────────────────────────────────────────────────── */
:root {
  --accent: #15803d;
  --accent-soft: rgba(21, 128, 61, 0.12);
  --accent-glow: rgba(21, 128, 61, 0.04);
  --accent-cta-glow: rgba(21, 128, 61, 0.06);

  --fg: #0a0a0a;
  --bg: #ffffff;
  --surface: #fafafa;
  --card: #ffffff;
  --mute: #737373;
  --mute-soft: #a3a3a3;
  --border: #e5e5e5;

  --font-base: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  --pad-x: 80px;
  --section-py: 120px;
  --hero-py: 140px;
  --container: 1120px;
}

/* ─────────────────────────────────────────────────────────────
   Reset / base
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-base);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
.muted { color: var(--mute); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

/* ─────────────────────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); }

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}
.btn[disabled]:hover { opacity: 0.55; background: var(--fg); }

/* ─────────────────────────────────────────────────────────────
   Wordmark
   ───────────────────────────────────────────────────────────── */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}
.wordmark span {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.wordmark-sm span { font-size: 14px; }

/* ─────────────────────────────────────────────────────────────
   Nav
   ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  color: var(--mute);
}
.nav-links a:hover { color: var(--fg); }

/* ─────────────────────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--hero-py) var(--pad-x) calc(var(--hero-py) * 0.8);
}
.hero-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 240px;
  pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-glow), transparent 70%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--mute);
  font-family: var(--font-mono);
  margin-bottom: 32px;
  background: var(--card);
}
.dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-block;
}
.dot-accent { background: var(--accent); box-shadow: 0 0 0 3px rgba(21,128,61,0.18); }
.dot-pulse { width: 8px; height: 8px; box-shadow: 0 0 0 4px var(--accent-soft); }

.hero h1 {
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 14ch;
  text-wrap: balance;
}
.lede {
  margin-top: 28px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--mute);
  max-width: 52ch;
  text-wrap: pretty;
}
.cta-row {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-row-center { justify-content: center; }
.cta-meta { font-size: 13px; color: var(--mute); margin-left: 4px; }

/* ─────────────────────────────────────────────────────────────
   Hero interactive demo
   ───────────────────────────────────────────────────────────── */
.hero-demo {
  margin-top: 72px;
  max-width: 980px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.demo-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.demo-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.demo-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.demo-toolbar-label {
  font-size: 11px;
  color: var(--mute);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
}
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--mute);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.demo-tab:hover { color: var(--fg); }
.demo-tab.is-active {
  background: #fff;
  color: var(--fg);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.demo-run {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--surface);
  border: 1px solid var(--fg);
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s ease;
}
.demo-run:disabled,
.demo-run.is-running { opacity: 0.6; cursor: default; }
.demo-run-pulse { display: none; }
.demo-run.is-running .demo-run-icon { display: none; }
.demo-run.is-running .demo-run-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.2);
  animation: tb-pulse 1s ease-in-out infinite;
}

.demo-body {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
}

.demo-queue {
  padding: 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.demo-queue-title {
  font-size: 11px;
  color: var(--mute);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-queue-count {
  font-size: 11px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.demo-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-task {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .25s ease, opacity .25s ease, box-shadow .25s ease;
}
.demo-task.is-queued { opacity: 0.55; }
.demo-task.is-processing {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}
.demo-task-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-icon-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  border: 1.5px solid var(--mute);
  opacity: 0.5;
  display: inline-block;
}
.task-icon-spin {
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  display: inline-block;
  animation: tb-spin .7s linear infinite;
}
.task-icon-check { color: var(--accent); }
.task-icon-check circle { fill: var(--accent); }
.demo-task-body { min-width: 0; }
.demo-task-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.demo-task-from {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-task-tag {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.demo-task[data-kind="reply"] .demo-task-tag { color: var(--accent); }
.demo-task[data-kind="file"]  .demo-task-tag { color: var(--fg); }
.demo-task[data-kind="flag"]  .demo-task-tag { color: #c2410c; }
.demo-task-subject {
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.demo-agent {
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 0 var(--border), 0 8px 24px -12px rgba(0,0,0,0.08);
}
.demo-agent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.demo-agent-title { font-size: 12px; font-weight: 500; color: var(--fg); }
.demo-agent-state {
  margin-left: auto;
  font-size: 10px;
  color: var(--mute);
  font-family: var(--font-mono);
}
.dot.is-running { animation: tb-pulse 1.2s ease-in-out infinite; }

.demo-log {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--mute);
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.demo-log-empty { opacity: 0.7; }
.demo-log-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.demo-log-line.is-current { color: var(--fg); }
.demo-log-line[data-kind="reply"] .demo-log-icon { color: var(--accent); }
.demo-log-line[data-kind="file"]  .demo-log-icon { color: var(--fg); }
.demo-log-line[data-kind="flag"]  .demo-log-icon { color: #c2410c; }
.demo-log-icon { flex-shrink: 0; }
.demo-log-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-log-em { color: var(--fg); }

.demo-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--mute);
  line-height: 1.5;
  opacity: 0.4;
  transition: opacity .3s ease;
}
.demo-summary.is-revealed { opacity: 1; }

.demo-metric {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.demo-metric-label { font-size: 12px; color: var(--mute); }
.demo-metric-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.demo-foot { font-size: 11px; color: var(--mute); padding-left: 2px; }

@keyframes tb-spin { to { transform: rotate(360deg); } }
@keyframes tb-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.13); }
  50%      { box-shadow: 0 0 0 7px rgba(21, 128, 61, 0.07); }
}

/* ─────────────────────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────────────────────── */
.section {
  padding: var(--section-py) var(--pad-x);
  border-top: 1px solid var(--border);
}
.section-tinted { background: var(--surface); }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
  text-transform: uppercase;
  font-weight: 500;
}
.section-label .num { color: var(--accent); font-weight: 500; }
.section-label .rule {
  width: 24px;
  height: 1px;
  background: var(--border);
}

.section-h2 {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  max-width: 20ch;
}
.industries-h2 { max-width: 22ch; margin-bottom: 48px; }

/* ─────────────────────────────────────────────────────────────
   Services grid (What we do)
   ───────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.service {
  padding: 40px 36px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}
.service-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.service-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
}
.service h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.service p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--mute);
  text-wrap: pretty;
}

/* ─────────────────────────────────────────────────────────────
   How we work
   ───────────────────────────────────────────────────────────── */
.how-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.how-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.how-num {
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.how-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--fg), transparent);
}
.how-step h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.how-step p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mute);
  text-wrap: pretty;
}

/* ─────────────────────────────────────────────────────────────
   Who we help — project cards + chip row
   ───────────────────────────────────────────────────────────── */
.industries-h2 { max-width: 22ch; margin-bottom: 20px; }
.industries-lede {
  margin: 0 0 48px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 58ch;
  text-wrap: pretty;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-tag {
  align-self: flex-start;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.project-who {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.project-what {
  margin: 0;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.55;
  text-wrap: pretty;
}

.also-row {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: baseline;
}
.also-label {
  font-size: 11px;
  color: var(--mute);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  flex-shrink: 0;
}
.also-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg);
  background: var(--card);
}
.chip-tail {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--mute);
}

/* ─────────────────────────────────────────────────────────────
   About / founders
   ───────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-grid .section-h2 { max-width: 18ch; }
.about-body {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--mute);
  max-width: 46ch;
  text-wrap: pretty;
}
.about-body + .about-body { margin-top: 16px; }

.founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.founder { margin: 0; }
.founder-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute-soft);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.founder figcaption {
  margin-top: 12px;
  font-size: 13px;
}
.founder-name { font-weight: 500; }

/* ─────────────────────────────────────────────────────────────
   Final CTA
   ───────────────────────────────────────────────────────────── */
.section-cta {
  position: relative;
  padding: calc(var(--section-py) * 1.1) var(--pad-x);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(50% 80% at 50% 100%, var(--accent-cta-glow), transparent 70%);
}
.cta-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.cta-h2 {
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
}
.cta-lede {
  margin-top: 18px;
  font-size: 18px;
  color: var(--mute);
  line-height: 1.55;
  text-wrap: pretty;
}
.section-cta .cta-row { margin-top: 32px; }

/* ─────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────── */
.footer {
  padding: 32px var(--pad-x);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--mute);
}
.footer-email:hover { color: var(--fg); }
.footer-copy { font-family: var(--font-mono); font-size: 11px; }

/* ─────────────────────────────────────────────────────────────
   Responsive — mobile (≤ 768px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --pad-x: 24px;
    --section-py: 72px;
    --hero-py: 84px;
  }

  .nav { padding: 20px var(--pad-x); }
  .nav-links { display: none; }

  .hero h1 { font-size: 40px; max-width: 100%; }
  .lede { font-size: 17px; max-width: 100%; margin-top: 20px; }
  .eyebrow { margin-bottom: 24px; }
  .cta-row { margin-top: 28px; }

  .hero-demo { margin-top: 48px; }
  .demo-toolbar { padding: 14px 16px; }
  .demo-tabs { gap: 4px; }
  .demo-tab { padding: 7px 10px; font-size: 12px; }
  .demo-toolbar-label { width: 100%; margin: 0 0 4px; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-queue {
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .demo-panel { padding: 16px; }

  .section-label { margin-bottom: 24px; }
  .section-h2 { font-size: 28px; max-width: 100%; }
  .industries-h2 { margin-bottom: 14px; }
  .industries-lede { font-size: 16px; margin-bottom: 32px; }

  .services-grid { grid-template-columns: 1fr; }
  .service { padding: 32px 24px; min-height: 0; }
  .service h3 { font-size: 20px; }

  .how-grid { margin-top: 36px; grid-template-columns: 1fr; gap: 32px; }
  .how-line { display: none; }
  .how-step h3 { font-size: 19px; }

  .project-cards { grid-template-columns: 1fr; gap: 16px; }
  .project-card { padding: 22px; }
  .also-row {
    margin-top: 28px;
    padding-top: 20px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-body { font-size: 16px; max-width: 100%; }

  .cta-h2 { font-size: 36px; }
  .cta-lede { font-size: 16px; }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 32px var(--pad-x);
  }
}
