.s-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  transition:
    box-shadow var(--transition-slow),
    background-color var(--transition-base),
    border-color var(--transition-base);
}

.s-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
}

.s-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-16);
  min-height: var(--header-height);
}

.s-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  color: var(--brand);
  font-weight: var(--fw-700);
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.s-header__brand:hover {
  opacity: 0.88;
}

.s-header__brand-icon {
  color: var(--brand);
  flex-shrink: 0;
}

.s-header__brand-text {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--brand);
  white-space: nowrap;
}

.s-header__nav {
  display: none;
  align-items: center;
  justify-self: center;
  gap: var(--space-32);
}

.s-header__nav-link {
  position: relative;
  padding: var(--space-4) 0;
  color: var(--text-dark);
  font-size: var(--fs-15);
  font-weight: var(--fw-500);
  line-height: 1.2;
  white-space: nowrap;
  transition: color var(--transition-base);
}

.s-header__nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.5rem;
  left: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-base);
}

.s-header__nav-link:hover {
  color: var(--brand);
}

.s-header__nav-link.is-active,
.s-header__nav-link[aria-current="location"] {
  color: var(--brand);
}

.s-header__nav-link.is-active::after,
.s-header__nav-link[aria-current="location"]::after {
  transform: scaleX(1);
}

.s-header__actions {
  display: none;
  align-items: center;
  gap: var(--space-20);
}

.s-header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  color: var(--brand);
  transition: opacity var(--transition-fast);
}

.s-header__phone:hover {
  opacity: 0.88;
}

.s-header__phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}

.s-header__phone-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
}

.s-header__phone-number {
  font-size: 1.0625rem;
  font-weight: var(--fw-700);
  line-height: 1.2;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.s-header__phone-note {
  font-size: var(--fs-12);
  line-height: 1.25;
  color: var(--text-gray);
}

.s-header__cta {
  flex-shrink: 0;
}

.s-header__phone-chip,
.s-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brand);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}

.s-header__phone-chip:hover,
.s-header__toggle:hover {
  border-color: var(--brand);
  background: var(--brand-050);
  box-shadow: var(--shadow-sm);
}

.s-header__phone-chip {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
}

.s-header__toggle {
  width: 2.75rem;
  height: 2.75rem;
}

/* Drawer */

.s-header__drawer-shell {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  visibility: hidden;
  pointer-events: none;
}

.s-header__drawer-shell.is-open {
  visibility: visible;
  pointer-events: auto;
}

.s-header__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.s-header__drawer-shell.is-open .s-header__overlay {
  opacity: 1;
}

.s-header__drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  width: min(20rem, calc(100vw - 1rem));
  height: 100dvh;
  padding: var(--space-24);
  background: var(--white);
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.s-header__drawer-shell.is-open .s-header__drawer {
  transform: translateX(0);
}

.s-header__drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.s-header__brand--drawer .s-header__brand-text {
  font-size: 1.125rem;
}

.s-header__drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: var(--white);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.s-header__drawer-close:hover {
  border-color: var(--brand);
  background: var(--brand-050);
  box-shadow: var(--shadow-sm);
}

.s-header__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.s-header__drawer-link {
  display: block;
  padding: 0.875rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.625rem;
  color: var(--text-dark);
  font-size: var(--fs-15);
  font-weight: var(--fw-500);
  line-height: 1.3;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.s-header__drawer-link:hover {
  background: var(--bg-main);
}

.s-header__drawer-link.is-active,
.s-header__drawer-link[aria-current="location"] {
  color: var(--brand);
  background: var(--bg-blue);
  border-color: #bfdbfe;
}

.s-header__drawer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: auto;
  padding-top: var(--space-24);
  border-top: 1px solid var(--border);
}

.s-header__drawer-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  color: var(--brand);
}

.s-header__drawer-cta {
  margin-top: var(--space-4);
}

@media (max-width: 47.99875rem) {
  .s-header__brand-text {
    font-size: 1.125rem;
  }

  .s-header__drawer {
    width: min(17.5rem, calc(100vw - 0.75rem));
    padding: var(--space-20);
  }
}

@media (min-width: 48rem) and (max-width: 64rem) {
  .s-header__inner {
    grid-template-columns: auto 1fr auto auto;
  }

  .s-header__phone-chip {
    display: inline-flex;
  }

  .s-header__drawer {
    width: 20rem;
  }
}

@media (min-width: 64.0625rem) {
  .s-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-32);
  }

  .s-header__nav {
    display: flex;
  }

  .s-header__actions {
    display: flex;
  }

  .s-header__phone-chip,
  .s-header__toggle,
  .s-header__drawer-shell {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s-header,
  .s-header__overlay,
  .s-header__drawer {
    transition: none !important;
  }
}