/* ════════════════════════════════════════════════════
   KAIZEN TUITION — GLOBAL HEADER + FOOTER
   Shared across every page. Depends on the :root design
   tokens defined in <style id="gl-design-system-variables">
   (see design-system.html / CLAUDE.md) — load this file
   AFTER the token block.
   Mobile-first. BEM blocks: .site-header, .site-footer.
════════════════════════════════════════════════════ */

/* ── Focus styles (accessible, used everywhere) ───────────── */
.site-header a:focus-visible,
.site-header button:focus-visible,
.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in oklch, var(--bg-light) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--border-light);
}

.site-header__inner {
  width: 100%;
  max-inline-size: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}

.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-header__logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* Pale-peach pill nav bar — desktop only */
.site-header__nav {
  display: none;
}
.site-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: var(--space-xs);
  background: var(--secondary-light);
  border-radius: 999px;
}
.site-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6em 1.2em;
  border-radius: 999px;
  font-family: var(--text-font-family);
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.site-header__nav-link:hover {
  background: var(--bg-light);
  color: var(--primary-semi-dark);
}
.site-header__nav-link[aria-current="page"] {
  background: var(--primary-semi-dark);
  color: var(--white);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  flex-shrink: 0;
}

.site-header__actions .site-header__cta {
  display: none; /* shown at desktop breakpoint — extra-specific selector so
                     this reliably beats .btn's display:inline-flex regardless
                     of stylesheet load order */
}

/* Mobile menu toggle — accessible button */
.site-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-light);
  cursor: pointer;
  flex-shrink: 0;
}
.site-header__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.site-header__mobile-panel {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-s) var(--gutter) var(--space-m);
  background: var(--bg-light);
  border-bottom: var(--border-light);
}
.site-header__mobile-panel.is-open {
  display: flex;
}
.site-header__mobile-link {
  display: block;
  padding: var(--space-s) var(--space-s);
  border-radius: var(--radius);
  font-family: var(--text-font-family);
  font-size: var(--text-m);
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  background: var(--secondary-ultra-light);
}
.site-header__mobile-link[aria-current="page"] {
  background: var(--primary-semi-dark);
  color: var(--white);
}
.site-header__mobile-cta {
  margin-top: var(--space-xs);
  justify-content: center;
}

@media (min-width: 900px) {
  .site-header__nav { display: block; }
  .site-header__actions .site-header__cta { display: inline-flex; }
  .site-header__toggle { display: none; }
  .site-header__mobile-panel { display: none !important; }
}

/* ════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════ */

.site-footer {
  background: var(--base);
  color: var(--text-light-muted);
  padding-block: var(--space-xxl-to-xl) var(--space-m);
  padding-inline: var(--gutter);
}

.site-footer__inner {
  width: 100%;
  max-inline-size: var(--content-width);
  margin-inline: auto;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}

.site-footer__logo img {
  height: 32px;
  width: auto;
  display: block;
  /* logo is drawn in brand orange on transparent bg — safe on dark footer */
}

.site-footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__nav-link {
  font-family: var(--text-font-family);
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--text-light-muted);
  text-decoration: none;
}
.site-footer__nav-link:hover {
  color: var(--text-light);
}

.site-footer__socials {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-dark);
  color: var(--text-light);
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.site-footer__social-link:hover {
  background: var(--primary-semi-dark);
  border-color: var(--primary-semi-dark);
}
.site-footer__social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer__divider {
  border: none;
  border-top: var(--border-dark);
  margin-block: var(--space-m);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--text-light-muted);
}
.site-footer__bottom a {
  color: var(--text-light-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer__bottom a:hover {
  color: var(--text-light);
}

@media (min-width: 700px) {
  .site-footer__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
