/* =============================================================
   BayconAI — shared site chrome: skip link, header, nav, language
   pill, mobile menu, buttons, footer. Used by EVERY page.
   Markup is generated into each page by scripts/sync-chrome.mjs.
   Self-contained: does not rely on base.css resets.
   ============================================================= */

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 3000;
  background: #f3ecdf; color: #161210; padding: 12px 18px; border-radius: 8px;
  font: 500 16px/1.2 var(--font-body); text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 3px solid #e06a38; outline-offset: 2px; }

/* ---- header ------------------------------------------------- */
.bk-header, .bk-header *, .bk-footer, .bk-footer * { box-sizing: border-box; }
.bk-header {
  --hd-ink: #f3ecdf;
  --hd-ink-2: #d9ccb7;
  --hd-bg: #161210;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-height);
  padding: 0 clamp(16px, 4vw, 44px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.bk-header.is-past, .bk-header.is-solid {
  --hd-ink: #1c1815;
  --hd-ink-2: #4a4238;
  --hd-bg: #faf7f2;
  background: rgba(250, 247, 242, 0.96);
  border-bottom-color: #e6dccb;
}
@supports (backdrop-filter: blur(1px)) {
  .bk-header.is-past, .bk-header.is-solid { background: rgba(250, 247, 242, 0.88); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%); }
}
.bk-header.is-solid { position: sticky; }
.bk-header a { text-decoration: none; }

.bk-brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); flex: 0 0 auto; }
.bk-brand-mark { display: block; flex-shrink: 0; width: 36px; height: 36px; }
.bk-brand-text {
  font-family: var(--font-display); font-size: 23px; line-height: 1;
  letter-spacing: -0.01em; color: var(--hd-ink);
  transition: color var(--t-med) var(--ease);
}
.bk-brand-text em { font-style: normal; color: #e06a38; }
.bk-header.is-past .bk-brand-text em, .bk-header.is-solid .bk-brand-text em { color: #a8431f; }

.bk-header-right { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 22px); min-width: 0; }
.bk-nav { display: flex; gap: clamp(14px, 1.7vw, 24px); align-items: center; }
.bk-nav a {
  font-family: var(--font-body); font-size: 15px; line-height: 1.2;
  color: var(--hd-ink-2); padding: 12px 2px; min-height: var(--tap);
  display: inline-flex; align-items: center;
  transition: color var(--t-fast) var(--ease);
}
.bk-nav a:hover { color: var(--hd-ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: #e06a38; }
.bk-nav a[aria-current="page"] { color: var(--hd-ink); font-weight: 500; }
.bk-nav .bk-nav-cta {
  color: var(--hd-ink); font-weight: 500;
  border: 1px solid var(--hd-ink-2); border-radius: 999px;
  padding: 10px 18px; white-space: nowrap;
}
.bk-nav .bk-nav-cta:hover { border-color: #e06a38; text-decoration: none; }

/* language toggle pill */
.bk-lang-pill {
  display: flex; align-items: center; gap: 1px; flex: 0 0 auto;
  padding: 2px 3px;
  border: 1px solid var(--hd-ink-2); border-radius: 999px;
}
.bk-lang-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 44px; min-height: 40px; padding: 0 9px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--hd-ink-2); font: inherit; line-height: 1;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.bk-lang-btn:hover { color: var(--hd-ink); }
.bk-lang-btn.is-active { background: var(--hd-ink); color: var(--hd-bg); }
.bk-lang-flag { font-size: 14px; line-height: 1; }
.bk-lang-code { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.bk-lang-divider { width: 1px; height: 16px; background: var(--hd-ink-2); opacity: 0.45; flex-shrink: 0; }
@media (max-width: 480px) { .bk-lang-flag { display: none; } .bk-lang-btn { min-width: 40px; padding: 0 6px; } }

/* burger (shown only when JS is available and the nav collapses) */
.bk-burger {
  display: none; position: relative; width: var(--tap); height: var(--tap);
  background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--hd-ink); border-radius: 8px;
}
.bk-burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform var(--t-med) var(--ease), top var(--t-med) var(--ease);
}
.bk-burger span:nth-child(1) { top: 16px; }
.bk-burger span:nth-child(2) { top: 26px; }
.bk-burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.bk-burger[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* collapse the nav into a disclosure menu */
@media (max-width: 1100px) {
  .js .bk-burger { display: block; }
  .js .bk-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 12px clamp(16px, 4vw, 44px) 24px;
    background: #161210; border-bottom: 1px solid rgba(243, 236, 223, 0.2);
    max-height: calc(100vh - var(--header-height)); overflow-y: auto;
  }
  .js .bk-nav.is-open { display: flex; }
  .js .bk-nav a {
    font-family: var(--font-display); font-size: 24px; color: #f3ecdf;
    padding: 14px 0; border-bottom: 1px solid rgba(243, 236, 223, 0.12);
  }
  .js .bk-nav a:hover { color: #e06a38; }
  .js .bk-nav .bk-nav-cta { border: 0; border-radius: 0; color: #e06a38; font-style: italic; padding: 14px 0; }
  /* without JS there is no toggle: let the nav wrap under the brand */
  html:not(.js) .bk-header { position: absolute; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  html:not(.js) .bk-header.is-solid { position: relative; }
  html:not(.js) .bk-header-right { width: 100%; flex-wrap: wrap; }
  html:not(.js) .bk-nav { flex-wrap: wrap; gap: 0 18px; }
}

/* ---- buttons -------------------------------------------------- */
.bk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1.2;
  min-height: var(--tap); padding: 12px 22px;
  border: 1px solid var(--ink-1); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.bk-btn-primary { background: var(--ink-1); color: var(--ink-inv); }
.bk-btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff7ef; }
.bk-dark .bk-btn-primary:hover { color: #161210; }
.bk-btn-secondary { background: transparent; color: var(--ink-1); border-color: var(--control-border); }
.bk-btn-secondary:hover { border-color: var(--ink-1); }

/* ---- footer ---------------------------------------------------- */
.bk-footer {
  padding: clamp(48px, 7vw, 80px) clamp(16px, 4vw, 44px) 32px;
  background: #161210; color: #f3ecdf;
}
.bk-footer a { color: #d9ccb7; text-decoration: none; }
.bk-footer a:hover { color: #e06a38; text-decoration: underline; }
.bk-footer ul { list-style: none; margin: 0; padding: 0; }
.bk-footer-grid {
  max-width: var(--measure-page); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px 40px;
}
@media (max-width: 880px) { .bk-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bk-footer-grid { grid-template-columns: 1fr; } }
.bk-footer-brand { margin-bottom: 14px; }
.bk-footer-lockup { display: block; height: 40px; width: auto; }
.bk-footer a.bk-footer-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #f3ecdf; text-decoration: none; }
.bk-footer-logo img { display: block; width: 36px; height: 36px; }
.bk-footer-wordmark { font-family: var(--font-display); font-size: 24px; line-height: 1; letter-spacing: -0.01em; }
.bk-footer-wordmark em { font-style: normal; color: #e06a38; }
.bk-footer-tag { margin: 0; font-size: 15px; line-height: 1.55; color: #d9ccb7; max-width: 34ch; }
.bk-footer-id { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: #d9ccb7; max-width: 38ch; }
.bk-footer-id a { text-decoration: underline; text-underline-offset: 3px; }
.bk-footer-h {
  font: 500 13px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  color: #b9ab94; margin: 0 0 8px;
}
.bk-footer-list { display: flex; flex-direction: column; font-size: 15px; color: #d9ccb7; }
.bk-footer-list li { display: flex; }
.bk-footer-list a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 0; }
.bk-footer-list li:not(:has(a)) { padding: 6px 0; }
.bk-footer-meta {
  max-width: var(--measure-page); margin: 40px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(243, 236, 223, 0.14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  font-size: 13px; color: #b9ab94;
}
.bk-footer-meta p { margin: 0; max-width: none; color: inherit; font-size: inherit; }
