/* Services active-panel sizing fix only. */
html.hs-sheet-lock{
  overflow:hidden;
  overscroll-behavior:none;
}
.hs-sheet{
  padding:clamp(10px,2vw,20px);
}
.hs-sheet-panel{
  width:min(820px,100%);
  max-height:calc(100svh - clamp(20px,4vw,40px));
  overflow:auto;
  padding:clamp(20px,2.6vw,30px);
}
.hs-sheet-index{margin-bottom:.7rem}
.hs-sheet-title{font-size:clamp(2rem,3.8vw,3.5rem)}
.hs-sheet-summary{margin-top:.75rem;font-size:.82rem;line-height:1.5}
.hs-sheet-metric{margin-top:1rem;padding-top:.8rem}
.hs-sheet-metric strong{font-size:1.65rem}
.hs-sheet-kicker{margin:.85rem 0 .25rem}
.hs-sheet-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:clamp(18px,3vw,34px);
}
.hs-subrow{
  min-width:0;
  padding:.43rem 0;
}
.hs-subrow-name{
  overflow:hidden;
  font-size:.72rem;
  line-height:1.25;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.hs-sheet-foot{
  margin-top:.85rem;
}
.hs-sheet-cta{
  padding:.62rem 1rem;
  font-size:.66rem;
}
@media(max-width:560px){
  .hs-sheet{padding:6px}
  .hs-sheet-panel{
    width:min(430px,100%);
    max-height:calc(100svh - 12px);
    padding:18px 14px 12px;
  }
  .hs-sheet-title{font-size:clamp(1.7rem,8vw,2.15rem)}
  .hs-sheet-summary{margin-top:.55rem;font-size:.68rem;line-height:1.35}
  .hs-sheet-metric{margin-top:.55rem;padding-top:.5rem}
  .hs-sheet-metric strong{font-size:1.2rem}
  .hs-sheet-metric span{font-size:.65rem}
  .hs-sheet-kicker{margin:.55rem 0 .15rem}
  .hs-sheet-list{column-gap:12px}
  .hs-subrow{grid-template-columns:20px minmax(0,1fr);gap:.35rem;padding:.32rem 0}
  .hs-subrow-num{font-size:.5rem}
  .hs-subrow-name{font-size:.62rem}
  .hs-subrow-arrow{display:none}
  .hs-sheet-foot{margin-top:.55rem}
  .hs-sheet-cta{padding:.55rem .72rem;font-size:.59rem}
}
@media(max-width:360px){
  .hs-sheet-panel{padding-inline:12px}
  .hs-sheet-title{font-size:1.55rem}
  .hs-sheet-summary{font-size:.63rem}
  .hs-subrow{padding:.27rem 0}
  .hs-subrow-name{font-size:.58rem}
}

/* Homepage service hover preview only. The DOM and cursor-follow behaviour
   stay unchanged; this replaces the old coloured wash with the restrained
   image language used by the individual service pages. */
.home-services .hs-row::before{
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.032),transparent);
}
.home-services .hs-row:hover .hs-row-name,
.home-services .hs-row:focus-visible .hs-row-name,
.home-services .hs-row.is-active .hs-row-name{color:#fff}
.home-services .hs-row:hover .hs-row-desc,
.home-services .hs-row:focus-visible .hs-row-desc,
.home-services .hs-row.is-active .hs-row-desc{color:#aeb7c6}
.home-services .hs-row:hover .hs-row-count,
.home-services .hs-row:focus-visible .hs-row-count,
.home-services .hs-row.is-active .hs-row-count{color:#d8dde6}
.home-services .hs-row:hover .hs-row-arrow,
.home-services .hs-row:focus-visible .hs-row-arrow,
.home-services .hs-row.is-active .hs-row-arrow{color:#fff}
.svc-preview.svc-preview--home{
  --preview-x:-320px;
  --preview-y:-220px;
  top:0;
  left:0;
  width:min(300px,calc(100vw - 32px));
  height:190px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  background:#080b12;
  box-shadow:0 32px 90px rgba(0,0,0,.62),inset 0 1px rgba(255,255,255,.08);
  transform:translate3d(var(--preview-x),var(--preview-y),0) translateY(8px) scale(.96);
  transform-origin:center;
  will-change:transform,opacity;
  transition:opacity .22s ease,border-color .3s ease;
}
@supports not selector(body:has(*)){
  .svc-preview{
    width:min(300px,calc(100vw - 32px));height:190px;
    border-radius:22px;background:#080b12;
  }
}
.svc-preview.svc-preview--home.show{transform:translate3d(var(--preview-x),var(--preview-y),0) translateY(0) scale(1);border-color:rgba(255,255,255,.26)}
.svc-preview--home .svc-preview-inner{
  background-position:center;
  filter:saturate(.92) contrast(1.035);
  transform:scale(1.035);
  transition:transform .8s var(--ease-expo),filter .55s ease;
}
.svc-preview--home.show .svc-preview-inner{transform:scale(1);filter:saturate(1) contrast(1.025)}
.svc-preview--home .svc-preview-inner::before{
  content:"";position:absolute;inset:9px;pointer-events:none;
  border:1px solid rgba(255,255,255,.15);border-radius:15px;
}
.svc-preview--home .svc-preview-inner::after{
  margin:0 0 18px 18px;
  padding:.56rem .78rem;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(7,10,17,.56);
  box-shadow:0 10px 30px -18px rgba(0,0,0,.9);
  -webkit-backdrop-filter:blur(14px) saturate(125%);backdrop-filter:blur(14px) saturate(125%);
}

/* The existing service sheet is a true centered viewport dialog. Its
   internal markup is unchanged; grid placement creates a clean reading
   hierarchy while allowing long capability lists to scroll safely. */
.home-services .hs-sheet{
  display:grid;
  place-items:center;
  padding:clamp(14px,3vw,32px);
  overflow:hidden;
  background:rgba(3,5,10,.78);
  -webkit-backdrop-filter:blur(18px) saturate(110%);backdrop-filter:blur(18px) saturate(110%);
}
.home-services .hs-sheet-panel{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  grid-template-rows:auto auto auto auto;
  grid-template-areas:
    "head metric"
    "head kicker"
    "head list"
    "foot foot";
  column-gap:clamp(28px,5vw,64px);
  row-gap:0;
  align-content:start;
  width:min(920px,100%);
  height:auto;
  min-height:0;
  max-height:calc(100svh - clamp(28px,6vw,64px));
  margin:auto;
  padding:clamp(28px,4vw,48px);
  border:1px solid rgba(255,255,255,.14);
  border-radius:24px;
  background:
    radial-gradient(circle at 0 0,color-mix(in srgb,var(--service-accent) 8%,transparent),transparent 34%),
    linear-gradient(145deg,rgba(17,21,31,.98),rgba(7,9,15,.99));
  box-shadow:0 42px 120px rgba(0,0,0,.72),inset 0 1px rgba(255,255,255,.06);
  transform:translateY(20px) scale(.985);
}
.home-services .hs-sheet.is-open .hs-sheet-panel{transform:none}
.home-services .hs-sheet-head{grid-area:head;align-self:center;margin:0;padding:0}
.home-services .hs-sheet-metric{grid-area:metric;margin:0 0 1rem;padding:0 0 1rem;border-top:0}
.home-services .hs-sheet-kicker{grid-area:kicker;margin:0 0 .35rem}
.home-services .hs-sheet-list{grid-area:list;grid-template-columns:1fr;margin:0;align-self:start}
.home-services .hs-sheet-foot{grid-area:foot;justify-content:center;margin-top:clamp(14px,2vw,22px);padding-top:clamp(14px,1.7vw,20px);border-top:1px solid rgba(255,255,255,.08)}
.home-services .hs-sheet-title{margin:0;font-size:clamp(2rem,4vw,3.35rem);line-height:1}
.home-services .hs-sheet-summary{margin-top:1rem;font-size:.86rem;line-height:1.6}
.home-services .hs-subrow{padding:.52rem 0}
.home-services .hs-subrow-name{font-size:.76rem}

@media(max-width:720px){
  .home-services .hs-sheet{align-items:center;padding:10px}
  .home-services .hs-sheet-panel{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto auto;
    grid-template-areas:"head" "metric" "kicker" "list" "foot";
    row-gap:0;
    width:min(520px,100%);
    max-height:calc(100svh - 20px);
    padding:24px 18px 16px;
    border-radius:20px;
  }
  .home-services .hs-sheet-head{padding-right:2.5rem;margin-bottom:1rem}
  .home-services .hs-sheet-list{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}
  .home-services .hs-sheet-foot{margin-top:16px;padding-top:14px}
}
@media(max-width:440px){
  .home-services .hs-sheet-panel{padding:20px 14px 12px}
  .home-services .hs-sheet-list{grid-template-columns:1fr}
  .home-services .hs-sheet-summary{font-size:.7rem;line-height:1.4}
  .home-services .hs-subrow{padding:.3rem 0}
  .home-services .hs-sheet-foot{flex-direction:row}
  .home-services .hs-sheet-foot .hs-sheet-cta{width:auto;flex:1}
}

/* Global service-popup contrast contract.
   Every category is rendered through .hs-sheet-panel, so defining the color
   roles here protects current and future service sheets from section/theme
   inheritance without changing their layout, surface, or motion. */
.home-services .hs-sheet-panel {
  --service-popup-heading:#f8fbfb;
  --service-popup-body:#c4cfcd;
  --service-popup-muted:#93a29f;
  --service-popup-line:rgba(255,255,255,.13);
  --service-popup-accent:#35d5c8;
  --service-popup-accent-ink:#031312;
  color:var(--service-popup-heading)!important;
}

html[data-theme="light"] .home-services .hs-sheet-panel,
html[data-theme="dark"] .home-services .hs-sheet-panel {
  color:var(--service-popup-heading)!important;
}

.home-services .hs-sheet-title,
.home-services .hs-sheet-kicker,
.home-services .hs-sheet-metric strong,
.home-services .hs-subrow-name {
  color:var(--service-popup-heading)!important;
  -webkit-text-fill-color:currentColor!important;
  background-image:none!important;
}

.home-services .hs-sheet-summary,
.home-services .hs-sheet-metric span {
  color:var(--service-popup-body)!important;
}

.home-services .hs-sheet-metric em,
.home-services .hs-subrow-num {
  color:var(--service-popup-muted)!important;
}

.home-services .hs-sheet-index,
.home-services .hs-subrow-arrow {
  color:var(--service-popup-accent)!important;
}

.home-services .hs-subrow {
  border-color:var(--service-popup-line)!important;
}

.home-services .hs-subrow:is(:hover,:focus-within) {
  border-color:color-mix(in srgb,var(--service-popup-accent) 55%,transparent)!important;
}

.home-services .hs-subrow:is(:hover,:focus-within) .hs-subrow-name {
  color:var(--service-popup-accent)!important;
}

.home-services .hs-sheet-close {
  color:var(--service-popup-body)!important;
}

.home-services .hs-sheet-close:is(:hover,:focus-visible) {
  color:var(--service-popup-accent)!important;
  border-color:var(--service-popup-accent)!important;
}

.home-services .hs-sheet-cta:not(.hs-sheet-cta--ghost),
.home-services .hs-sheet-cta:not(.hs-sheet-cta--ghost) span {
  color:var(--service-popup-accent-ink)!important;
}

.home-services .hs-sheet-cta--ghost,
.home-services .hs-sheet-cta--ghost span {
  color:var(--service-popup-heading)!important;
}

.home-services .hs-sheet-cta--ghost:is(:hover,:focus-visible) {
  color:var(--service-popup-accent)!important;
  border-color:var(--service-popup-accent)!important;
}

.home-services .hs-sheet :is(a,button):focus-visible {
  outline:2px solid var(--service-popup-accent)!important;
  outline-offset:3px;
}

/* Theme-inheritance lock: these selectors outrank the global alternating
   section palette while retaining the popup's semantic hierarchy. */
html[data-theme] .home-services .hs-sheet-title,
html[data-theme] .home-services .hs-sheet-kicker,
html[data-theme] .home-services .hs-sheet-metric strong,
html[data-theme] .home-services .hs-subrow-name {
  color:var(--service-popup-heading)!important;
}

html[data-theme] .home-services .hs-sheet-summary,
html[data-theme] .home-services .hs-sheet-metric span {
  color:var(--service-popup-body)!important;
}

html[data-theme] .home-services .hs-sheet-metric em,
html[data-theme] .home-services .hs-subrow-num {
  color:var(--service-popup-muted)!important;
}

html[data-theme] .home-services .hs-sheet-index,
html[data-theme] .home-services .hs-subrow-arrow {
  color:var(--service-popup-accent)!important;
}
