/* ==========================================================================
   Fuller Living — Global Chrome (header + footer)
   --------------------------------------------------------------------------
   Sticky, calm header with an accessible mobile menu; a grounding navy footer
   that ends every page with "Grace in Progress." Mobile-first.
   ========================================================================== */

:root {
  --fl-header-h: 4.25rem;   /* 68px — keep in sync with header inner min-height */
}

@media (min-width: 1024px) {
  :root { --fl-header-h: 4.75rem; }
}

/* Full-width content wrapper (our page templates handle their own centering) */
.site-content { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: color-mix(in srgb, var(--fl-cream) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration-base) var(--ease-out),
              background-color var(--duration-base) var(--ease-out);
}
.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--fl-cream) 95%, transparent);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--fl-header-h);
  padding-block: var(--space-2xs);
}

/* --- Brand lockup --- */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  text-decoration: none;
  color: var(--color-heading);
}
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
  width: auto;
  height: 2.75rem;
  display: block;
}
.site-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.site-brand__word {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 1.3rem;
  color: var(--color-heading);
  white-space: nowrap;
}
.site-brand__tag {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fl-sage-strong);
}

/* --- Mobile toggle (hamburger → X) --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-heading);
}
.nav-toggle__box { position: relative; display: block; width: 22px; height: 15px; }
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}
.nav-toggle__bar { top: 50%; transform: translateY(-50%); }
.nav-toggle__bar::before { content: ""; top: -6.5px; }
.nav-toggle__bar::after { content: ""; top: 6.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }
.nav-toggle__label {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Navigation: mobile panel (default) --- */
.site-nav {
  position: fixed;
  top: var(--fl-header-h);
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--fl-header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-md) var(--container-pad) var(--space-xl);
  background-color: var(--fl-cream);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              visibility 0s linear var(--duration-base);
}
html.nav-open .site-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
html.nav-open { overflow: hidden; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
}
.site-nav__list li { margin: 0; }
.site-nav__list a {
  display: block;
  padding: var(--space-sm) var(--space-2xs);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.site-nav__list a:hover { color: var(--color-link); }
.site-nav__list .current-menu-item > a,
.site-nav__list a[aria-current="page"] { color: var(--color-link); }
.site-nav__cta {
  margin-top: var(--space-md);
  align-self: stretch;
}

/* --- Navigation: desktop --- */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav__list { flex-direction: row; align-items: center; gap: var(--space-2xs); }
  .site-nav__list a {
    position: relative;
    padding: var(--space-2xs) var(--space-xs);
    font-size: 0.975rem;
    white-space: nowrap;
    border-bottom: 0;
    border-radius: var(--radius-sm);
  }

  /* Header CTA lives in the mobile menu only; the desktop bar stays calm. */
  .site-nav__cta { display: none; }
  /* Gentle underline that grows on hover / current */
  .site-nav__list a::after {
    content: "";
    position: absolute;
    left: var(--space-xs);
    right: var(--space-xs);
    bottom: 0.15em;
    height: 2px;
    border-radius: 2px;
    background-color: var(--color-link);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--duration-base) var(--ease-out);
  }
  .site-nav__list a:hover::after,
  .site-nav__list .current-menu-item > a::after,
  .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

  .site-nav__cta { margin-top: 0; margin-left: var(--space-xs); align-self: auto; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-text-on-navy);
}
.site-footer a { color: var(--color-text-on-navy); }
.site-footer :focus-visible { outline-color: var(--fl-cream); }

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-block: var(--section-gap-tight);
}

.site-footer__word {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 1.6rem;
  color: var(--fl-cream);
}
.site-footer__tag {
  margin: var(--space-3xs) 0 var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fl-mauve);
}
.site-footer__blurb {
  max-width: 32ch;
  color: rgba(250, 248, 245, 0.8);
  font-size: var(--text-sm);
}
.site-footer__cta { margin-top: var(--space-xs); }

.site-footer__heading {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.7);
}
.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  max-width: none;
}
.site-footer__list a {
  text-decoration: none;
  color: rgba(250, 248, 245, 0.88);
  font-family: var(--font-ui);
  font-size: 0.975rem;
}
.site-footer__list a:hover { color: var(--fl-mauve); text-decoration: underline; text-underline-offset: 0.2em; }

/* Social */
.site-footer__social {
  display: flex;
  gap: var(--space-2xs);
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(250, 248, 245, 0.25);
  color: rgba(250, 248, 245, 0.9);
  transition: background-color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
}
.site-footer__social svg { width: 1.25rem; height: 1.25rem; }
.site-footer__social a:hover {
  background-color: var(--fl-teal);
  border-color: var(--fl-teal);
  color: #fff;
}

/* Bottom bar */
.site-footer__bottom { border-top: 1px solid rgba(250, 248, 245, 0.15); }
.site-footer__bottom-inner { padding-block: var(--space-lg); }
.site-footer__disclaimer {
  max-width: 60ch;
  margin: 0 0 var(--space-sm);
  color: rgba(250, 248, 245, 0.7);
  font-size: var(--text-sm);
}
.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.site-footer__copy {
  margin: 0;
  color: rgba(250, 248, 245, 0.7);
  font-size: var(--text-sm);
}
.site-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__legal-links a {
  color: rgba(250, 248, 245, 0.8);
  font-size: var(--text-sm);
  text-decoration: none;
}
.site-footer__legal-links a:hover { color: var(--fl-mauve); text-decoration: underline; text-underline-offset: 0.2em; }

@media (min-width: 640px) {
  .site-footer__top {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: var(--space-2xl);
  }
}
@media (min-width: 768px) {
  .site-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
  }
  .site-footer__disclaimer { order: 2; margin-bottom: 0; max-width: 46ch; }
  .site-footer__legal { order: 1; }
  .site-footer__legal-links { }
}
