.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-charcoal-800);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-charcoal-900);
  color: var(--color-accent-400);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-charcoal-800);
  position: relative;
  padding-block: 0.4rem;
  transition: color var(--dur-fast) var(--ease-out);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-accent-500);
  transition: right var(--dur-mid) var(--ease-out);
  border-radius: var(--radius-pill);
}

.main-nav a:hover {
  color: var(--color-charcoal-900);
}

.main-nav a:hover::after {
  right: 0;
}

.main-nav a.is-active {
  color: var(--color-charcoal-900);
}

.main-nav a.is-active::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-charcoal-800);
  white-space: nowrap;
}

.header-phone svg {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-charcoal-900);
}

.header-phone .phone-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

.btn-quote-header {
  display: none;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  padding: 0;
  align-items: center;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--color-charcoal-900);
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  background: var(--color-charcoal-900);
  color: #fff;
  z-index: 600;
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--container-pad);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur-mid) var(--ease-out),
    visibility 0s linear var(--dur-mid);
}

.mobile-nav.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--dur-mid) var(--ease-out),
    visibility 0s linear 0s;
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.mobile-nav-close {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-md);
}

.mobile-nav-phone {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent-400);
}

/* Sticky mobile call bar.
   --mobile-call-bar-height is the single source of truth for this bar's
   height: both the bar itself (min-height, so it never renders shorter)
   and body's padding-bottom (so page content never sits under it) read
   the same variable. Change padding/font-size here freely — nothing
   needs to be kept in sync manually elsewhere. */
:root {
  --mobile-call-bar-height: 58px;
}

.mobile-call-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  min-height: var(--mobile-call-bar-height);
  background: var(--color-charcoal-900);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.mobile-call-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.mobile-call-bar .call-btn {
  background: var(--color-button);
  color: #fff;
}

.mobile-call-bar svg {
  width: 1.1rem;
  height: 1.1rem;
}

body {
  padding-bottom: var(--mobile-call-bar-height);
}

@media (min-width: 1080px) {
  .main-nav {
    display: block;
  }

  .header-phone {
    display: flex;
    flex-direction: column;
  }

  .btn-quote-header {
    display: inline-flex;
  }

  .hamburger {
    display: none;
  }

  .mobile-call-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* Belt-and-suspenders: hide the sticky call bar on any mouse-driven
   device, regardless of how narrow the browser window happens to be. */
@media (hover: hover) and (pointer: fine) {
  .mobile-call-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}
