/* ============================================================
   Layout primitives + header + footer
   ============================================================ */

.cfh-grid       { display: grid; gap: var(--sp-3); }
.cfh-grid--2    { grid-template-columns: repeat(2, 1fr); }
.cfh-grid--3    { grid-template-columns: repeat(3, 1fr); }
.cfh-grid--4    { grid-template-columns: repeat(4, 1fr); }
.cfh-grid--hero { grid-template-columns: 1.2fr 1fr; gap: var(--sp-5); align-items: center; }

@media (max-width: 900px) {
  .cfh-grid--2, .cfh-grid--3, .cfh-grid--4, .cfh-grid--hero { grid-template-columns: 1fr; }
}

/* Asymmetric split used by services, locations, mission, testimonials sections */
.cfh-split { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: var(--sp-5); align-items: start; }
.cfh-split__head h2 { margin-bottom: var(--sp-2); }
.cfh-split__head p  { color: var(--ink-muted); margin-bottom: var(--sp-3); max-width: 32ch; }
.cfh-section--dark .cfh-split__head p { color: rgba(245,245,240,0.7); }
@media (max-width: 900px) { .cfh-split { grid-template-columns: 1fr; } }

/* ── Header ─────────────────────────────────────────────────── */
.cfh-header { background: var(--bg-dark); color: var(--ink-on-dark); position: relative; z-index: 100; }
.cfh-header__inner {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0;
}
.cfh-header__brand { display: flex; align-items: center; gap: var(--sp-1); color: var(--ink-on-dark); text-decoration: none; }
.cfh-header__brand:hover { text-decoration: none; }
.cfh-header__brand-mark { width: 38px; height: 38px; color: var(--ink-on-dark); }
.cfh-header__brand-mark img,
.cfh-footer__brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.cfh-header__brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.cfh-header__brand-text strong { font-size: var(--fs-sm); letter-spacing: 0.05em; font-weight: 700; }
.cfh-header__brand-text span   { font-size: var(--fs-xs); letter-spacing: 0.18em; font-weight: 500; color: rgba(245,245,240,0.7); }

.cfh-header__nav { flex: 1; display: flex; justify-content: center; }
.cfh-nav { list-style: none; display: flex; gap: var(--sp-3); margin: 0; padding: 0; align-items: center; }
.cfh-nav > li > a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--ink-on-dark); padding: var(--sp-1) 0; font-size: var(--fs-sm); font-weight: 500;
}
.cfh-nav > li > a:hover { color: var(--accent-green); text-decoration: none; }
.cfh-nav__caret { display: inline-block; font-size: 0.62em; transition: transform .16s ease; }
.cfh-nav__dropdown:hover > a .cfh-nav__caret,
.cfh-nav__dropdown:focus-within > a .cfh-nav__caret { transform: rotate(180deg); }

/* ── Dropdown surfaces (shared) ─────────────────────────────── */
.cfh-nav__dropdown { position: relative; }
.cfh-nav__sub,
.cfh-nav__panel {
  position: absolute; top: 100%; left: 0; margin-top: 10px;
  background: var(--bg-elevated); border: 1px solid var(--border-dark);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 50;
}
/* transparent bridge so the pointer can travel trigger -> panel without closing */
.cfh-nav__sub::before,
.cfh-nav__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.cfh-nav__dropdown:hover > .cfh-nav__sub,
.cfh-nav__dropdown:focus-within > .cfh-nav__sub,
.cfh-nav__dropdown:hover > .cfh-nav__panel,
.cfh-nav__dropdown:focus-within > .cfh-nav__panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* Simple list dropdown (About) */
.cfh-nav__sub { min-width: 220px; list-style: none; margin-left: 0; padding: 0.4rem; }
.cfh-nav__sub li a {
  display: block; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--ink-on-dark); font-size: var(--fs-sm);
}
.cfh-nav__sub li a:hover { background: rgba(127,226,107,0.1); color: var(--accent-green); text-decoration: none; }

/* Wide mega panels (Services, Locations) */
.cfh-nav__panel { padding: var(--sp-2); }
.cfh-nav__panel-lead {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 0.8rem; margin-bottom: 0.6rem; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  color: var(--accent-green);
  background: rgba(127,226,107,0.08); border: 1px solid rgba(127,226,107,0.22);
}
.cfh-nav__panel-lead:hover { background: rgba(127,226,107,0.15); text-decoration: none; }

/* Services grid */
.cfh-nav__panel--services { min-width: 560px; }
.cfh-nav__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.1rem 0.5rem;
}
.cfh-nav__grid a {
  display: block; padding: 0.42rem 0.6rem; border-radius: var(--radius-sm);
  color: var(--ink-on-dark); font-size: var(--fs-sm);
}
.cfh-nav__grid a:hover { background: rgba(127,226,107,0.1); color: var(--accent-green); text-decoration: none; }

/* Locations grid — each city is a labelled block, amenities nested beneath */
.cfh-nav__panel--locations { min-width: 480px; left: auto; right: 0; }
.cfh-nav__locations {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 0.4rem;
}
.cfh-loc { padding: 0.4rem 0; }
.cfh-loc__city {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  color: var(--ink-on-dark); padding: 0.15rem 0;
}
.cfh-loc__city:hover { color: var(--accent-green); text-decoration: none; }
.cfh-loc__state {
  font-family: var(--font-body); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.06em;
  color: var(--ink-muted); border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm); padding: 0.05rem 0.35rem;
}
.cfh-loc__sub {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.15rem; font-size: var(--fs-xs); color: rgba(245,245,240,0.6);
}
.cfh-loc__sub::before { content: "\2192"; color: var(--accent-green); }
.cfh-loc__sub:hover { color: var(--accent-green); text-decoration: none; }
.cfh-nav__panel-foot {
  display: flex; align-items: center; gap: 0.4rem;
  margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--border-dark);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm);
  color: var(--accent-green);
}
.cfh-nav__panel-foot:hover { color: var(--accent-green-hover); text-decoration: none; }

.cfh-header__right { display: flex; align-items: center; gap: var(--sp-2); }
.cfh-header__phone {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  color: var(--ink-on-dark); font-size: var(--fs-sm); font-weight: 500;
}
.cfh-header__phone:hover { color: var(--accent-green); text-decoration: none; }
.cfh-header__phone-icon { display: inline-flex; }
.cfh-header__cta { padding: 0.65rem 1.25rem; font-size: var(--fs-sm); }

/* ── Mobile menu ────────────────────────────────────────────── */
.cfh-header__burger { display: none; }
.cfh-header__burger-bar { display: block; width: 22px; height: 2px; background: var(--ink-on-dark); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 1100px) {
  .cfh-header__phone span { display: none; }
}
@media (max-width: 900px) {
  .cfh-header__inner { flex-wrap: wrap; }
  .cfh-header__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-left: auto; padding: 10px;
    background: transparent; border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm); cursor: pointer; order: 2;
  }
  .cfh-header.is-nav-open .cfh-header__burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .cfh-header.is-nav-open .cfh-header__burger-bar:nth-child(2) { opacity: 0; }
  .cfh-header.is-nav-open .cfh-header__burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .cfh-header__nav { order: 3; flex-basis: 100%; display: none; }
  .cfh-header.is-nav-open .cfh-header__nav { display: block; }
  .cfh-nav { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0 0; }
  .cfh-nav > li { border-top: 1px solid var(--border-dark); }
  .cfh-nav > li > a { padding: 0.9rem 0.25rem; font-size: var(--fs-base); }

  /* submenus render inline and expanded on mobile */
  .cfh-nav__sub,
  .cfh-nav__panel {
    position: static; margin: 0; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none; min-width: 0;
    padding: 0 0 0.5rem 0.5rem;
  }
  .cfh-nav__sub::before,
  .cfh-nav__panel::before { display: none; }
  .cfh-nav__grid,
  .cfh-nav__locations { grid-template-columns: 1fr; }
  .cfh-nav__caret { display: none; }
  .cfh-nav__panel-lead { justify-content: flex-start; }

  .cfh-header__right { display: none; }
  .cfh-header.is-nav-open .cfh-header__right {
    order: 4; flex-basis: 100%; display: flex; flex-direction: column; align-items: stretch;
    gap: 0.75rem; padding: 0.85rem 0.25rem 0.25rem; border-top: 1px solid var(--border-dark);
  }
  .cfh-header.is-nav-open .cfh-header__phone { justify-content: center; }
  .cfh-header.is-nav-open .cfh-header__phone span { display: inline; }
  .cfh-header.is-nav-open .cfh-header__cta { width: 100%; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.cfh-footer { background: var(--bg-dark); color: var(--ink-on-dark); padding: var(--sp-6) 0 var(--sp-3); }
.cfh-footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.3fr 1.3fr 1.4fr;
  gap: var(--sp-4);
}
.cfh-footer__brand-link { display: flex; align-items: center; gap: var(--sp-1); color: var(--ink-on-dark); margin-bottom: var(--sp-2); text-decoration: none; }
.cfh-footer__brand-link:hover { text-decoration: none; }
.cfh-footer__brand-mark { width: 36px; height: 36px; color: var(--ink-on-dark); }
.cfh-footer__brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-display); }
.cfh-footer__brand-text strong { font-size: var(--fs-sm); letter-spacing: 0.05em; }
.cfh-footer__brand-text span { font-size: var(--fs-xs); letter-spacing: 0.18em; color: rgba(245,245,240,0.7); }
.cfh-footer__brand p { color: rgba(245,245,240,0.7); font-size: var(--fs-sm); max-width: 26ch; }

.cfh-footer__social { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: flex; gap: var(--sp-1); }
.cfh-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-elevated); color: var(--ink-on-dark);
  transition: background .15s, color .15s;
}
.cfh-footer__social a:hover { background: var(--accent-green); color: var(--ink); text-decoration: none; }

.cfh-footer__col h4 {
  color: var(--ink-on-dark); font-size: var(--fs-sm);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.cfh-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.cfh-footer__col li a { color: rgba(245,245,240,0.7); font-size: var(--fs-sm); }
.cfh-footer__col li a:hover { color: var(--accent-green); text-decoration: none; }

.cfh-footer__newsletter p { color: rgba(245,245,240,0.7); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.cfh-footer__form input {
  width: 100%; padding: 0.7rem 0.9rem;
  background: var(--bg-elevated); border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm); color: var(--ink-on-dark);
  font-family: var(--font-body); font-size: var(--fs-sm);
  margin-bottom: var(--sp-1);
}
.cfh-footer__form input::placeholder { color: rgba(245,245,240,0.4); }

.cfh-footer__legal {
  display: flex; justify-content: space-between;
  padding-top: var(--sp-3); border-top: 1px solid var(--border-dark);
  margin-top: var(--sp-4);
  color: rgba(245,245,240,0.5); font-size: var(--fs-xs);
}
.cfh-footer__legal a { color: inherit; }

@media (max-width: 1100px) { .cfh-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } .cfh-footer__newsletter { grid-column: 1 / -1; } }
@media (max-width: 700px)  { .cfh-footer__grid { grid-template-columns: 1fr 1fr; } .cfh-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 500px)  { .cfh-footer__grid { grid-template-columns: 1fr; } .cfh-footer__legal { flex-direction: column; gap: var(--sp-1); } }
