/* =====================================================================
   BBT product page — styles
   Design tokens borrowed from the app's public/css/app.css.
   Vanilla CSS, no build step, no external assets.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --surface-0: #f9f9f7;   /* page plane */
  --surface-1: #fcfcfb;   /* card surface */
  --surface-2: #f2f1ec;   /* raised / code bg */
  --text-1: #0b0b0b;      /* primary ink */
  --text-2: #52514e;      /* secondary ink */
  --muted: #898781;       /* labels / axis */
  --hairline: #e1e0d9;    /* gridlines */
  --baseline: #c3c2b7;    /* borders */
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(42, 120, 214, 0.10);
  --good: #006300;
  --danger: #d03b3b;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-0: #0d0d0d;
    --surface-1: #161615;
    --surface-2: #1c1c1a;
    --text-1: #ffffff;
    --text-2: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --accent-soft: rgba(57, 135, 229, 0.16);
    --good: #0ca30c;
    --danger: #e66767;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}
/* Force dark when the user opted in via the toggle */
:root[data-theme="dark"] {
  --surface-0: #0d0d0d;
  --surface-1: #161615;
  --surface-2: #1c1c1a;
  --text-1: #ffffff;
  --text-2: #c3c2b7;
  --muted: #898781;
  --hairline: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --accent-soft: rgba(57, 135, 229, 0.16);
  --good: #0ca30c;
  --danger: #e66767;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface-0);
  color: var(--text-1);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--mono); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .12s ease, border-color .12s ease;
  text-decoration: none; line-height: 1.1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn--secondary { background: var(--surface-1); color: var(--text-1); border-color: var(--baseline); }
.btn--secondary:hover { border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--text-1); border-color: var(--baseline); }
.btn--ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ico { width: 18px; height: 18px; fill: currentColor; }
.nav__theme .sun { display: none; }
:root[data-theme="dark"] .nav__theme .sun { display: block; }
:root[data-theme="dark"] .nav__theme .moon { display: none; }
.nav__theme { padding: 8px; width: 40px; height: 40px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface-0) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__brand .logo-word { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); }
.nav__brand .logo-mark { width: 38px; height: auto; flex: none; }
.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__menu a {
  padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: 15px;
}
.nav__menu a:not(.btn):hover { color: var(--text-1); background: var(--accent-soft); text-decoration: none; }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--text-1); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ---------- Hero ---------- */
.hero { padding: 64px 20px 56px; }
.hero__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: 1.125rem; color: var(--text-2); margin: 18px 0 28px; max-width: 36ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.trust li { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }

.hero__art .frame {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.frame__bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }
.frame__bar img { display: none; }
.frame img { width: 100%; display: block; }

/* ---------- Sections ---------- */
.section { padding: 72px 20px; }
.section--alt { background: var(--surface-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
.section__sub { color: var(--text-2); font-size: 1.05rem; margin-top: 12px; }
.mission { max-width: 720px; margin: 0 auto; text-align: center; color: var(--text-2); font-size: 1.05rem; line-height: 1.6; }
.note { max-width: 720px; margin: 32px auto 0; text-align: center; color: var(--text-2); font-size: .95rem; font-style: italic; }

/* ---------- Feature grid ---------- */
.grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__ico { font-size: 28px; width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 12px; margin-bottom: 16px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { max-width: 820px; margin: 0 auto; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.step {
  display: flex; gap: 20px; align-items: flex-start; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.step__n {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--text-2); }

/* ---------- Gallery ---------- */
.gallery {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.gallery__item { margin: 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery__item img { width: 100%; display: block; }
.gallery__item figcaption {
  padding: 20px 16px; font-size: 1rem; color: var(--text-2); text-align: center; border-top: 1px solid var(--border); font-weight: 700;
}

/* ---------- Platforms ---------- */
.cards3 { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plat {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.plat h3 { font-size: 1.25rem; padding-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.plat__desc { color: var(--text-2); font-size: .95rem; }
.plat__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plat__list li { position: relative; padding-left: 22px; color: var(--text-2); font-size: .92rem; }
.plat__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plat .btn { margin-top: auto; }

/* ---------- Code ---------- */
.code {
  max-width: 720px; margin: 0 auto; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; font-size: .9rem; line-height: 1.7;
  box-shadow: var(--shadow);
}
.code code { font-family: var(--mono); color: var(--text-2); white-space: pre; }
.code .c { color: var(--muted); font-style: italic; }

/* ---------- FAQ accordion ---------- */
.accordion { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.aq { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.aq details { margin: 0; }
.aq summary {
  list-style: none; cursor: pointer; padding: 18px 44px 18px 20px; font-weight: 600; font-size: 1.02rem;
  position: relative; color: var(--text-1); user-select: none;
}
.aq summary::-webkit-details-marker { display: none; }
.aq summary h3 { font: inherit; font-size: inherit; font-weight: inherit; color: inherit; margin: 0; }
.aq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.aq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.aq .aq-body { padding: 0 20px 20px; color: var(--text-2); }
.aq .aq-body p { max-width: 68ch; }
.aq .aq-body code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .88em; }

/* ---------- Footer ---------- */
.footer { background: var(--surface-1); border-top: 1px solid var(--border); padding: 56px 20px 28px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.footer__brand .logo-mark { width: 44px; height: auto; flex: none; }
.footer__brand .logo-word { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); }
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__logo { display: flex; align-items: center; gap: 10px; }
.footer__brand p { color: var(--text-2); max-width: 34ch; font-size: .95rem; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__links h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer__links a { display: block; color: var(--text-2); padding: 5px 0; font-size: .95rem; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { max-width: var(--maxw); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(5, 5, 5, 0.9);
  display: grid; place-items: center; padding: 24px;
}
.lightbox img { max-height: 88vh; max-width: 92vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.lightbox__cap {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,0.55); padding: 6px 14px; border-radius: 999px; font-size: .85rem;
}
.lightbox__close {
  position: absolute; top: 18px; right: 22px; background: rgba(255,255,255,0.12); color: #fff;
  border: 0; width: 44px; height: 44px; font-size: 28px; line-height: 1; border-radius: 50%; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.25); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cards3 { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__art { order: -1; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface-1); border-bottom: 1px solid var(--border); padding: 12px 20px;
    box-shadow: var(--shadow); display: none;
  }
  .nav__menu.open { display: flex; }
  .nav__menu a { width: 100%; text-align: left; }
  .nav__menu .btn { justify-content: flex-start; }
  .gallery { grid-template-columns: 1fr; }
  .section { padding: 56px 18px; }
  .hero { padding: 40px 18px 40px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}
