/* =========================================================================
   Bits & Brain — marketing-site styles
   Builds on tokens in ../../colors_and_type.css
   ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--surface-1);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

/* ---------- Buttons (page-scoped variants) ---------- */
.bb-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.bb-btn:active { transform: translateY(1px); }
.bb-btn--sm { font-size: 13px; padding: 8px 14px; border-radius: 6px; }
.bb-btn--lg { font-size: 16px; padding: 14px 22px; border-radius: 10px; }

.bb-btn--primary { background: var(--brand-500); color: #fff; }
.bb-btn--primary:hover { background: var(--brand-700); }

.bb-btn--secondary { background: #fff; color: var(--brand-500); border-color: var(--brand-500); }
.bb-btn--secondary:hover { background: var(--brand-50); }

.bb-btn--invert { background: #fff; color: var(--brand-500); }
.bb-btn--invert:hover { background: var(--brand-50); }

.bb-btn--ghost-on-brand { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.55); }
.bb-btn--ghost-on-brand:hover { background: rgb(255 255 255 / 0.10); border-color: #fff; }

/* ---------- Eyebrow ---------- */
.bb-eyebrow {
  font-size: 12px;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand-500);
}
.bb-eyebrow--invert { color: rgb(255 255 255 / 0.85); }

/* ---------- Tags ---------- */
.bb-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #F5F7FB;
  color: var(--fg-2);
  border: 1px solid var(--border);
  display: inline-block;
}
.bb-tag--brand { background: var(--brand-50); color: var(--brand-500); border-color: #D6E1ED; }

/* ---------- Header ---------- */
.bb-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  height: 108px;
}
body { padding-top: 108px; }
.bb-header__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 56px;
}
.bb-header__logo img { height: 88px; width: auto; }
.bb-header__nav { display: flex; gap: 40px; }
.bb-header .bb-btn--sm { width: 240px; padding: 13px 0; font-size: 20px; border-radius: 8px; flex: 0 0 auto; }
.bb-header__nav a {
  color: var(--fg-1);
  font-size: 20px; font-weight: 500;
  text-decoration: none;
  padding: 6px 2px;
  border-radius: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}
.bb-header__nav a:hover { color: var(--brand-500); }

/* ---------- Hero ---------- */
.bb-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.bb-hero__bg { position: absolute; inset: 0; z-index: -1; }
.bb-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.bb-hero__content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 32px 112px;
}
.bb-hero__title {
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: #fff;
  margin: 14px 0 20px;
  text-wrap: balance;
}
.bb-hero__title em {
  font-style: normal;
  font-weight: 300;
  opacity: 0.85;
}
.bb-hero__lede {
  font-size: 20px;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.88);
  max-width: 56ch;
  margin: 0 0 32px;
}
.bb-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.bb-hero__stats {
  margin: 64px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgb(255 255 255 / 0.25);
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 56px;
  max-width: 720px;
}
.bb-hero__stats div { display: flex; flex-direction: column; gap: 4px; }
.bb-hero__stats dt {
  font-size: 11px;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  color: rgb(255 255 255 / 0.7);
}
.bb-hero__stats dd {
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}
.bb-hero__stats dd span { opacity: 0.55; font-weight: 400; }

/* ---------- Generic section ---------- */
.bb-section { padding: 96px 0; background: #fff; }
.bb-section--alt { background: var(--surface-2); }
.bb-section__inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.bb-section__head { max-width: 720px; margin-bottom: 48px; }
.bb-section__title {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--fg-1);
  margin: 12px 0 16px;
}
.bb-section__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

/* ---------- Services ---------- */
.bb-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bb-service-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.bb-service-card:hover { box-shadow: var(--shadow-2); }
.bb-service-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-500);
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.bb-service-card h3 { font-size: 20px; font-weight: 700; margin: 0; color: var(--fg-1); }
.bb-service-card p { font-size: 14px; line-height: 1.55; color: var(--fg-2); margin: 0; flex: 1; }
.bb-service-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bb-service-card__more {
  margin-top: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--brand-500);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap var(--dur-fast) var(--ease-out);
}
.bb-service-card__more:hover { gap: 10px; color: var(--brand-700); }

/* ---------- Chip row + Trainings ---------- */
.bb-chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.bb-chip {
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--fg-2);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.bb-chip:hover { background: var(--brand-50); color: var(--brand-500); }
.bb-chip--active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.bb-chip--active:hover { background: var(--brand-700); color: #fff; }

.bb-trainings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.bb-training-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.bb-training-card:hover { box-shadow: var(--shadow-2); }
.bb-training-card__cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--brand-500);
}
.bb-training-card h3 { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.25; }
.bb-training-card p { font-size: 14px; line-height: 1.55; color: var(--fg-2); margin: 0; }
.bb-training-card__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bb-training-card__meta div { display: flex; flex-direction: column; gap: 2px; }
.bb-training-card__meta dt { font-size: 11px; color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.bb-training-card__meta dd { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; color: var(--fg-1); }
.bb-training-card .bb-btn { align-self: flex-start; }

/* ---------- Contact ---------- */
.bb-contact { background: var(--brand-500); color: #fff; padding: 96px 0; }
.bb-contact__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.bb-contact__copy h2 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 12px 0 16px; }
.bb-contact__copy p { font-size: 17px; line-height: 1.55; color: rgb(255 255 255 / 0.85); margin: 0 0 20px; max-width: 50ch; }
.bb-contact__points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bb-contact__points li { display: flex; align-items: center; gap: 10px; color: rgb(255 255 255 / 0.92); font-size: 15px; }
.bb-contact__points i { color: rgb(255 255 255 / 0.85); }

.bb-contact__form {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  color: var(--fg-1);
  box-shadow: var(--shadow-3);
}
.bb-field { display: flex; flex-direction: column; gap: 6px; }
.bb-field--full { grid-column: 1 / -1; }
.bb-field label { font-size: 12px; font-weight: 600; color: var(--fg-1); }
.bb-input {
  font-family: inherit;
  font-size: 14px;
  color: var(--fg-1);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.bb-input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgb(27 72 126 / 0.15); }
textarea.bb-input { resize: vertical; min-height: 80px; }

.bb-contact__submit {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 16px;
  margin-top: 4px;
}
.bb-contact__hint { font-size: 12px; color: var(--fg-3); }

/* ---------- Footer ---------- */
.bb-footer { background: #0C223D; color: #fff; padding: 64px 0 24px; }
.bb-footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1fr 2fr; gap: 64px;
  align-items: start;
}
.bb-footer__brand img { height: 56px; width: auto; margin-bottom: 12px; }
.bb-footer__brand p { font-size: 14px; line-height: 1.6; color: rgb(255 255 255 / 0.7); max-width: 36ch; }
.bb-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.bb-footer__h { font-size: 11px; letter-spacing: var(--tr-eyebrow); text-transform: uppercase; font-weight: 600; color: rgb(255 255 255 / 0.7); margin-bottom: 14px; }
.bb-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bb-footer__col a { color: rgb(255 255 255 / 0.88); text-decoration: none; font-size: 14px; transition: color var(--dur-fast); }
.bb-footer__col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bb-footer__legal {
  max-width: 1200px; margin: 48px auto 0; padding: 16px 32px 0;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between;
  color: rgb(255 255 255 / 0.6); font-size: 12px;
  font-family: var(--font-mono);
}

/* ---------- Toast ---------- */
.bb-toast {
  position: fixed; z-index: 100; right: 24px; bottom: 24px;
  background: var(--brand-700); color: #fff;
  padding: 12px 16px; border-radius: 10px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-3);
  animation: bb-toast-in 220ms var(--ease-out);
}
@keyframes bb-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .bb-header__nav { display: none; }
  .bb-services, .bb-trainings { grid-template-columns: 1fr; }
  .bb-contact__inner, .bb-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .bb-footer__cols { grid-template-columns: repeat(2, 1fr); }
  .bb-hero__stats { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .bb-hero__stats dd { font-size: 28px; }
  .bb-section__title, .bb-contact__copy h2 { font-size: 32px; }
}
