/* BB TECHNOLOGIES LLC — website styles.
   No web fonts, no scripts: system fonts only, light and dark themes. */

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f6f8;
  --surface: #ffffff;
  --border: #e3e6eb;
  --border-strong: #8c95a3;
  --text: #0e1217;
  --text-muted: #566170;
  --text-faint: #646e7e;
  --accent: #1f4fe0;
  --accent-hover: #183fb6;
  --accent-soft: #ebf0ff;
  --accent-ink: #ffffff;
  --cta-bg: #1f4fe0;
  --cta-ink: #ffffff;
  --cta-muted: rgba(255, 255, 255, .82);
  --cta-line: rgba(255, 255, 255, .28);
  --shadow-card: 0 1px 2px rgba(14, 18, 23, .04), 0 24px 48px -28px rgba(14, 18, 23, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e13;
    --bg-subtle: #121722;
    --surface: #131821;
    --border: #212833;
    --border-strong: #5a6474;
    --text: #e8ebf0;
    --text-muted: #a0a9b6;
    --text-faint: #8a94a3;
    --accent: #86a2ff;
    --accent-hover: #a7bbff;
    --accent-soft: #161f36;
    --accent-ink: #0b0e13;
    --cta-bg: #1e3fae;
    --cta-ink: #ffffff;
    --cta-muted: rgba(255, 255, 255, .8);
    --cta-line: rgba(255, 255, 255, .24);
    --shadow-card: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { color: var(--accent-hover); }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: break-word;
}
p { margin: 0; text-wrap: pretty; }
p, dd, li { overflow-wrap: break-word; }
strong { font-weight: 600; }
.nw { white-space: nowrap; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }

/* The mark keeps the same colours as the favicon and logo in both themes. */
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .tile { fill: #1f4fe0; }
.brand-mark .glyph { fill: #ffffff; }

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}
.brand-name b { font-weight: 800; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--bg-subtle); }

.lang {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.lang a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  font: 600 12px/1.4 var(--font-mono);
  letter-spacing: .04em;
  text-decoration: none;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current] { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 960px) {
  html { scroll-padding-top: 16px; }
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px 0; row-gap: 4px; }
  .nav {
    order: 3;
    width: calc(100% + 24px);
    margin-inline: -12px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 400px) {
  .header-inner { column-gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 13px; letter-spacing: .05em; }
  .lang a { padding: 4px 7px; }
}
@media (max-width: 320px) {
  .brand-name { letter-spacing: 0; }
  .lang a { padding: 4px 5px; }
  .header-inner { column-gap: 8px; }
}
@media (forced-colors: active) {
  .lang a[aria-current] { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- Common ---------- */

.label {
  color: var(--text-faint);
  font: 500 13px/1.4 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.link-arrow {
  display: inline-flex;
  gap: 6px;
  margin-top: 24px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow::after { content: "↗"; content: "↗" / ""; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 7vw, 96px); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.lead {
  max-width: 34em;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: clamp(17px, 1.5vw, 19px);
}

.hero-art { justify-self: end; width: 100%; max-width: 440px; }

/* Registry card: the company's identity, as it appears in the state register. */
.regcard {
  padding: 26px 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.regcard-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-strong);
  color: var(--text-faint);
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.regcard-name {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.regcard-alt { margin-top: 6px; color: var(--text-muted); font-size: 15px; line-height: 1.45; }
.regcard-ids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px 20px;
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.regcard-ids dt { color: var(--text-faint); font-size: 13px; line-height: 1.4; }
.regcard-ids dd { margin: 3px 0 0; font: 500 15px/1.4 var(--font-mono); white-space: nowrap; }
.regcard-link { display: inline-flex; gap: 6px; margin-top: 22px; font-size: 15px; font-weight: 600; text-decoration: none; }
.regcard-link::after { content: "↗"; content: "↗" / ""; }
.regcard-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: stretch; max-width: none; }
}
@media (max-width: 400px) {
  .regcard { padding: 20px 20px 18px; }
  .regcard-name { font-size: 20px; }
  .regcard-top span + span { display: none; }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--border);
}
.section-subtle { background: var(--bg-subtle); }
.section-subtle, .section-subtle + .section { border-top: 0; }
#company { padding-bottom: clamp(48px, 6vw, 80px); }

.section-head { max-width: 760px; }
.section-head h2 {
  margin-top: 16px;
  font-size: clamp(28px, 3.4vw, 42px);
}
.section-head p:not(.label) {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 18px;
}

/* Services */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}

.card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h3 {
  margin-top: 24px;
  font-size: 20px;
  letter-spacing: -0.015em;
}
.card p { max-width: 36em; margin-top: 10px; color: var(--text-muted); }

.card-lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
  border-color: transparent;
  background: var(--accent-soft);
}
.card-lead .icon { grid-row: 1 / span 2; width: 56px; height: 56px; padding: 13px; background: var(--surface); }
.card-lead h3, .card-lead p { grid-column: 2; }
.card-lead h3 { margin-top: 0; font-size: clamp(22px, 2.2vw, 28px); }

.icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .pt { stroke-width: 2.4; }

@media (max-width: 960px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card-lead { grid-template-columns: minmax(0, 1fr); }
  .card-lead .icon { grid-row: auto; }
  .card-lead h3, .card-lead p { grid-column: 1; }
  .card-lead h3 { margin-top: 20px; }
}

/* Approach */

.approach {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.approach .section-head { position: sticky; top: 108px; }

.principles {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.principles li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding-block: 28px;
  border-top: 1px solid var(--border);
}
.principles li:first-child { padding-top: 6px; border-top: 0; }
.principles li:last-child { padding-bottom: 0; }
.principles .num {
  color: var(--accent);
  font: 500 14px/1.9 var(--font-mono);
}
.principles h3 { font-size: 20px; letter-spacing: -0.012em; }
.principles p { margin-top: 8px; color: var(--text-muted); }

@media (max-width: 860px) {
  .approach { grid-template-columns: minmax(0, 1fr); }
  .approach .section-head { position: static; }
}

/* Company */

.company {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.company .section-head { position: sticky; top: 108px; }

.details {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.details > div {
  display: grid;
  grid-template-columns: minmax(140px, 36%) minmax(0, 1fr);
  gap: 16px;
  padding: 15px 24px;
  border-top: 1px solid var(--border);
}
.details > div:first-child { border-top: 0; }
.details dt { color: var(--text-faint); font-size: 15px; line-height: 1.6; }
.details dd {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
.details dd.id { font: 500 16px/1.6 var(--font-mono); letter-spacing: .01em; }

@media (max-width: 960px) {
  .approach .section-head, .company .section-head { top: 32px; }
}
@media (max-width: 860px) {
  .company { grid-template-columns: minmax(0, 1fr); }
  .company .section-head { position: static; }
}
@media (max-width: 560px) {
  .details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 18px; }
}
@media (max-height: 540px) {
  .approach .section-head, .company .section-head { position: static; }
}

/* Contact */

.section-contact { padding-top: 0; padding-bottom: clamp(48px, 6vw, 80px); border-top: 0; }

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 6vw, 72px);
  border-radius: 28px;
  background: var(--cta-bg);
  color: var(--cta-ink);
}
.contact-card .label { color: var(--cta-muted); }
.contact-card h2 {
  margin-top: 16px;
  font-size: clamp(28px, 3.4vw, 42px);
}
.contact-card p:not(.label) {
  max-width: 30em;
  margin-top: 18px;
  color: var(--cta-muted);
  font-size: 18px;
}
.contact-card p.contact-note { margin-top: 24px; font-size: 15px; }
.contact-note a { color: var(--cta-ink); text-decoration-color: currentColor; }
.contact-note a:hover { color: var(--cta-ink); }
.contact-card :focus-visible { outline-color: var(--cta-ink); }

.contact-list {
  display: grid;
  gap: 22px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--cta-line);
}
.contact-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.contact-list .k {
  color: var(--cta-muted);
  font: 500 13px/1.4 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.contact-list .v { color: var(--cta-ink); font-size: 18px; font-weight: 500; }
.contact-list a.v {
  text-decoration: underline;
  text-decoration-color: var(--cta-line);
  text-underline-offset: .22em;
}
.contact-list a.v:hover { color: var(--cta-ink); text-decoration-color: currentColor; }
.contact-list .big {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 650;
  letter-spacing: -0.01em;
}

@media (max-width: 860px) {
  .contact-card { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
}
@media (max-width: 560px) {
  .section-head h2, .contact-card h2 { font-size: 25px; }
}
@media (max-width: 360px) {
  .contact-list .nw, .details .nw { white-space: normal; }
}

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(48px, 7vw, 96px) var(--section); }
.legal-inner { max-width: 780px; }
.legal h1 {
  margin-top: 16px;
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -0.03em;
  hyphens: auto;
}
.legal .subtitle { margin-top: 12px; color: var(--text-muted); font-size: 18px; }
.legal .updated { margin-top: 14px; color: var(--text-faint); font-size: 15px; }
.legal .intro { margin-top: 28px; color: var(--text-muted); font-size: 19px; }
.legal h2 {
  margin-top: 52px;
  font-size: 23px;
  letter-spacing: -0.015em;
}
.legal h2 .n {
  display: inline-block;
  min-width: 28px;
  color: var(--accent);
  font: 500 14px/1 var(--font-mono);
  vertical-align: 3px;
}
.legal p, .legal ul { max-width: 34em; margin-top: 14px; }
.legal ul { padding-left: 1.25em; }
.legal li { margin-top: 8px; padding-left: 4px; }
.legal li::marker { color: var(--text-faint); }
.legal ul ul { margin-top: 8px; }
.legal .toc {
  margin-top: 36px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.legal .toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2 16em;
  column-gap: 32px;
  font-size: 15px;
}
.legal .toc li { margin: 0 0 6px; padding-left: 2px; break-inside: avoid; }
.legal .box {
  margin-top: 56px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(80px, 14vw, 160px); text-align: center; }
.notfound .code { color: var(--accent); font: 600 14px/1 var(--font-mono); letter-spacing: .12em; }
.notfound h1 { margin-top: 18px; font-size: clamp(32px, 4vw, 48px); }
.notfound p:not(.code) { margin-top: 14px; color: var(--text-muted); }
.notfound .actions { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: start;
}

.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand .brand-mark { width: 28px; height: 28px; margin-top: 2px; }
.footer-brand strong { color: var(--text); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }

.copyright { grid-column: 1 / -1; color: var(--text-faint); }

@media (max-width: 960px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Print ---------- */

@media print {
  .site-header { position: static; backdrop-filter: none; }
  .nav, .lang, .skip, .actions { display: none; }
  .section, .section-subtle { padding-block: 24px; background: none; }
  .regcard { box-shadow: none; }
  .contact-card { padding: 0; background: none; color: #000; }
  .contact-card .label, .contact-card p:not(.label), .contact-note a, .contact-list .k, .contact-list .v { color: #000; }
}
