/* BufferMint shared chrome: type scale, buttons, header and footer. Every site loads it after
   tokens.css and renders dist/chrome/header.html and footer.html, so both look the same.
   Classes are prefixed bm- and reset what they need, so they hold up inside Bootstrap pages too. */
:root {
  --bm-container: 1200px;
  --bm-gutter: 16px;
  --bm-text-xs: 0.8125rem;
  --bm-text-sm: 0.875rem;
  --bm-text-base: 1rem;
  --bm-text-lg: 1.125rem;
  --bm-text-xl: 1.25rem;
  --bm-h3: 1.125rem;
  --bm-h2: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  --bm-h1: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --bm-display: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  --bm-leading: 1.55;
  --bm-footer-bg: #0C1D1D;
  --bm-footer-fg: #C9DCDE;
  --bm-footer-head: #FAFCFC;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bm-footer-bg: #081414; }
}
:root[data-theme="dark"] { --bm-footer-bg: #081414; }

.bm-container { max-width: var(--bm-container); margin: 0 auto; padding: 0 var(--bm-gutter); }

/* buttons */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.125rem; border: 1px solid transparent; border-radius: var(--bm-radius-md);
  font: 600 var(--bm-text-base)/1.25 var(--bm-font-sans); text-decoration: none !important;
  cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s;
}
.bm-btn:focus-visible, .bm-icon-btn:focus-visible, .bm-nav a:focus-visible, .bm-footer a:focus-visible {
  outline: 2px solid var(--bm-highlight); outline-offset: 2px;
}
.bm-btn-primary { background: var(--bm-accent); color: var(--bm-accent-fg) !important; }
.bm-btn-primary:hover { background: var(--bm-accent-hover); color: var(--bm-accent-fg); }
.bm-btn-secondary { background: transparent; color: var(--bm-accent) !important; border-color: var(--bm-line); }
.bm-btn-secondary:hover { border-color: var(--bm-accent); }
.bm-btn-sm { padding: .45rem .85rem; font-size: var(--bm-text-sm); }
.bm-btn-lg { padding: .8rem 1.4rem; font-size: var(--bm-text-lg); }

/* header */
.bm-header {
  position: relative; z-index: 50; background: var(--bm-bg); color: var(--bm-fg);
  border-bottom: 1px solid var(--bm-line); font-family: var(--bm-font-sans);
}
.bm-header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.bm-logo { display: inline-flex; flex: none; }
.bm-logo img { height: 24px; width: auto; display: block; }
.bm-logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bm-logo-light { display: none !important; }
  :root:not([data-theme="light"]) .bm-logo-dark { display: block !important; }
}
:root[data-theme="dark"] .bm-logo-light { display: none !important; }
:root[data-theme="dark"] .bm-logo-dark { display: block !important; }
.bm-nav { display: flex; gap: .25rem; margin: 0 auto 0 1rem; }
.bm-nav a {
  padding: .5rem .75rem; border-radius: var(--bm-radius-sm); color: var(--bm-fg);
  font-weight: 500; font-size: var(--bm-text-base); line-height: 1.5; text-decoration: none;
}
.bm-nav a:hover { color: var(--bm-accent); background: var(--bm-bg-alt); text-decoration: none; }
.bm-nav a[aria-current="page"] { color: var(--bm-accent); }
.bm-header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.bm-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  padding: 0; border: 1px solid var(--bm-line); border-radius: var(--bm-radius-md);
  background: transparent; color: var(--bm-fg); cursor: pointer; flex: none; min-height: 0;
}
.bm-icon-btn:hover { color: var(--bm-accent); border-color: var(--bm-accent); }
.bm-menu { display: none; }
@media (max-width: 859px) {
  .bm-header-in { gap: .75rem; }
  .bm-menu { display: inline-flex; }
  .bm-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: .5rem var(--bm-gutter) 1rem;
    background: var(--bm-bg); border-bottom: 1px solid var(--bm-line); box-shadow: var(--bm-shadow-md);
  }
  .bm-header.open .bm-nav { display: flex; }
  .bm-nav a { padding: .75rem .5rem; border-bottom: 1px solid var(--bm-line); border-radius: 0; }
  .bm-nav a:last-child { border-bottom: 0; }
}
/* phones: the logo, theme button, CTA and menu button must fit inside the gutters (320px and up) */
@media (max-width: 859px) { .bm-header .bm-btn { min-height: 40px; } }
@media (max-width: 399px) {
  .bm-header-in, .bm-header-actions { gap: .375rem; }
  .bm-header .bm-btn { padding: .45rem .65rem; }
}
@media (max-width: 374px) { .bm-logo img { height: 22px; } }
@media (max-width: 359px) {
  .bm-logo img { height: 18px; }
  .bm-header .bm-btn { padding: .45rem .5rem; min-height: 36px; }
  .bm-header .bm-icon-btn { width: 36px; height: 36px; }
}

/* footer: dark in both schemes */
.bm-footer {
  background: var(--bm-footer-bg); color: var(--bm-footer-fg); font-family: var(--bm-font-sans);
  font-size: var(--bm-text-sm); line-height: var(--bm-leading); padding: 3rem 0 2rem;
}
.bm-footer a { color: var(--bm-footer-fg); text-decoration: none; }
.bm-footer a:hover { color: var(--bm-footer-head); text-decoration: underline; }
.bm-footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bm-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .bm-footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.bm-footer-brand img { height: 24px; width: auto; display: block; margin-bottom: .75rem; }
.bm-footer-brand p { margin: 0 0 1rem; max-width: 32ch; font-size: var(--bm-text-base); }
.bm-footer h2 {
  margin: 0 0 .75rem; color: var(--bm-footer-head); font: 600 var(--bm-text-sm)/1.3 var(--bm-font-sans);
  letter-spacing: .04em; text-transform: uppercase;
}
.bm-footer ul { list-style: none; margin: 0; padding: 0; }
.bm-footer li { margin: 0 0 .5rem; }
.bm-social { display: flex; gap: 1rem; }
.bm-social a { display: inline-flex; }
/* touch: footer links get a full-height tap target instead of one line of 14px text */
@media (max-width: 859px), (pointer: coarse) {
  .bm-footer li { margin: 0; }
  .bm-footer li a { display: inline-block; padding: .6rem 0; }
  .bm-social { gap: 0; margin-left: -12px; }
  .bm-social a { padding: 12px; }
  .bm-footer-legal a { display: inline-block; padding: .5rem 0; }
}
.bm-footer-legal {
  margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(201, 220, 222, .18);
  display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: var(--bm-text-xs);
}
