/* 8 Furlong Consulting — chrome.css
   ALL header + footer layout and responsive behavior. Nothing chrome-related lives elsewhere.
   Mobile-first base → tablet 768px → desktop 1024px.
   Smart-header solid state (.is-solid) is toggled by the WP implementation script;
   the non-JS default below is the transparent-over-dark-hero state (every page opens on a navy hero). */

/* ============ HEADER ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(29, 35, 39, 0); box-shadow: none;
  font-family: var(--font-body);
}
.site-header__bar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-side);
}
.site-header__logo { position: relative; display: block; height: 34px; width: 118px; flex: none; }
.site-header__logo img { position: absolute; left: 0; top: 0; height: 34px; width: auto; }
.site-header__logo-primary { opacity: 0; }
.site-header__logo-alt { opacity: 1; }

/* Desktop nav pill + CTA hidden on mobile */
.site-nav, .site-header__cta { display: none; }

/* Mobile hamburger (pure CSS checkbox toggle — non-JS state) */
.site-nav-toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }
.site-nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  padding: 12px 8px; margin: -4px 0; cursor: pointer; min-height: 44px; min-width: 44px;
  justify-content: center; align-items: flex-end;
}
.site-nav-toggle__line { width: 24px; height: 2px; background: #F5EDE6; display: block; }
.site-nav-toggle__line--short { width: 16px; background: var(--tan); }

.site-nav-mobile {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 49;
  background: var(--navy);
  padding: 32px var(--pad-side) 48px;
  display: none; flex-direction: column; gap: 28px; overflow-y: auto;
}
.site-nav-toggle__input:checked ~ .site-nav-mobile { display: flex; }
.site-nav-toggle__input:checked ~ .site-nav-toggle .site-nav-toggle__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-toggle__input:checked ~ .site-nav-toggle .site-nav-toggle__line:nth-child(2) { opacity: 0; }
.site-nav-toggle__input:checked ~ .site-nav-toggle .site-nav-toggle__line--short { width: 24px; transform: translateY(-7px) rotate(-45deg); }
.site-nav-toggle__input:checked ~ * .site-header { background: var(--navy); }
.site-nav-mobile__links { display: flex; flex-direction: column; gap: 4px; }
.site-nav-mobile__links > a,
.site-nav-mobile__group > a {
  font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.2;
  color: var(--white); padding: 10px 0; min-height: 44px;
}

/* ---- Mobile drawer: tap-to-expand sub-menus (John, 2026-09-08) ----
   The word and the toggle are separate targets on purpose: tapping "Services"
   still goes to the overview page, the caret beside it opens the list.
   Sub-lists ship visible and site.js collapses them, so with JS off the menu
   degrades to the full list rather than to an unopenable button. */
.site-nav-mobile__group { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.site-nav-mobile__group > a { flex: 1 1 auto; }
.site-nav-mobile__expand {
  display: none; flex: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: 10px; padding: 0; cursor: pointer;
  background: none; border: 1px solid rgba(245, 237, 230, .14);
  border-radius: var(--radius-btn); color: var(--muted);
  transition: background-color .18s ease-out;
}
.site-nav-mobile__links.has-accordion .site-nav-mobile__expand { display: flex; }
.site-nav-mobile__expand:hover { background: rgba(245, 237, 230, .06); }
.site-nav-mobile__chev {
  display: inline-block; width: 9px; height: 9px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .22s ease-out, border-color .18s ease-out;
}
.site-nav-mobile__expand[aria-expanded="true"] { background: rgba(245, 237, 230, .06); }
.site-nav-mobile__expand[aria-expanded="true"] .site-nav-mobile__chev {
  transform: translateY(2px) rotate(225deg); border-color: var(--tan);
}
.site-nav-mobile__sub {
  flex-basis: 100%; display: flex; flex-direction: column;
  margin: 2px 0 10px; padding-left: 15px;
  border-left: 1px solid rgba(181, 137, 97, .4);
}
.site-nav-mobile__links.has-accordion .site-nav-mobile__sub { display: none; }
.site-nav-mobile__links.has-accordion .site-nav-mobile__group.is-open .site-nav-mobile__sub { display: flex; }
.site-nav-mobile__sub a {
  display: flex; align-items: center; min-height: 44px; padding: 10px 0;
  font-family: var(--font-body); font-weight: 500; font-size: 16px; line-height: 1.3;
  color: var(--muted);
}
.site-nav-mobile__sub a:hover { color: var(--white); }
.site-nav-mobile__cta {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-label); font-weight: 600; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 26px; border-radius: var(--radius-btn);
  background: var(--cream); color: var(--navy); min-height: 44px;
}
/* Solid state (mobile): dark bar always on mobile per locked artboard */
.site-header { background: var(--navy); }

/* ---- Desktop: transparent smart header, centered dark nav pill ----
   Starts at 1024px, not 768px: logo + nav pill + CTA need ~850px, so at exactly
   768px (iPad portrait) the CTA overflowed the viewport by 22px. Below this the
   mobile hamburger holds, which matches the brief's breakpoint model. */
@media (min-width: 1024px) {
  .site-header { background: rgba(29, 35, 39, 0); }
  .site-nav-toggle, .site-nav-toggle__input, .site-nav-mobile { display: none; }
  .site-header__bar {
    height: 88px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  }
  .site-header__logo { height: 58px; width: 200px; justify-self: start; }
  .site-header__logo img { height: 58px; }
  .site-header__logo-alt, .site-header__logo-primary { transition: opacity .35s ease-out; }

  .site-nav {
    display: flex; align-items: center; gap: 6px;
    background: rgba(29, 35, 39, .94);
    border: 1px solid rgba(245, 237, 230, .1);
    border-radius: var(--radius-pill);
    padding: 7px 12px;
  }
  .site-nav__link {
    position: relative; color: var(--muted);
    font-size: 13.5px; font-weight: 500; padding: 10px 16px;
    transition: color .18s ease-out;
  }
  .site-nav__link::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
    background: var(--tan); transform: scaleX(0); transform-origin: left;
    transition: transform .2s ease-out;
  }
  .site-nav__link:hover { color: var(--white); }
  .site-nav__link:hover::after { transform: scaleX(1); }
  .site-nav__link.is-active::after { transform: scaleX(1); }

  /* ---- Services + Contact dropdowns (John, 2026-09-08) ----
     Every value here is lifted from the nav pill above so the panel reads as
     part of it: same fill, same hairline, same radius, same 13.5px type. The
     tan bar that underlines a nav link stands up on the left edge of a
     dropdown row instead — same motif, turned for a vertical list.
     Opens on :hover AND :focus-within, so it works without a mouse. */
  .site-nav__item { position: relative; display: flex; align-items: center; }
  .site-nav__caret {
    display: inline-block; vertical-align: middle;
    width: 7px; height: 7px; margin-left: 7px; flex: none;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg); opacity: .55;
    transition: transform .2s ease-out, opacity .18s ease-out;
  }
  .site-nav__item:hover .site-nav__caret,
  .site-nav__item:focus-within .site-nav__caret {
    opacity: 1; transform: translateY(1px) rotate(225deg);
  }
  .site-nav__panel {
    position: absolute; top: 100%; left: 0; min-width: 262px;
    padding-top: 13px;                      /* transparent hover bridge, no dead gap */
    opacity: 0; visibility: hidden; transform: translateY(-5px);
    transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s .18s;
  }
  .site-nav__panel--right { left: auto; right: 0; min-width: 210px; }
  .site-nav__item:hover .site-nav__panel,
  .site-nav__item:focus-within .site-nav__panel {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s;
  }
  .site-nav__panel-inner {
    display: flex; flex-direction: column;
    background: rgba(29, 35, 39, .98);
    border: 1px solid rgba(245, 237, 230, .1);
    border-radius: var(--radius-pill);
    padding: 7px;
    box-shadow: 0 14px 34px rgba(18, 23, 26, .36);
  }
  .site-nav__sub {
    position: relative; display: block; white-space: nowrap;
    color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.35;
    padding: 10px 14px 10px 16px; border-radius: var(--radius-btn);
    transition: color .18s ease-out, background-color .18s ease-out;
  }
  .site-nav__sub::before {
    content: ""; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 2px;
    background: var(--tan); border-radius: 2px;
    transform: scaleY(0); transform-origin: top;
    transition: transform .2s ease-out;
  }
  .site-nav__sub:hover { color: var(--white); background: rgba(245, 237, 230, .055); }
  .site-nav__sub:hover::before { transform: scaleY(1); }

  .site-header__cta {
    display: inline-block; justify-self: end;
    position: relative; white-space: nowrap;
    font-family: var(--font-label); font-weight: 600; font-size: 12px;
    letter-spacing: .1em; text-transform: uppercase;
    padding: 15px 26px; border-radius: var(--radius-btn);
    background: var(--cream); color: var(--navy);
    transition: transform .2s ease-out, box-shadow .2s ease-out, background-color .35s ease-out, color .35s ease-out;
  }
  .site-header__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 35, 39, .25); }

  /* Solid state — WP script adds .is-solid past 24px scroll */
  .site-header.is-solid { background: var(--cream-ground); box-shadow: 0 6px 24px rgba(29, 35, 39, .16); }
  .site-header.is-solid .site-header__logo-alt { opacity: 0; }
  .site-header.is-solid .site-header__logo-primary { opacity: 1; }
  .site-header.is-solid .site-header__cta { background: var(--navy); color: var(--white); }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav__link, .site-nav__link::after, .site-header__cta,
  .site-header__logo-alt, .site-header__logo-primary,
  .site-nav__caret, .site-nav__panel, .site-nav__sub, .site-nav__sub::before,
  .site-nav-mobile__expand, .site-nav-mobile__chev { transition: none; }
}

/* ============ FOOTER ============ */
.site-footer { background: var(--navy); font-family: var(--font-body); }
.site-footer__inner {
  max-width: var(--max-content); margin: 0 auto;
  padding: 48px var(--pad-side) 36px;
}

/* Row 1 — logo/NAP block + newsletter */
.site-footer__row1 { display: flex; flex-direction: column; gap: 36px; align-items: center; text-align: center; }
.site-footer__brand img { height: 52px; width: auto; margin: 0 auto; }
.site-footer__tagline {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: 16px; color: var(--tan); margin-top: 16px;
}
.site-footer__nap { font-style: normal; color: var(--muted-dark); font-size: 13px; line-height: 1.8; margin-top: 16px; }
.site-footer__nap a { color: var(--muted-dark); }
.site-footer__nap a:hover { color: var(--white); }

.site-footer__col-heading {
  font-family: var(--font-label); font-weight: 600;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--tan); margin: 0 0 14px; line-height: 1.55;
}
.site-footer__newsletter { width: 100%; max-width: 340px; }
.site-footer__newsletter-form { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.site-footer__newsletter-form input {
  width: 100%; background: var(--navy-soft); border: 1px solid #3A444C;
  border-radius: var(--radius-btn); padding: 13px 16px;
  font-family: var(--font-body); font-size: 13px; color: var(--cream);
}
.site-footer__newsletter-form input::placeholder { color: var(--muted-dark); }
.site-footer__newsletter-form button {
  font-family: var(--font-label); font-weight: 600; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 13px 22px; border-radius: var(--radius-btn); border: 0; cursor: pointer;
  background: var(--cream); color: var(--navy); min-height: 44px;
  transition: background-color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.site-footer__newsletter-form button:hover { background: var(--white); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 35, 39, .3); }

/* Row 2 — three link columns, tan headings on one baseline */
.site-footer__row2 { display: flex; flex-direction: column; gap: 28px; margin-top: 36px; text-align: center; }
.site-footer__col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.site-footer__col a {
  position: relative; display: inline-block;
  font-size: 13px; color: var(--muted); transition: color .18s ease-out;
}
.site-footer__col a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: var(--tan); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease-out;
}
.site-footer__col a:hover { color: var(--white); }
.site-footer__col a:hover::after { transform: scaleX(1); }

/* Back to top */
.site-footer__top-row { display: flex; justify-content: center; margin-top: 36px; }
.site-footer__top {
  width: 48px; height: 48px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: var(--tan); color: var(--white); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.site-footer__top:hover { background: var(--saddle); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(29, 35, 39, .35); }

/* Bottom bar */
.site-footer__bottom {
  border-top: 1px solid var(--line-dark); margin-top: 16px; padding-top: 22px;
  display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
  font-size: 11.5px; color: var(--muted-dark); line-height: 1.9;
}
.site-footer__legal { margin: 0; }
.site-footer__legal a {
  position: relative; display: inline-block; color: var(--muted-dark); transition: color .18s ease-out;
}
.site-footer__legal a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: var(--tan); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease-out;
}
.site-footer__legal a:hover { color: var(--white); }
.site-footer__legal a:hover::after { transform: scaleX(1); }

/* ---- Follow Us (John, 2026-09-08) ----
   The three platform names used to sit alone in the bottom-right corner. They
   are icons now, grouped under the newsletter form so the right side of the
   footer carries the same weight as the left. Inline SVG — no icon font, no
   extra request. 44px targets, tan fill on hover to match the back-to-top. */
.site-footer__follow { margin-top: 28px; }
.site-footer__follow-icons { display: flex; gap: 10px; justify-content: center; }
.site-footer__follow-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-btn);
  border: 1px solid var(--line-dark); color: var(--muted-dark);
  transition: color .18s ease-out, background-color .18s ease-out, border-color .18s ease-out;
}
.site-footer__follow-icons a:hover {
  color: var(--navy); background: var(--tan); border-color: var(--tan);
}
.site-footer__follow-icons svg { width: 19px; height: 19px; display: block; fill: currentColor; }

/* ---- Tablet+ footer ---- */
@media (min-width: 768px) {
  .site-footer__inner { padding-top: 64px; padding-bottom: 44px; }
  .site-footer__row1 {
    flex-direction: row; justify-content: space-between; align-items: flex-start;
    text-align: left; gap: 48px;
  }
  .site-footer__brand img { margin: 0; height: 64px; }
  .site-footer__tagline { font-size: 17px; margin-top: 22px; }
  .site-footer__nap { margin-top: 18px; }
  .site-footer__newsletter { max-width: 380px; }
  .site-footer__col-heading { font-size: 10.5px; margin-bottom: 18px; }
  .site-footer__newsletter-form { flex-direction: row; align-items: stretch; }
  .site-footer__newsletter-form input { flex: 1; min-width: 0; }
  .site-footer__newsletter-form button { padding: 0 20px; white-space: nowrap; }
  .site-footer__follow-icons { justify-content: flex-start; }

  .site-footer__row2 {
    flex-direction: row; gap: 48px; margin-top: 56px; text-align: left;
  }
  .site-footer__col { flex: 1; align-items: flex-start; gap: 11px; }
  .site-footer__col a { font-size: 13.5px; }

  .site-footer__top-row { justify-content: flex-end; margin-top: 40px; }
  /* Centered from 2026-09-08: the social row moved up into the newsletter
     column, so the legal line is the only child left in this bar. */
  .site-footer__bottom {
    flex-direction: row; justify-content: center; align-items: center;
    text-align: center; padding-top: 26px; font-size: 12px;
  }
}
@media (min-width: 1024px) {
  .site-footer__inner { padding-top: 72px; padding-bottom: 56px; }
  .site-footer__row2 { gap: 64px; max-width: 900px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer__col a::after, .site-footer__legal a::after,
  .site-footer__follow-icons a,
  .site-footer__newsletter-form button, .site-footer__top { transition: none; }
}

/* ---- Desktop footer: one band, five columns (John's approved reference, 2026-09-04) ----
   The brand block, the three link columns and the newsletter sit on ONE row.
   The logo occupies its own row above; every tan heading and the tagline share
   the second row's top edge. Achieved with display:contents so the build markup
   (row1 / row2 wrappers) is untouched. */
@media (min-width: 1024px) {
  .site-footer__inner {
    display: grid;
    grid-template-columns: 1.1fr 1.15fr 0.8fr 0.8fr 1.35fr;
    column-gap: 40px;
    row-gap: 18px;
    align-items: start;
  }
  .site-footer__row1,
  .site-footer__row2,
  .site-footer__brand { display: contents; }

  .site-footer__brand > a { grid-column: 1; grid-row: 1; margin-bottom: 12px; }
  .site-footer__tagline { grid-column: 1; grid-row: 2; margin-top: 0; }
  .site-footer__nap { grid-column: 1; grid-row: 3; margin-top: 0; }

  .site-footer__row2 .site-footer__col:nth-of-type(1) { grid-column: 2; }
  .site-footer__row2 .site-footer__col:nth-of-type(2) { grid-column: 3; }
  .site-footer__row2 .site-footer__col:nth-of-type(3) { grid-column: 4; }
  .site-footer__row2 .site-footer__col {
    grid-row: 2 / span 2;
    align-self: start;
    margin-top: 0;
  }

  .site-footer__newsletter {
    grid-column: 5;
    grid-row: 2 / span 2;
    align-self: start;
    width: 100%;
    max-width: none;
  }

  .site-footer__top-row { grid-column: 1 / -1; grid-row: 4; }
  .site-footer__bottom { grid-column: 1 / -1; grid-row: 5; }
}

/* ---- Footer: full viewport width, side padding only (John, 2026-09-04) ---- */
.site-footer__inner { max-width: none; }

/* Newsletter: the field is the input, not the button. The button takes its
   natural width; the field takes everything left over and never collapses. */
@media (min-width: 768px) {
  .site-footer__newsletter-form { gap: 12px; }
  .site-footer__newsletter-form input { flex: 1 1 auto; min-width: 0; }
  .site-footer__newsletter-form button { flex: 0 0 auto; }
}

/* Header: the logo slot reserved 200px for a 3.45:1 lockup. The real mark is
   a 1.43:1 badge, so the slot is sized to what actually renders. */
.site-header__logo { width: 49px; }
@media (min-width: 1024px) {
  .site-header__logo { width: 83px; }
}

/* newsletter button trim — keep the field dominant at 1440 */
@media (min-width: 768px) {
  .site-footer__newsletter-form button { padding: 0 18px; }
}

/* ---- Tap targets: the brief's 44px minimum (added 2026-09-07) ----
   Footer links and the mobile logo are standalone controls, so they take real
   height rather than a negative-margin trick, which would overlap neighboring
   hit areas. The column gap is removed to give most of that height back. */
.site-footer__col a {
  display: flex; align-items: center; min-height: 44px;
}
.site-footer__col a::after { bottom: 9px; }
.site-footer__col { gap: 0; }

.site-header__logo { display: flex; align-items: center; min-height: 44px; }
.site-header__logo img { top: 50%; transform: translateY(-50%); }

.site-footer__newsletter-form input { min-height: 44px; }
.site-footer__legal a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-footer__legal a::after { bottom: 12px; }
@media (min-width: 768px) {
  .site-footer__col { gap: 0; }
}

/* ---- Tap targets, second pass (added 2026-09-08) ----
   The 2026-09-07 pass covered the footer columns, legal and social rows but
   missed the NAP block: the tel: and mailto: links were 15px tall and only
   8px apart, which is the shape Lighthouse fails. They are standalone
   controls on every page, so they take real height like the rest. */
.site-footer__nap a {
  display: inline-flex; align-items: center; min-height: 44px;
}

/* 11.5px is fine on a desktop footer, small on a phone. Mobile gets 12px;
   768px and up keeps the approved desktop size. */
.site-footer__bottom { font-size: 12px; }
@media (min-width: 768px) {
  .site-footer__bottom { font-size: 11.5px; }
}
