/* Better Bot Bureau: bbb.ai
   Brand colours come from the logo: teal #18cdca, blue #4f80e1. */

:root {
  --teal: #18cdca;
  --blue: #4f80e1;
  --navy: #0d1b3a;
  --navy-2: #13254d;

  --bg: #ffffff;
  --bg-tint: #f4f7fc;
  --surface: #ffffff;
  --text: #13213f;
  --text-muted: #55627d;
  --border: #e2e8f2;
  --accent: #2f63cf;
  --accent-hover: #2552b0;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(13, 27, 58, 0.06), 0 8px 24px rgba(13, 27, 58, 0.06);

  --radius: 14px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: 24px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1428;
    --bg-tint: #0f1b35;
    --surface: #13213f;
    --text: #e8eefb;
    --text-muted: #a3b0cc;
    --border: #23345c;
    --accent: #5b8ff0;
    --accent-hover: #79a4f5;
    --accent-text: #0b1428;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1428;
  --bg-tint: #0f1b35;
  --surface: #13213f;
  --text: #e8eefb;
  --text-muted: #a3b0cc;
  --border: #23345c;
  --accent: #5b8ff0;
  --accent-hover: #79a4f5;
  --accent-text: #0b1428;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Inter has no Chinese glyphs, so system CJK fonts follow it. */
:lang(zh) body, body:lang(zh) {
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { flex: none; }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--text-muted); text-decoration: none; font-size: 0.93rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; margin-left: auto; flex: none; }
.lang-switch a { padding: 4px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] { background: var(--text); color: var(--bg); }
.nav-toggle { display: none; flex: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
/* Narrow phones: the full name, language switch and menu button don't fit on one line. */
@media (max-width: 440px) {
  .header-inner { gap: 10px; }
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .site-nav .btn { margin-top: 14px; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(24, 205, 202, 0.22), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(79, 128, 225, 0.3), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 88px 0 96px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .eyebrow { color: var(--teal); }
.hero .lead { font-size: 1.15rem; color: #c9d5ee; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }
.hero .btn-primary { background: var(--teal); color: var(--navy); }
.hero .btn-primary:hover { background: #3ee0dd; }
.partner-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px;
  color: #dbe5f8; font-size: 0.93rem; font-weight: 500; text-decoration: none;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
}
.partner-link:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.partner-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.partner-dot { width: 8px; height: 8px; border-radius: 50%; background: #95bf47; box-shadow: 0 0 0 3px rgba(149, 191, 71, 0.25); }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #b7c4e2; font-size: 0.93rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-width: 380px; margin-left: auto; }
.flow-node {
  border-radius: var(--radius); padding: 18px 20px; text-align: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.flow-app { background: rgba(79, 128, 225, 0.22); border-color: rgba(79, 128, 225, 0.55); }
.flow-shop { background: rgba(24, 205, 202, 0.14); border-color: rgba(24, 205, 202, 0.5); }
.flow-label { font-weight: 700; font-size: 1.05rem; }
.flow-sub { color: #b7c4e2; font-size: 0.85rem; }
.flow-link { height: 38px; display: flex; justify-content: center; }
.flow-link span { width: 2px; height: 100%; background: linear-gradient(var(--blue), var(--teal)); position: relative; }
.flow-link span::before, .flow-link span::after {
  content: ""; position: absolute; left: 50%; width: 8px; height: 8px; border: solid #9db6ea; border-width: 0 2px 2px 0;
}
.flow-link span::before { top: 2px; transform: translateX(-50%) rotate(-135deg); }
.flow-link span::after { bottom: 2px; transform: translateX(-50%) rotate(45deg); }

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .flow { margin: 0 auto; width: 100%; }
}

/* Sections */
.section { padding: 96px 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-lead { color: var(--text-muted); font-size: 1.08rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
@media (max-width: 700px) { .section { padding: 68px 0; } }

/* Cards */
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid.cols-3, .card-grid.cols-5 { grid-template-columns: 1fr; } }

.card, .benefit {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p, .benefit p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(24, 205, 202, 0.16), rgba(79, 128, 225, 0.2));
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.benefit { border-top: 3px solid var(--teal); }

/* B2B features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feature { padding: 28px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature:nth-child(3n) { border-right: 0; }
.feature:nth-last-child(-n+3) { border-bottom: 0; }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature h3::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--teal), var(--blue)); }
.feature p { color: var(--text-muted); margin: 0; font-size: 0.96rem; }
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(3n) { border-right: 1px solid var(--border); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .feature:last-child { border-bottom: 0; }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature { border-right: 0 !important; }
}

/* Custom apps */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split > div > p { color: var(--text-muted); }
.erp-list { font-size: 0.95rem; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-tint); border: 1px solid var(--border); }
.erp-list strong { color: var(--text); }
.checklist-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-size: 0.97rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1b3a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* Use cases */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.case-tag { font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.case h3 { font-size: 1.3rem; }
.case dl { margin: 6px 0 0; }
.case dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--text-muted); margin-top: 14px; }
.case dd { margin: 4px 0 0; font-size: 0.95rem; }
@media (max-width: 1000px) { .case-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .case-grid { grid-template-columns: 1fr; } }

/* Services */
.section-dark { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.section-dark .eyebrow { color: var(--teal); }
.section-dark .section-lead { color: #b7c4e2; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); border-radius: var(--radius); padding: 28px; }
.service p { color: #c2cee8; margin: 0; font-size: 0.96rem; }
.service-num { display: inline-block; font-weight: 800; font-size: 0.85rem; color: var(--teal); margin-bottom: 14px; letter-spacing: 0.06em; }
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .service-grid { grid-template-columns: 1fr; } }

/* Process */
.process { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.process li { counter-increment: step; position: relative; padding-top: 58px; }
.process li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.process li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 52px; right: -10px; height: 2px; background: var(--border); }
.process p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; gap: 26px; }
  .process li { padding: 0 0 0 60px; }
  .process li:not(:last-child)::after { display: none; }
}

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-muted); padding-bottom: 18px; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.contact-intro > p { color: var(--text-muted); }
.contact-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.contact-points li { display: flex; gap: 10px; align-items: center; }
.contact-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; }
.contact-details { font-style: normal; display: grid; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact-details a, .contact-details span { display: flex; gap: 12px; align-items: flex-start; color: var(--text); text-decoration: none; font-weight: 500; }
.contact-details a:hover { color: var(--accent); }
.contact-details svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; border: 0; padding: 0; margin: 0; min-width: 0; }
.field em { color: #d14343; font-style: normal; }
.field legend { padding: 0; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; font-size: 0.97rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field [aria-invalid="true"] { border-color: #d14343; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-weight: 400; font-size: 0.93rem; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 0.93rem; min-height: 1.4em; }
.form-status.ok { color: #13906f; }
.form-status.error { color: #d14343; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) {
  .field-row, .checks { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-tint); padding: 56px 0 28px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 360px; }
.footer-logo { width: 170px; height: auto; color: var(--text); margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 0.93rem; }
.footer-address { font-style: normal; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.footer-address a { color: var(--text-muted); text-decoration: none; }
.footer-address a:hover { color: var(--text); }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 40px; align-content: start; }
.footer-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.93rem; }
.footer-nav a:hover { color: var(--text); }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-legal p { margin: 0; color: var(--text-muted); font-size: 0.82rem; }
