/* -------------------------------------------------------------------------- */
/* Shared site system — CTA → footer atmosphere + Services cards               */
/* Homepage Expertise typography stays in index.html #chl-expertise-composition*/
/* This file owns sitewide bottom CTA mist + footer handoff.                   */
/* -------------------------------------------------------------------------- */

:root {
  --chl-ivory: #f4efe6;
  --chl-ivory-deep: #ebe3d4;
  --chl-ivory-mist: #f8f4ec;
}

/* -------------------------------------------------------------------------- */
/* Bottom CTA section → warm ivory handoff into footer                         */
/* Covers .section, .section-5, and any section tagged .chl-bottom-cta         */
/* -------------------------------------------------------------------------- */

section.chl-bottom-cta,
.section:has(.cta-wrapper),
.section-5:has(.cta-wrapper),
section:has(> .container .cta-wrapper),
section:has(> .w-layout-blockcontainer .cta-wrapper) {
  background-color: #fff !important;
  overflow-x: clip;
  overflow-y: visible;
  background-image: linear-gradient(
    180deg,
    #ffffff 0,
    #ffffff calc(100% - 28rem),
    #faf7f2 calc(100% - 18rem),
    var(--chl-ivory-mist) calc(100% - 8rem),
    var(--chl-ivory-mist) 100%
  ) !important;
}

section.chl-bottom-cta > .container,
section.chl-bottom-cta > .w-layout-blockcontainer,
.section:has(.cta-wrapper) > .container.overflow,
.section-5:has(.cta-wrapper) > .container.overflow,
section:has(.cta-wrapper) > .container.overflow {
  background-color: transparent !important;
}

/* Kill Webflow IX slide-up on the CTA block itself (not card carousel) */
section.chl-bottom-cta > .container > .cta-wrapper,
section.chl-bottom-cta > .w-layout-blockcontainer > .cta-wrapper,
.cta-wrapper.slide-up-animation {
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

/* Contact page — soft white → mist into footer (overrides generic CTA mist) */
section.chl-bottom-cta:has(.contact-wrapper),
.section:has(.contact-wrapper),
section:has(.contact-wrapper) {
  background-color: #fff !important;
  background-image: linear-gradient(
    180deg,
    #ffffff 0,
    #ffffff calc(100% - 14rem),
    #faf7f2 calc(100% - 7rem),
    var(--chl-ivory-mist) 100%
  ) !important;
}

.contact-wrapper.slide-up-animation {
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
  animation: none !important;
}

/* Empty spacer sections before footer — no hard seam / no IX hide */
.section.slide-up-animation:empty,
section.section.slide-up-animation:not(:has(*)) {
  transform: none !important;
  opacity: 1 !important;
  min-height: 0 !important;
  background: transparent !important;
}

/* -------------------------------------------------------------------------- */
/* Footer — dedicated .chl-site-footer (not generic max-width sections)        */
/* Static in document flow (IX data-w-id removed). Visible refined treatment.  */
/* -------------------------------------------------------------------------- */

.chl-site-footer {
  background-color: var(--chl-ivory-mist) !important;
  /* Continuous mist → soft dissolve — no abrupt white/black block */
  background-image: linear-gradient(
    180deg,
    var(--chl-ivory-mist) 0,
    var(--chl-ivory-mist) 6rem,
    #faf7f2 18rem,
    #fdfcfa 32rem,
    #ffffff 48rem,
    #ffffff 100%
  ) !important;
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

.chl-site-footer > .container {
  background-color: transparent !important;
}

/* Soft hairline — not heavy black / warm-orange against ivory */
.chl-site-footer .footer-line {
  background-color: rgba(28, 28, 28, 0.14) !important;
  height: 1px !important;
  opacity: 1 !important;
}

.chl-site-footer .footer-footer-bottom {
  min-height: 2.5rem;
  padding-bottom: 0.5rem;
}

/* Desktop / tablet — intentional breathing room, row logo + CONTACT */
.chl-site-footer .footer-top {
  display: flex !important;
  flex-flow: row nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1.5rem;
  padding-top: clamp(5.5rem, 9vw, 8.5rem) !important;
  padding-bottom: clamp(2.75rem, 4.5vw, 4.25rem) !important;
  max-width: 100%;
}

.chl-site-footer .footer-block {
  align-items: flex-start !important;
  text-align: left !important;
}

.chl-site-footer .footer-logo-link-wrapper .image-2 {
  max-width: min(415px, 42vw);
  width: auto;
  height: auto;
}

.chl-site-footer .footer-top > a.w-inline-block {
  justify-self: auto;
  align-self: center !important;
  flex-shrink: 0;
}

/* CONTACT pill — ivory label on black, clearly readable */
.chl-site-footer .footer-top .button-flex-copy-copy {
  color: #f7f3ec !important;
  background-color: #000 !important;
  min-height: 2.75rem;
  padding: 0.55rem 1.65rem !important;
  border-radius: 999px !important;
}

.chl-site-footer .footer-top .button-text {
  color: #f7f3ec !important;
  margin: 0;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  line-height: 1.2;
}

.chl-site-footer .footer-top a:hover .button-flex-copy-copy,
.chl-site-footer .footer-top .button-flex-copy-copy:hover {
  color: #f7f3ec !important;
  background-color: #111 !important;
}

.chl-site-footer .footer-top a:hover .button-text {
  color: #ffffff !important;
}

/* Seamless CTA → footer join */
section.chl-bottom-cta + .chl-site-footer,
.section:has(.cta-wrapper) + .chl-site-footer,
.section-5:has(.cta-wrapper) + .chl-site-footer,
.section:has(.contact-wrapper) + .chl-site-footer,
section:has(.contact-wrapper) + .chl-site-footer {
  margin-top: 0;
}

@media screen and (max-width: 767px) {
  section.chl-bottom-cta,
  .section:has(.cta-wrapper),
  .section-5:has(.cta-wrapper),
  section:has(> .container .cta-wrapper),
  section:has(> .w-layout-blockcontainer .cta-wrapper) {
    background-image: linear-gradient(
      180deg,
      #ffffff 0,
      #ffffff calc(100% - 22rem),
      #faf7f2 calc(100% - 14rem),
      var(--chl-ivory-mist) calc(100% - 6rem),
      var(--chl-ivory-mist) 100%
    ) !important;
  }

  .section:has(.contact-wrapper),
  section:has(.contact-wrapper),
  section.chl-bottom-cta:has(.contact-wrapper) {
    background-image: linear-gradient(
      180deg,
      #ffffff 0,
      #ffffff calc(100% - 10rem),
      #faf7f2 calc(100% - 5rem),
      var(--chl-ivory-mist) 100%
    ) !important;
  }

  /*
    Mobile footer refinement — more air above logo, calm row, soft line.
  */
  .chl-site-footer {
    background-image: linear-gradient(
      180deg,
      var(--chl-ivory-mist) 0,
      var(--chl-ivory-mist) 4rem,
      #faf7f2 14rem,
      #ffffff 28rem,
      #ffffff 100%
    ) !important;
  }

  .chl-site-footer .footer-top {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem;
    grid-template-columns: none !important;
    padding-top: clamp(5.25rem, 20vw, 7.5rem) !important;
    padding-bottom: clamp(2.25rem, 8vw, 3.5rem) !important;
  }

  .chl-site-footer .footer-block {
    align-items: flex-start !important;
    text-align: left !important;
    min-width: 0;
  }

  .chl-site-footer .footer-logo-link-wrapper {
    max-width: 100%;
  }

  .chl-site-footer .footer-logo-link-wrapper .image-2 {
    max-width: min(168px, 48vw) !important;
    width: auto !important;
  }

  .chl-site-footer .footer-top > a.w-inline-block {
    justify-self: auto !important;
  }

  .chl-site-footer .footer-top .button-flex-copy-copy {
    min-height: 2.5rem !important;
    padding: 0.5rem 1.35rem !important;
  }

  .chl-site-footer .footer-top .button-text {
    color: #f7f3ec !important;
    font-size: 0.68rem !important;
  }

  .chl-site-footer .footer-line {
    background-color: rgba(28, 28, 28, 0.12) !important;
  }

  .chl-site-footer .footer-footer-bottom {
    min-height: 1.75rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Desktop top nav — keep SERVICES / ASSESSMENT / AI EXECUTION / HOW WE WORK / */
/* CONTACT dark in every state. Webflow hover uses --light-grey (#eee).        */
/* Mobile open menu keeps white type (max-width: 991px rules in webflow CSS).  */
/* -------------------------------------------------------------------------- */

@media screen and (min-width: 992px) {
  .navbar .nav-menu {
    flex-wrap: nowrap;
    align-items: center;
  }

  .navbar .nav-link,
  .navbar .nav-link:link,
  .navbar .nav-link:visited,
  .navbar .nav-link:hover,
  .navbar .nav-link:focus,
  .navbar .nav-link:focus-visible,
  .navbar .nav-link:active,
  .navbar .nav-link.w--current,
  .navbar .nav-link.w--current:hover,
  .navbar .nav-link.w--current:focus,
  .navbar .nav-link.move-down,
  .navbar .nav-link.move-down:hover,
  .navbar .nav-link.move-down:focus,
  .navbar .nav-link.move-down.hide-on-tab,
  .navbar .nav-link.move-down.hide-on-tab:hover,
  .navbar .nav-link.move-down.hide-on-tab:focus,
  .navbar .nav-link.move-down.hide-on-tab.w--current,
  .navbar .nav-link.move-down.hide-on-tab.w--current:hover,
  .navbar .nav-menu .nav-link,
  .navbar .nav-menu .nav-link:hover,
  .navbar .nav-menu .nav-link.w--current {
    color: #111 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #111 !important;
    white-space: nowrap;
  }

  /* Five items: slightly tighter padding so the row stays premium/minimal */
  .navbar .nav-link {
    padding-left: 0.95vw;
    padding-right: 0.95vw;
    letter-spacing: 0.045em;
  }
}

/* Guard mobile open-menu type against leftover orange rules */
@media screen and (max-width: 991px) {
  .navbar .nav-menu .nav-link,
  .navbar .nav-menu .nav-link:link,
  .navbar .nav-menu .nav-link:visited,
  .navbar .nav-menu .nav-link:hover,
  .navbar .nav-menu .nav-link:focus-visible,
  .navbar .nav-menu .nav-link.w--current {
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
    opacity: 1 !important;
  }

  .navbar .nav-menu .nav-link:hover,
  .navbar .nav-menu .nav-link:focus-visible {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
}

/* Expertise composition is owned by index.html #chl-expertise-composition */

/* -------------------------------------------------------------------------- */
/* Services page — editorial service rows                                      */
/* Scoped to body.chl-services so other pages stay untouched.                  */
/* -------------------------------------------------------------------------- */

body.chl-services {
  overflow-x: hidden;
}

body.chl-services .chl-services-menu {
  background-color: #fff;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

body.chl-services .chl-services-menu > .container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
  box-sizing: border-box;
  overflow: visible;
}

body.chl-services .chl-svc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

body.chl-services .chl-svc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.75rem, 3.5vw, 3.5rem);
  align-items: center;
  min-height: 0;
  height: auto;
  padding: clamp(2.25rem, 3.25vw, 3.25rem) 0;
  border-top: 1px solid rgba(5, 5, 5, 0.12);
  box-sizing: border-box;
}

body.chl-services .chl-svc-row:last-child {
  border-bottom: 1px solid rgba(5, 5, 5, 0.12);
}

body.chl-services .chl-svc-row--reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

body.chl-services .chl-svc-row--reverse .chl-svc-row__content {
  order: 2;
}

body.chl-services .chl-svc-row--reverse .chl-svc-row__media {
  order: 1;
}

body.chl-services .chl-svc-row__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 28rem;
  min-width: 0;
}

body.chl-services .chl-svc-row--reverse .chl-svc-row__content {
  margin-left: auto;
}

body.chl-services .chl-svc-row__index {
  margin: 0 0 0.85rem;
  color: #8a8a8a;
  font-family: Archivo, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.chl-services .chl-svc-row__eyebrow {
  margin: 0 0 0.85rem;
  color: #050505;
  font-family: Archivo, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.chl-services .chl-svc-row__title {
  margin: 0 0 1.1rem;
  color: #050505;
  font-family: Archivo, sans-serif;
  font-size: clamp(2.15rem, 3.4vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: none;
  transition: color 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.chl-services .chl-svc-row__desc {
  margin: 0 0 1.65rem;
  max-width: 26rem;
  color: #4a4a4a;
  font-family: Archivo, sans-serif;
  font-size: clamp(0.95rem, 1.05vw, 1.0625rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

body.chl-services a.chl-svc-row__cta {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 0.45rem !important;
  margin: 0;
  padding: 0.65rem 1.35rem !important;
  color: #050505 !important;
  font-family: Archivo, sans-serif;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  border: 1px solid #050505 !important;
  border-radius: 999px !important;
  background-color: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

body.chl-services a.chl-svc-row__cta .chl-svc-row__cta-icon {
  width: 0.9rem !important;
  height: 0.9rem !important;
  display: block !important;
  opacity: 0.9 !important;
  transform: translate(0, 0);
  filter: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    filter 0.25s ease;
}

body.chl-services .chl-svc-row__media {
  min-width: 0;
  width: 100%;
}

body.chl-services .chl-svc-row__media-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

body.chl-services .chl-svc-row__media-frame {
  position: relative;
  width: 100%;
  height: clamp(260px, 24vw, 380px);
  border-radius: var(--border-radius, 12px);
  overflow: hidden;
  background-color: var(--chl-ivory-mist, #f8f4ec);
}

body.chl-services .chl-svc-row__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Soft mist overlay — no hard band */
body.chl-services .chl-svc-row__media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      120% 90% at 50% 100%,
      rgba(12, 12, 12, 0.22) 0%,
      rgba(12, 12, 12, 0.08) 38%,
      rgba(12, 12, 12, 0) 72%
    ),
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0) 0%,
      rgba(10, 10, 10, 0.04) 55%,
      rgba(10, 10, 10, 0.14) 100%
    );
  opacity: 0.55;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

body.chl-services .chl-svc-row__media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    165deg,
    rgba(255, 252, 247, 0.12) 0%,
    rgba(255, 252, 247, 0) 42%,
    rgba(8, 8, 8, 0) 58%,
    rgba(8, 8, 8, 0.18) 100%
  );
  opacity: 0.35;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Quiet luxury hover — mist deepens, image barely scales */
@media (hover: hover) and (pointer: fine) {
  body.chl-services .chl-svc-row:hover .chl-svc-row__image,
  body.chl-services .chl-svc-row__media-link:hover .chl-svc-row__image {
    transform: scale(1.018);
  }

  body.chl-services .chl-svc-row:hover .chl-svc-row__media-frame::before,
  body.chl-services .chl-svc-row__media-link:hover .chl-svc-row__media-frame::before {
    opacity: 0.92;
  }

  body.chl-services .chl-svc-row:hover .chl-svc-row__media-frame::after,
  body.chl-services .chl-svc-row__media-link:hover .chl-svc-row__media-frame::after {
    opacity: 0.7;
  }

  body.chl-services .chl-svc-row:hover .chl-svc-row__title {
    color: #000000;
  }

  body.chl-services a.chl-svc-row__cta:hover,
  body.chl-services a.chl-svc-row__cta:focus-visible {
    color: #f7f3ec !important;
    background-color: #050505 !important;
    border-color: #050505 !important;
  }

  body.chl-services a.chl-svc-row__cta:hover .chl-svc-row__cta-icon,
  body.chl-services a.chl-svc-row__cta:focus-visible .chl-svc-row__cta-icon {
    opacity: 1 !important;
    filter: invert(1) !important;
    transform: translate(3px, -3px);
  }
}

@media screen and (max-width: 991px) {
  body.chl-services .chl-svc-row,
  body.chl-services .chl-svc-row--reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 0;
    padding: 2.5rem 0;
  }

  body.chl-services .chl-svc-row__content,
  body.chl-services .chl-svc-row--reverse .chl-svc-row__content {
    order: 2;
    max-width: none;
    margin-left: 0;
  }

  body.chl-services .chl-svc-row__media,
  body.chl-services .chl-svc-row--reverse .chl-svc-row__media {
    order: 1;
  }

  body.chl-services .chl-svc-row__media-frame {
    height: 18.5rem;
  }

  body.chl-services .chl-svc-row__title {
    font-size: 2.35rem;
  }
}

@media screen and (max-width: 767px) {
  body.chl-services .chl-services-menu > .container {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  body.chl-services .chl-svc-row,
  body.chl-services .chl-svc-row--reverse {
    gap: 1.25rem;
    padding: 2.15rem 0;
  }

  body.chl-services .chl-svc-row__media-frame {
    height: 14.5rem;
  }

  body.chl-services .chl-svc-row__index {
    margin-bottom: 0.7rem;
  }

  body.chl-services .chl-svc-row__eyebrow {
    margin-bottom: 0.7rem;
    font-size: 0.625rem;
  }

  body.chl-services .chl-svc-row__title {
    margin-bottom: 0.9rem;
    font-size: 1.95rem;
  }

  body.chl-services .chl-svc-row__desc {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: none;
  }

  /* Keep resting mist soft — no hover reliance */
  body.chl-services .chl-svc-row__media-frame::before {
    opacity: 0.45;
  }

  body.chl-services .chl-svc-row__media-frame::after {
    opacity: 0.28;
  }
}

@media screen and (max-width: 479px) {
  body.chl-services .chl-svc-row,
  body.chl-services .chl-svc-row--reverse {
    padding: 1.85rem 0;
  }

  body.chl-services .chl-svc-row__media-frame {
    height: 12.75rem;
  }

  body.chl-services .chl-svc-row__title {
    font-size: 1.75rem;
  }

  body.chl-services .chl-svc-row__desc {
    font-size: 0.9rem;
  }
}
