/* Shared site header. Markup: partials/header.html - injected by tools/header.py.
   Every page defines the same custom properties in its inline <style>; the
   fallbacks here keep the header correct if one ever does not. */

.pk-header {
  /* Explicit, not inherited: on a page whose body is a flex/grid container the
     header is a flex item and would otherwise shrink to its content width. */
  width: 100%;
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 240, 0.95);
  border-bottom: 1px solid var(--border, #E6DED1);
}
@supports (backdrop-filter: blur(10px)) {
  .pk-header { backdrop-filter: blur(10px); }
}
.pk-header-inner {
  position: relative;
  max-width: var(--max-w, 1140px); margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.pk-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700; line-height: 1;
  color: var(--navy, #1E3A5F); text-decoration: none; white-space: nowrap;
}
.pk-logo span { color: var(--accent, #C76F3D); }

/* Some pages carry a bare `nav { position: sticky; ... }` rule in their inline
   style from the old per-page header. Neutralise it for this one. */
.pk-header .pk-nav {
  position: static; background: none; backdrop-filter: none; border: 0;
  max-width: none; margin: 0; padding: 0; font-size: inherit;
  display: flex; align-items: center; gap: 1.6rem;
}
.pk-nav a {
  color: var(--text, #1A1A1A); text-decoration: none;
  font-weight: 500; font-size: 0.95rem; white-space: nowrap;
  padding: 0.3rem 0; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pk-nav a:hover { color: var(--accent, #C76F3D); }

/* selected page / section */
.pk-nav a.is-active {
  color: var(--accent, #C76F3D); font-weight: 600;
  border-bottom-color: var(--accent, #C76F3D);
}
.pk-nav a:focus-visible {
  outline: 2px solid var(--accent, #C76F3D); outline-offset: 3px; border-radius: 2px;
}

/* Must out-specify `.pk-nav a` (0,1,1) or the button inherits the plain link's
   colour and padding - hence `.pk-nav a.pk-cta` rather than `.pk-cta`. */
.pk-nav a.pk-cta {
  background: var(--accent, #C76F3D);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius, 10px);
  border-bottom: 0;
}
.pk-nav a.pk-cta:hover { background: var(--accent-dark, #A85826); color: #fff; }

/* --- mobile ------------------------------------------------------------- */
.pk-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.pk-burger { display: none; }

@media (max-width: 960px) {
  .pk-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 38px; padding: 0.5rem; cursor: pointer;
    margin-left: auto;
  }
  .pk-burger span {
    display: block; height: 2px; width: 100%;
    background: var(--navy, #1E3A5F); border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .pk-toggle:checked ~ .pk-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .pk-toggle:checked ~ .pk-burger span:nth-child(2) { opacity: 0; }
  .pk-toggle:checked ~ .pk-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .pk-toggle:focus-visible ~ .pk-burger { outline: 2px solid var(--accent, #C76F3D); outline-offset: 2px; }

  .pk-header .pk-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.25rem 1.5rem 1rem;
    background: var(--cream, #FAF6F0);
    border-bottom: 1px solid var(--border, #E6DED1);
    box-shadow: 0 12px 20px rgba(30, 58, 95, 0.08);
  }
  .pk-toggle:checked ~ .pk-nav { display: flex; }
  .pk-nav a {
    padding: 0.85rem 0; border-bottom: 1px solid var(--border, #E6DED1);
    font-size: 1rem;
  }
  .pk-nav a.is-active { border-bottom-color: var(--accent, #C76F3D); }
  .pk-nav a.pk-cta { margin-top: 0.9rem; text-align: center; border-bottom: 0; }
}
