/* ═══════════════════════════════════════════════════════════
   Chauncey Header & Footer v2.0.0
   Toggle fix: uses visibility/opacity NOT display toggle
   All design tokens live in inline CSS vars on the element
═══════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────── */
.chf-header *, .chf-header *::before, .chf-header *::after,
.chf-footer *, .chf-footer *::before, .chf-footer *::after,
.chf-mobile-nav *, .chf-mobile-nav *::before, .chf-mobile-nav *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.chf-header a, .chf-footer a, .chf-mobile-nav a {
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.chf-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--chf-cream, #FAF8F4);
  border-bottom: 1px solid var(--chf-header-border, #E3DBD5);
  height: var(--chf-header-h, 72px);
  transition: box-shadow .25s ease;
  -webkit-font-smoothing: antialiased;
}
.chf-header.chf-scrolled {
  box-shadow: 0 2px 20px rgba(45,42,39,.09);
}
.chf-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5.5vw, 72px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.chf-logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  line-height: 1;
}
.chf-logo-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: var(--chf-logo-name-sz, 18px);
  font-weight: 400;
  color: var(--chf-logo-name-c, #2D2A27);
  letter-spacing: 0.01em;
  display: block;
  line-height: 1.1;
}
.chf-logo-sub {
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-logo-sub-sz, 9px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chf-logo-sub-c, #B87059);
  display: block;
}

/* Nav */
.chf-nav-wrap { flex: 1; display: flex; justify-content: center; }
.chf-nav {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  flex-wrap: nowrap;
}
.chf-nav li { position: relative; }
.chf-nav-link {
  display: flex;
  align-items: center;
  padding: 0 clamp(0.5rem, 0.8vw, 1rem);
  height: var(--chf-header-h, 72px);
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-nav-sz, 12px);
  font-weight: 400;
  letter-spacing: var(--chf-nav-sp, 0.1em);
  text-transform: uppercase;
  color: var(--chf-nav-c, #2D2A27);
  transition: color .2s;
  white-space: nowrap;
  position: relative;
}
.chf-nav-link:hover  { color: var(--chf-nav-hover, #B87059); }
.chf-nav-link.chf-active { color: var(--chf-nav-active, #B87059); }
.chf-nav-link.chf-active::after {
  content: '';
  position: absolute;
  bottom: 0; left: clamp(0.5rem,.8vw,1rem); right: clamp(0.5rem,.8vw,1rem);
  height: 2px;
  background: var(--chf-nav-active, #B87059);
  border-radius: 1px;
}

/* Book button */
.chf-book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--chf-book-bg, #B87059);
  color: var(--chf-book-c, #fff);
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-book-sz, 12px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  border-radius: var(--chf-book-r, 2px);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .2s;
}
.chf-book-btn:hover {
  background: var(--chf-book-hover, #A35E49);
  color: var(--chf-book-c, #fff);
}

/* Burger — fully reset to beat Elementor's global button styles */
.chf-burger,
.chf-header .chf-burger,
button.chf-burger {
  display: none !important;           /* Hidden on desktop by default */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px !important;
  height: 40px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px !important;
  margin: 0 !important;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}
.chf-burger:hover,
.chf-header .chf-burger:hover {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
.chf-burger:focus,
.chf-header .chf-burger:focus {
  background: transparent !important;
  outline: 2px solid var(--chf-book-bg, #B87059);
  outline-offset: 2px;
  box-shadow: none !important;
}
.chf-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--chf-burger-c, #2D2A27);
  border-radius: 2px;
  transition: transform .28s ease, opacity .28s ease;
  transform-origin: center;
}
.chf-burger.chf-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.chf-burger.chf-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.chf-burger.chf-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════
   MOBILE NAV — visibility-based toggle (NOT display toggle)
   This prevents Elementor CSS from breaking the animation
══════════════════════════════════════════════════════════ */
.chf-mobile-nav {
  /* Always rendered as flex — controlled via visibility */
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: var(--chf-header-h, 72px);
  left: 0; right: 0; bottom: 0;
  background: var(--chf-drawer-bg, #FAF8F4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem clamp(20px, 5.5vw, 72px) 4rem;
  z-index: 999;
  /* Hidden state — !important to override Elementor */
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  -webkit-font-smoothing: antialiased;
}
.chf-mobile-nav.chf-open,
.elementor .chf-mobile-nav.chf-open,
.elementor-section .chf-mobile-nav.chf-open {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s !important;
}
.chf-mob-link {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(45,42,39,.08);
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-mob-link-sz, 14px);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chf-mob-link-c, #2D2A27);
  transition: color .18s;
}
.chf-mob-link:hover { color: var(--chf-book-bg, #B87059); }
.chf-mob-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 2rem;
  background: var(--chf-book-bg, #B87059);
  color: var(--chf-book-c, #fff);
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-mob-link-sz, 14px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: var(--chf-book-r, 2px);
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.chf-mob-book:hover {
  background: var(--chf-book-hover, #A35E49);
  color: var(--chf-book-c, #fff);
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.chf-footer {
  background: var(--chf-footer-bg, #2D2A27);
  color: var(--chf-footer-logo-c, #FAF8F4);
  -webkit-font-smoothing: antialiased;
}

.chf-footer-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px,8vw,88px) clamp(20px,5.5vw,72px);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(2rem,4vw,4rem);
  align-items: start;
}

.chf-footer-logo {
  display: inline-block;
  margin-bottom: 1.2rem;
}
.chf-footer-logo-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: var(--chf-footer-logo-sz, 20px);
  font-weight: 400;
  color: var(--chf-footer-logo-c, #FAF8F4);
  line-height: 1.15;
  display: block;
}
.chf-footer-logo-sub {
  font-family: 'Jost', sans-serif;
  font-size: calc( var(--chf-footer-col-h-sz, 10px) - 2px );
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chf-footer-sub-c, rgba(237,216,204,0.6));
  display: block;
  margin-top: 2px;
}
.chf-footer-tagline {
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-footer-link-sz, 13px);
  color: var(--chf-footer-tag-c, rgba(250,248,244,0.48));
  line-height: 1.75;
  max-width: 240px;
  margin-bottom: 1.6rem;
}
.chf-footer-locs {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.chf-footer-loc {
  font-family: 'Jost', sans-serif;
  font-size: calc( var(--chf-footer-link-sz, 13px) - 1px );
  color: var(--chf-footer-loc-c, rgba(250,248,244,0.45));
  line-height: 1.6;
  font-weight: 300;
}
.chf-footer-loc strong {
  display: block;
  font-size: var(--chf-footer-col-h-sz, 10px);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--chf-footer-loc-h-c, rgba(237,216,204,0.55));
  margin-bottom: 2px;
  font-family: 'Jost', sans-serif;
}
.chf-footer-col h4 {
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-footer-col-h-sz, 10px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chf-footer-col-h-c, #B87059);
  margin-bottom: 1.1rem;
}
.chf-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.chf-footer-col a {
  font-family: 'Jost', sans-serif;
  font-size: var(--chf-footer-link-sz, 13px);
  font-weight: 300;
  color: var(--chf-footer-link-c, rgba(250,248,244,0.52));
  transition: color .18s;
  line-height: 1.4;
}
.chf-footer-col a:hover {
  color: var(--chf-footer-link-hv, #EDD8CC);
}

.chf-footer-bottom {
  border-top: 1px solid var(--chf-footer-div-c, rgba(250,248,244,0.08));
}
.chf-footer-bottom-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.4rem clamp(20px,5.5vw,72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.chf-footer-legal,
.chf-footer-pacfa {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: var(--chf-footer-legal-c, rgba(250,248,244,0.28));
  letter-spacing: 0.04em;
  line-height: 1.6;
  font-weight: 300;
}
.chf-footer-pacfa { text-align: right; }
.chf-footer-pacfa a {
  color: var(--chf-footer-loc-h-c, rgba(237,216,204,0.38));
  transition: color .18s;
}
.chf-footer-pacfa a:hover { color: var(--chf-footer-link-hv, #EDD8CC); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 10,000,000% responsive
══════════════════════════════════════════════════════════ */

/* 1140px — tighten nav padding */
@media (max-width: 1140px) {
  .chf-nav-link { padding: 0 0.6rem; }
  .chf-book-btn { padding: 0.6rem 1rem; font-size: 11px; }
}

/* 900px — hamburger */
@media (max-width: 900px) {
  .chf-nav-wrap                  { display: none !important; }
  .chf-book-btn                  { display: none !important; }
  .chf-burger,
  .chf-header .chf-burger,
  button.chf-burger              { display: flex !important; }

  .chf-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .chf-footer-brand {
    grid-column: 1 / -1;
  }
  .chf-footer-tagline { max-width: 100%; }
}

/* 640px — stacked footer, full-width mobile book btn */
@media (max-width: 640px) {
  .chf-footer-top { grid-template-columns: 1fr; }
  .chf-footer-brand { grid-column: auto; }
  .chf-footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .chf-footer-pacfa { text-align: left; }
  .chf-mob-book {
    align-self: stretch;
    justify-content: center;
  }
}

/* 400px — small phones */
@media (max-width: 400px) {
  .chf-logo-name { font-size: 15px !important; }
  .chf-logo-sub  { font-size: 8px  !important; }
  .chf-mob-link  { font-size: 13px; }
}

/* ── Z-index: ensure header never covers WP admin bar or Elementor toolbar ──
   WP admin bar = z-index 99999. Elementor toolbar = even higher.
   Our header must always sit below both.
──────────────────────────────────────────────────────── */
.chf-header {
  z-index: 1000 !important;
}
.chf-mobile-nav {
  z-index: 999 !important;
}

/* ── WordPress Admin Bar offset ─────────────────────────
   When logged in, WP adds #wpadminbar (32px desktop, 46px mobile).
   Sticky header must sit below it so Elementor toolbar stays visible.
──────────────────────────────────────────────────────── */
.admin-bar .chf-header {
  top: 32px;
}
.admin-bar .chf-mobile-nav {
  top: calc(32px + var(--chf-header-h, 72px));
}
@media screen and (max-width: 782px) {
  .admin-bar .chf-header {
    top: 46px;
  }
  .admin-bar .chf-mobile-nav {
    top: calc(46px + var(--chf-header-h, 72px));
  }
}

/* ── ZippyExperts credit ────────────────────────────────── */
.chf-footer-credit {
  text-align: center;
  padding: 0.6rem clamp(20px, 5.5vw, 72px) 0.8rem;
  border-top: 1px solid var(--chf-footer-div-c, rgba(250,248,244,0.06));
}
.chf-footer-credit p {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(250,248,244,0.2);
  letter-spacing: 0.06em;
  margin: 0;
}
.chf-footer-credit a {
  color: rgba(250,248,244,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.chf-footer-credit a:hover {
  color: var(--chf-footer-link-hv, #EDD8CC);
}
