/* ============================================================
   layout.css — header, footer, global section framing
   ============================================================ */

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 241, 0.86);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid rgba(220, 225, 221, 0.7);
}
.site-header__inner {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.site-header__brand { display: inline-flex; align-items: center; }
.site-header__logo { width: auto; height: 44px; }

.site-nav { display: flex; align-items: center; }
.site-nav__toggle { display: none; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
}
.site-nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 8px 2px;
  position: relative;
  transition: color 0.18s ease;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--navy);
  transition: width 0.2s ease;
}
.site-nav__link:hover { color: var(--navy); }
.site-nav__link:hover::after { width: 100%; }
.site-nav__item--cta { margin-left: 6px; }

/* mobile nav */
@media (max-width: 1023px) {
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy-deep);
  }
  .site-nav__toggle .tkg-icon { width: 20px; height: 20px; }
  .site-nav__toggle-close { display: none; }
  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-open { display: none; }
  .site-nav__toggle[aria-expanded="true"] .site-nav__toggle-close { display: block; }

  .site-nav__list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 8px var(--gutter) 20px;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .site-nav__list[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .site-nav__item { border-bottom: 1px solid var(--border); }
  .site-nav__link { display: block; padding: 15px 4px; font-size: 1.02rem; }
  .site-nav__link::after { display: none; }
  .site-nav__item--cta { margin: 16px 0 0; border-bottom: none; }
  .site-nav__item--cta .btn { width: 100%; }
}

.site-main { display: block; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 80px);
  padding-block: clamp(40px, 6vw, 64px);
}
.site-footer__brand { max-width: 420px; }
.site-footer__logo { width: auto; height: 50px; margin-bottom: 18px; }
.site-footer__address { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.9; }
.site-footer__contact { margin-top: 14px; font-size: 0.95rem; }
.site-footer__contact a { font-weight: 700; color: var(--navy-deep); }
.site-footer__contact span { color: var(--ink-soft); font-size: 0.88rem; }

.site-footer__nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
}
.site-footer__nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}
.site-footer__nav a:hover { color: var(--navy); }

.site-footer__copy {
  border-top: 1px solid var(--border);
  padding-block: 18px;
}
.site-footer__copy small { color: var(--ink-soft); font-size: 0.82rem; }

@media (max-width: 640px) {
  .site-footer__inner { flex-direction: column; gap: 28px; }
  .site-footer__nav ul { grid-template-columns: 1fr; }
}

/* ---------- shared section base ---------- */
/* Section rhythm any page can reuse: --section-y standard, --tight for
   dense lower bands (cta / trust). Tone/background stays page- or
   frame-level — this only owns vertical rhythm. */
.section {
  position: relative;
  padding-block: var(--section-y);
}
.section--tight { padding-block: var(--section-y-tight); }
.section .container { position: relative; z-index: 1; }

/* NOTE: the live home v5 header/footer skeleton lives in
   pages/home-sections/global-header.css and global-footer.css. It is
   intentionally NOT promoted here yet — those files double-bind with the
   .site-header / .site-footer rules above, so moving them risks the
   fixed/floating header and footer map. Promote to layout.css only after
   a second page (disability) proves the skeleton stable. */
