/* Header + hero (Salem Business) */
:root {
  --sb-navy: #001f3f;
  --sb-navy-2: #0a2d52;
  --sb-gold: #b8860b;
  --sb-ink: #0f172a;
  --sb-muted: #475569;
  --sb-line: #e5e7eb;
  --sb-soft: #f1f5f9;
  --sb-nav-h: 64px;
  --sb-gutter: 16px;
}
@media (min-width: 768px) {
  :root { --sb-nav-h: 76px; --sb-gutter: 24px; }
}

.sb-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sb-gutter);
}

/* ---------- Buttons ---------- */
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.sb-btn:focus-visible { outline: 2px solid var(--sb-gold); outline-offset: 2px; }
.sb-btn__icon { width: 16px; height: 16px; transition: transform .2s ease; }
.sb-btn:hover .sb-btn__icon { transform: translateX(2px); }
.sb-btn--gold { background: var(--sb-navy); color: #fff; }
.sb-btn--gold:hover { background: var(--sb-navy-2); }
.sb-btn--block { width: 100%; height: 50px; }

/* ---------- Header ---------- */
.sb-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--sb-line);
}
.sb-nav__inner {
  height: var(--sb-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sb-nav__brand { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 8px; }
.sb-nav__brand:focus-visible { outline: 2px solid var(--sb-gold); outline-offset: 4px; }
/* logo.png has ~16% white margin on the left, so the negative margin lines the artwork up with the page edge */
.sb-logo { --sb-logo-h: 56px; height: var(--sb-logo-h); width: auto; max-width: none; display: block; margin-left: calc(var(--sb-logo-h) * -.167); mix-blend-mode: multiply; filter: brightness(1.02); }
@media (min-width: 768px) { .sb-logo { --sb-logo-h: 68px; } }

.sb-nav__links { display: none; align-items: center; gap: 4px; }
@media (min-width: 768px) { .sb-nav__links { display: flex; } }
.sb-nav__link {
  position: relative;
  padding: 10px 12px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--sb-muted);
  text-decoration: none;
  transition: color .2s ease;
}
@media (min-width: 1024px) { .sb-nav__link { padding: 10px 18px; } }
.sb-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--sb-gold);
  transform: scaleX(0);
  transition: transform .25s ease;
}
@media (min-width: 1024px) { .sb-nav__link::after { left: 18px; right: 18px; } }
.sb-nav__link:hover { color: var(--sb-ink); }
.sb-nav__link:hover::after { transform: scaleX(1); }
.sb-nav__link.is-active { color: var(--sb-navy); font-weight: 700; }
.sb-nav__link.is-active::after { transform: scaleX(1); }
.sb-nav__link:focus-visible { outline: 2px solid var(--sb-gold); outline-offset: 2px; border-radius: 6px; }

.sb-nav__actions { display: flex; align-items: center; gap: 12px; }
.sb-nav__phone {
  display: none;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
  border-right: 1px solid var(--sb-line);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--sb-ink);
  text-decoration: none;
}
.sb-nav__phone:hover { color: var(--sb-gold); }
.sb-nav__phone svg { width: 16px; height: 16px; color: var(--sb-gold); }
@media (min-width: 1200px) { .sb-nav__phone { display: inline-flex; } }
.sb-nav__cta { height: 38px; padding: 0 14px; font-size: 13px; }
@media (min-width: 768px) { .sb-nav__cta { height: 42px; padding: 0 20px; font-size: 14px; } }
.sb-hide-xs { display: none; }
@media (min-width: 400px) { .sb-hide-xs { display: inline; } }

.sb-nav__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--sb-ink);
  background: #fff;
  border: 1px solid var(--sb-line);
  transition: background-color .2s ease;
}
.sb-nav__burger:hover { background: var(--sb-soft); }
@media (min-width: 768px) { .sb-nav__burger { display: none; } }

/* ---------- Mobile drawer ---------- */
.sb-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.sb-drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.sb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(86vw, 360px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--sb-line);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility .35s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sb-drawer.is-open { transform: translateX(0); visibility: visible; }
.sb-drawer__head {
  height: var(--sb-nav-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sb-gutter);
  border-bottom: 1px solid var(--sb-line);
}
.sb-drawer__links { display: flex; flex-direction: column; padding: 12px var(--sb-gutter); }
.sb-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--sb-line);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--sb-ink);
  text-decoration: none;
}
.sb-drawer__link:hover { color: var(--sb-navy); }
.sb-drawer__link.is-active { color: var(--sb-gold); font-weight: 700; }
.sb-drawer__chev { width: 18px; height: 18px; opacity: .45; }
.sb-drawer__foot {
  margin-top: auto;
  padding: 20px var(--sb-gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--sb-soft);
}
.sb-drawer__contact {
  display: flex;
  justify-content: center;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  color: var(--sb-muted);
  text-decoration: none;
}
.sb-drawer__contact:hover { color: var(--sb-navy); }

/* ---------- Hero ----------
   Images are 4096 wide x 1365-1399 tall. The box uses the tallest (4096x1399) so every
   slide fills the full width with no crop; shorter slides leave a few px top/bottom,
   filled by a blurred copy of the same image. Never taller than the space under the header. */
.sb-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4096 / 1399;
  max-height: calc(100vh - var(--sb-nav-h));
  max-height: calc(100svh - var(--sb-nav-h));
  overflow: hidden;
  background: var(--sb-soft);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.sb-hero__slide { position: absolute; inset: 0; }
.sb-hero__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.05);
  pointer-events: none;
}
.sb-hero__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.sb-hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 999px;
  color: var(--sb-ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--sb-line);
  opacity: 0;
  transition: opacity .25s ease, background-color .2s ease;
}
.sb-hero__arrow svg { width: 20px; height: 20px; }
.sb-hero__arrow--prev { left: 20px; }
.sb-hero__arrow--next { right: 20px; }
.sb-hero__arrow:hover { background: #fff; }
.sb-hero:hover .sb-hero__arrow,
.sb-hero__arrow:focus-visible { opacity: 1; }
@media (min-width: 768px) { .sb-hero__arrow { display: inline-flex; } }
@media (hover: none) { .sb-hero__arrow { display: none; } }

.sb-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .35);
}
@media (min-width: 768px) { .sb-hero__dots { bottom: 20px; gap: 8px; padding: 7px 10px; } }
.sb-hero__dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .55);
  transition: width .4s ease, background-color .2s ease;
}
@media (min-width: 768px) { .sb-hero__dot { width: 8px; height: 8px; } }
.sb-hero__dot:hover { background: #fff; }
.sb-hero__dot.is-active { width: 28px; background: rgba(255, 255, 255, .45); }
.sb-hero__dot-fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  animation: sb-progress 6s linear forwards;
}
.sb-hero__dot-fill.is-paused { animation-play-state: paused; }
@keyframes sb-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .sb-drawer, .sb-drawer-backdrop, .sb-btn, .sb-hero__dot, .sb-nav__link::after { transition: none; }
}

/* ---------- Stats (below hero) ---------- */
.sb-stats {
  background: var(--sb-navy);
  padding: 28px 0;
}
@media (min-width: 768px) { .sb-stats { padding: 56px 0; } }
.sb-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 1024px) { .sb-stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.sb-stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
@media (min-width: 768px) { .sb-stat { flex-direction: row; align-items: center; gap: 16px; padding: 22px; border-radius: 16px; } }
.sb-stat__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #d4a017;
  background: rgba(212, 160, 23, .12);
}
.sb-stat__icon svg { width: 18px; height: 18px; }
@media (min-width: 768px) { .sb-stat__icon { width: 48px; height: 48px; border-radius: 12px; } .sb-stat__icon svg { width: 22px; height: 22px; } }
.sb-stat__body { min-width: 0; }
.sb-stat__num {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .sb-stat__num { font-size: 36px; } }
.sb-stat__label {
  margin: 4px 0 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, .65);
}
@media (min-width: 768px) { .sb-stat__label { font-size: 14px; } }
