/* Site header (DS §7.1) — sticky, wordmark left, nav + utils right. */
@layer components {
  .pk-header {
    background: var(--pk-paper);
    border-bottom: 1px solid var(--pk-mist);
    position: sticky;
    top: 0;
    z-index: 20;
    transition: box-shadow 160ms ease;
  }

  /* The one shadow in the system: sticky header on scroll (DS §6 Elevation). */
  .pk-header.is-scrolled {
    box-shadow: 0 1px 0 var(--pk-mist);
  }

  .pk-header-inner {
    max-width: var(--pk-container-max);
    margin-inline: auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: var(--pk-space-4);
    min-height: 88px;
  }

  .pk-header-inner > .pk-header-utils {
    margin-left: auto;
  }

  .pk-wordmark {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
  }

  .pk-header-logo {
    display: block;
    height: 64px;
    width: auto;
  }

  /* Right-side utility cluster (phone, hamburger). Lives outside the
     collapsible nav so phone-to-call stays visible at every breakpoint. */
  .pk-header-utils {
    display: inline-flex;
    align-items: center;
    gap: var(--pk-space-2);
  }

  .pk-nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pk-font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--pk-marine);
    text-decoration: none;
    padding: 8px 10px;
    min-height: 44px;
    border-radius: var(--pk-radius-md);
    transition: background-color 160ms ease;
  }

  .pk-nav-phone:hover {
    background: var(--pk-marine-soft);
    color: var(--pk-marine-hover);
  }

  .pk-nav-phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .pk-nav-phone-number {
    display: none;
  }

  .pk-nav {
    display: none;
  }

  /* Hamburger — 44px touch target; transforms to a close (×) while open. */
  .pk-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
  }

  .pk-hamburger span {
    width: 22px;
    height: 2px;
    background: var(--pk-ink);
    transition: transform 200ms ease, opacity 200ms ease;
  }

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

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

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

  @media (min-width: 720px) {
    .pk-header-inner {
      padding: 14px 32px;
      min-height: 100px;
    }

    .pk-header-logo {
      height: 76px;
    }

    .pk-nav-phone-number {
      display: inline;
    }
  }

  @media (min-width: 1024px) {
    .pk-header-inner {
      padding: 16px 48px;
      min-height: 112px;
    }

    .pk-header-logo {
      height: 84px;
    }

    .pk-nav {
      display: flex;
      align-items: center;
      gap: var(--pk-space-5);
      font-size: var(--pk-text-small);
    }

    /* :not(.btn) keeps a future Contact button's own colors intact (DS §7.3
       specificity gotcha) — never let a container selector restyle .btn. */
    .pk-nav > a:not(.btn) {
      color: var(--pk-steel);
      text-decoration: none;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
    }

    .pk-nav > a:not(.btn):hover,
    .pk-nav > a:not(.btn)[aria-current="page"] {
      color: var(--pk-marine);
    }

    .pk-hamburger {
      display: none;
    }
  }
}
