/* ============================================================
   HBCL Site Chrome — Header + Footer
   Visually matches hummingbirdcarelink.ca WordPress root
   All values use tokens from hbcl-tokens.css
   ============================================================ */

/* ---- Header shell ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hbcl-white);
  box-shadow: 0 2px 8px var(--hbcl-border);
}

/* ---- Utility bar (hidden mobile, shown ≥769px) ---- */

.site-header__utility {
  display: none;
}

/* ---- Main nav bar ---- */

.site-header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1340px;
  margin: 0 auto;
}

.site-header__logo img {
  display: block;
  height: 52px; /* mobile: compact */
  width: auto;
  border-radius: 10px;
  object-fit: contain;
}

/* ---- Hamburger ---- */

.site-header__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hbcl-purple);
  padding: 0;
  border-radius: var(--hbcl-radius-sm);
  transition: background var(--site-transition);
}

.site-header__hamburger:hover,
.site-header__hamburger:focus-visible {
  background: var(--hbcl-surface-alt);
  outline: none;
}

.site-header__hamburger svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

/* ---- Mobile nav (slide-down) ---- */

.site-header__nav {
  display: none;
  background: var(--hbcl-white);
  border-top: 1px solid var(--hbcl-border);
}

.site-header--open .site-header__nav {
  display: block;
  animation: navSlideDown 0.22s ease;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-header__nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem;
}

.site-header__nav li {
  border-bottom: 1px solid var(--hbcl-border);
}

.site-header__nav li:last-child {
  border-bottom: none;
}

.site-header__nav a {
  display: block;
  padding: 0.85rem 1.25rem;
  font-family: var(--hbcl-font-display);
  font-size: 0.9375rem;
  color: var(--hbcl-text);
  text-decoration: none;
  min-height: 44px;
  transition: background var(--site-transition), color var(--site-transition);
}

.site-header__nav a:hover,
.site-header__nav a:focus-visible {
  background: var(--hbcl-surface-alt);
  color: var(--hbcl-purple);
  text-decoration: none;
  outline: none;
}

.site-header__nav a.active,
.site-header__nav a[aria-current="page"] {
  color: var(--hbcl-purple);
  border-left: 3px solid var(--hbcl-purple);
  padding-left: calc(1.25rem - 3px);
}

.site-header__nav a.nav-cta {
  background: var(--hbcl-rose);
  color: var(--hbcl-white);
  font-weight: 700;
  border-radius: var(--hbcl-radius-btn);
  margin: 0.5rem 1rem;
  padding: 0.6rem 1.25rem;
  text-align: center;
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .site-header--open .site-header__nav {
    animation: none;
  }
}

/* Mobile nav email row */
.nav-email-display {
  padding: 0.5rem 1.25rem 0;
  font-size: 0.8125rem;
  opacity: 0.8;
}
.nav-email-link {
  color: inherit;
  text-decoration: none;
  word-break: break-all;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

/* ---- Desktop overrides (≥769px) ---- */

@media (min-width: 769px) {

  /* Utility bar */
  .site-header__utility {
    display: block;
    background: linear-gradient(120deg, var(--hbcl-purple-soft) 0%, var(--hbcl-rose) 100%);
    color: var(--hbcl-white);
    font-family: var(--hbcl-font-display);
    font-size: 0.8125rem;
  }

  .site-header__utility-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0.45rem 1.5rem;
  }

  .site-header__util-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }

  .site-header__util-center {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    white-space: nowrap;
  }

  .site-header__util-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    justify-content: flex-end;
  }

  .util-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--hbcl-white);
    font-family: var(--hbcl-font-display);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .util-item:hover,
  .util-item:focus-visible {
    color: var(--hbcl-white);
    text-decoration: underline;
    outline: none;
  }

  .util-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: currentColor;
  }

  /* Logged-in email chip — truncate gracefully */
  .util-item--email {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }

  .util-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hbcl-purple-soft);
    color: var(--hbcl-white);
    text-decoration: none;
    transition: background var(--site-transition);
    flex-shrink: 0;
  }

  .util-social:hover,
  .util-social:focus-visible {
    background: var(--hbcl-purple-mid);
    color: var(--hbcl-white);
    text-decoration: none;
    outline: none;
  }

  .util-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }

  /* Main nav bar */
  .site-header__hamburger {
    display: none;
  }

  .site-header__main {
    background: var(--hbcl-lavender);
    min-height: 121px;
    padding: 0 1.625rem;
    max-width: 1340px;
    margin: 0 auto;
  }

  .site-header__logo img {
    height: 96px;
    border-radius: 10px;
    object-fit: contain;
  }

  .site-header__nav {
    display: flex;
    align-items: center;
    background: none;
    border-top: none;
  }

  .site-header__nav ul {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0;
  }

  .site-header__nav li {
    border-bottom: none;
  }

  .site-header__nav a {
    padding: 0.5rem 1rem;
    font-family: var(--hbcl-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--hbcl-purple);
    border-radius: var(--hbcl-radius-sm);
    position: relative;
    min-height: unset;
  }

  .site-header__nav a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--hbcl-purple);
    transform: scaleX(0);
    transition: transform var(--site-transition);
    border-radius: 2px;
  }

  .site-header__nav a:hover::after,
  .site-header__nav a:focus-visible::after,
  .site-header__nav a.active::after,
  .site-header__nav a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .site-header__nav a.active,
  .site-header__nav a[aria-current="page"] {
    color: var(--hbcl-purple);
    border-left: none;
    padding-left: 1rem;
  }

  .site-header__nav a:hover,
  .site-header__nav a:focus-visible {
    background: var(--hbcl-surface-alt);
    color: var(--hbcl-purple);
  }

  .site-header__nav a.nav-cta {
    background: var(--hbcl-rose);
    color: var(--hbcl-white);
    border-radius: var(--hbcl-radius-btn);
    padding: 0.45rem 1.1rem;
    font-weight: 700;
    box-shadow: var(--hbcl-shadow-btn);
    margin: 0;
    min-height: unset;
    text-align: unset;
  }

  .site-header__nav a.nav-cta::after {
    display: none;
  }

  .site-header__nav a.nav-cta:hover,
  .site-header__nav a.nav-cta:focus-visible {
    background: var(--hbcl-rose-dark);
    color: var(--hbcl-white);
  }
}

/* ---- Footer ---- */

.site-footer {
  background: var(--hbcl-purple) !important;
  color: var(--hbcl-white);
  font-family: var(--hbcl-font-display);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* WP-matching background image overlay at 10% opacity */
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('https://hummingbirdcarelink.ca/wp-content/uploads/2024/09/Walking-Program.png');
  background-size: cover;
  background-position: top center;
  opacity: 0.1;
  pointer-events: none;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 769px) {
  .site-footer__inner {
    grid-template-columns: 43.58fr 32.13fr 25fr;
    gap: 3rem;
    padding-top: 3.5rem;
  }
}

.site-footer__logo-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.site-footer__logo {
  width: 45%;
  max-height: 86px;
  height: auto;
  display: block;
}

.site-footer__tagline {
  font-family: var(--hbcl-font-display);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--hbcl-lavender);
  margin: 0 0 1.5rem;
  max-width: 30ch;
}

.site-footer__socials {
  display: flex;
  gap: 0.3125rem;
  flex-wrap: wrap;
}

.site-footer__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--hbcl-purple-soft);
  color: var(--hbcl-white);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.site-footer__social-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.site-footer__social-btn:hover,
.site-footer__social-btn:focus-visible {
  background: var(--hbcl-purple-mid);
  transform: translateY(-1px);
}

.site-footer__social-btn:focus-visible {
  outline: 2px solid var(--hbcl-rose);
  outline-offset: 2px;
}

/* Contact + Resources column shared styles */
.site-footer__col-heading {
  font-family: var(--hbcl-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hbcl-lavender);
  margin: 0 0 0.5rem;
}

.site-footer__divider {
  width: 111px;
  height: 3px;
  background: var(--hbcl-purple-soft);
  border: none;
  margin: 0 0 1.25rem;
}

/* Icon list (Contact col) */
.site-footer__icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--hbcl-font-display);
  color: var(--hbcl-lavender);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.site-footer__icon-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  fill: var(--hbcl-purple-soft);
}

/* Nav list (Resources col) */
.site-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-footer__nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  min-height: 44px;
  font-family: var(--hbcl-font-display);
  font-size: 0.9375rem;
  color: var(--hbcl-lavender);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__nav-list a svg {
  fill: var(--hbcl-purple-soft);
  flex-shrink: 0;
}

.site-footer__nav-list a:hover,
.site-footer__nav-list a:focus-visible {
  color: var(--hbcl-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__nav-list a:focus-visible {
  outline: 2px solid var(--hbcl-rose);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Bottom bar */
.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  padding: 1rem 1.25rem;
  position: relative;
  z-index: 1;
}

.site-footer__bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('https://hummingbirdcarelink.ca/wp-content/uploads/2024/09/Walking-Program.png');
  background-size: cover;
  background-position: top center;
  opacity: 0.1;
  pointer-events: none;
}

.site-footer__bar p {
  margin: 0;
  font-family: var(--hbcl-font-display);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--hbcl-lavender);
  position: relative;
  z-index: 1;
}
