/* v21 — compact Higgsfield visual mastheads for every left-navigation page. */
:root{
  --pv-gold:#b98529;
  --pv-gold-deep:#785116;
  --pv-ivory:#fffdf8;
  --pv-ink:#142821;
  --pv-muted:#6e695f;
  --pv-line:rgba(121,84,26,.18);
}

.cwlsPageMasthead{
  display:grid;
  grid-template-columns:minmax(0,1.28fr) minmax(260px,.72fr);
  min-height:156px;
  margin:0 0 18px;
  overflow:hidden;
  border:1px solid var(--pv-line);
  border-radius:22px;
  background:linear-gradient(135deg,#fffefa 0%,#fbf6eb 100%);
  box-shadow:0 14px 34px rgba(68,49,20,.075);
  isolation:isolate;
}

.cwlsPageMasthead__copy{
  display:flex;
  align-items:center;
  min-width:0;
  padding:22px 24px;
  position:relative;
  z-index:2;
}

.cwlsPageMasthead__copy>.sectionTitle,
.cwlsPageMasthead__copy>.osSectionHead{
  width:100%;
  min-width:0;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.cwlsPageMasthead__copy>.sectionTitle{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
}

.cwlsPageMasthead__copy>.sectionTitle>div,
.cwlsPageMasthead__copy>.osSectionHead>div{
  min-width:0!important;
}

.cwlsPageMasthead__copy :is(h2,h3){
  margin:0 0 7px!important;
  color:var(--pv-ink)!important;
  font-size:clamp(1.18rem,1.65vw,1.72rem)!important;
  line-height:1.12!important;
  letter-spacing:-.025em!important;
  overflow-wrap:anywhere;
}

.cwlsPageMasthead__copy :is(p,small){
  max-width:760px;
  margin:0!important;
  color:var(--pv-muted)!important;
  font-size:clamp(.76rem,.82vw,.88rem)!important;
  line-height:1.52!important;
  overflow-wrap:anywhere;
}

.cwlsPageMasthead__copy .eyebrow{
  margin:0 0 8px!important;
  color:#8a6118!important;
  font-size:.66rem!important;
  line-height:1.2!important;
  letter-spacing:.115em!important;
}

.cwlsPageMasthead__copy :is(.badge,.osVersionPill){
  max-width:190px!important;
  min-height:30px!important;
  flex:0 1 auto!important;
  white-space:normal!important;
  text-align:center!important;
  overflow-wrap:anywhere!important;
}

.cwlsPageMasthead__media{
  position:relative;
  min-width:0;
  min-height:156px;
  overflow:hidden;
  background-color:#8b631f;
}

.cwlsPageMasthead__media::before{
  content:"";
  position:absolute;
  inset:-2px;
  background-image:var(--cwls-page-image);
  background-size:cover;
  background-position:var(--cwls-page-position,center);
  background-repeat:no-repeat;
  transform:scale(1.018);
  filter:saturate(.78) contrast(1.03) brightness(.92);
}

.cwlsPageMasthead__media::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(255,253,248,.96) 0%,rgba(255,253,248,.32) 18%,rgba(31,28,20,.12) 52%,rgba(19,28,24,.40) 100%),
    linear-gradient(180deg,rgba(187,136,43,.10),rgba(35,28,18,.18));
}

.cwlsPageMasthead--market .cwlsPageMasthead__media::after{
  background:linear-gradient(90deg,rgba(255,253,248,.96),rgba(185,133,41,.16) 30%,rgba(31,35,30,.44));
}
.cwlsPageMasthead--project .cwlsPageMasthead__media::after{
  background:linear-gradient(90deg,rgba(255,253,248,.96),rgba(164,111,24,.10) 29%,rgba(26,38,31,.36));
}
.cwlsPageMasthead--finance .cwlsPageMasthead__media::after{
  background:linear-gradient(90deg,rgba(255,253,248,.96),rgba(109,75,22,.18) 31%,rgba(24,35,29,.48));
}
.cwlsPageMasthead--impact .cwlsPageMasthead__media::after{
  background:linear-gradient(90deg,rgba(255,253,248,.96),rgba(196,145,49,.14) 31%,rgba(31,50,40,.42));
}
.cwlsPageMasthead--risk .cwlsPageMasthead__media::after{
  background:linear-gradient(90deg,rgba(255,253,248,.96),rgba(72,56,29,.20) 30%,rgba(20,27,24,.62));
}

/* Existing visual-first pages already use the same Higgsfield source system. */
#overview .homeHero,
#invest>.investHero{
  background-size:cover!important;
  background-position:center!important;
}

@media (max-width:980px){
  .cwlsPageMasthead{grid-template-columns:minmax(0,1fr) minmax(210px,.58fr)}
  .cwlsPageMasthead__copy{padding:19px 20px}
  .cwlsPageMasthead__copy>.sectionTitle{flex-wrap:wrap!important}
}

@media (max-width:700px){
  .cwlsPageMasthead{
    grid-template-columns:1fr;
    min-height:0;
    border-radius:18px;
    margin-bottom:14px;
  }
  .cwlsPageMasthead__media{
    grid-row:1;
    min-height:106px;
  }
  .cwlsPageMasthead__media::after{
    background:linear-gradient(180deg,rgba(23,31,27,.24),rgba(255,253,248,.94) 100%)!important;
  }
  .cwlsPageMasthead__copy{
    grid-row:2;
    padding:17px 18px 19px;
  }
  .cwlsPageMasthead__copy>.sectionTitle,
  .cwlsPageMasthead__copy>.osSectionHead{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:10px!important;
  }
  .cwlsPageMasthead__copy :is(h2,h3){font-size:clamp(1.06rem,5vw,1.34rem)!important}
  .cwlsPageMasthead__copy :is(p,small){font-size:.76rem!important}
}

@media (prefers-reduced-motion:reduce){
  .cwlsPageMasthead__media::before{transform:none}
}
