/*
 * Home V3 parity / stabilization layer.
 * Loaded last so the approved Home structure wins over older RC rules.
 */

/* Never let carousel animation create vertical scroll anchoring. */
.act-home [data-act-treatment-rail],
.act-home [data-act-testimonial-rail]{
  overscroll-behavior-inline:contain;
  scroll-behavior:smooth;
  overflow-anchor:none;
}

/* HERO — keep the approved composition, restore subtle editorial motion only. */
.act-home .act-home-hero__copy{animation:actHomeCopyIn .82s cubic-bezier(.2,.72,.2,1) both}
.act-home .act-home-hero__portrait{animation:actHomePortraitIn .9s .08s cubic-bezier(.2,.72,.2,1) both}
.act-home .act-home-hero__portrait>img{transition:transform 1.1s cubic-bezier(.2,.72,.2,1),filter .55s ease}
.act-home .act-home-hero__portrait:hover>img{transform:scale(1.018)}
.act-home .act-home-hero__halo{animation:actHaloFloat 8s ease-in-out infinite alternate}
.act-home .act-home-hero__signature{transition:transform .35s ease,box-shadow .35s ease}
.act-home .act-home-hero__portrait:hover .act-home-hero__signature{transform:translateY(-4px);box-shadow:0 14px 30px rgba(62,45,30,.09)}
@keyframes actHomeCopyIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@keyframes actHomePortraitIn{from{opacity:0;transform:translateY(24px) scale(.985)}to{opacity:1;transform:none}}
@keyframes actHaloFloat{from{transform:translate3d(-6px,0,0) scale(.99)}to{transform:translate3d(8px,7px,0) scale(1.015)}}

/* DOMAINS — the parent must be one full-width flow. This fixes the compressed
   left column seen in Customizer and returns the 3 cards + detail panel layout. */
.act-home .act-domain-stage{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
.act-home .act-domain-stage__cards{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  gap:14px!important;
  margin:38px 0 0!important;
  overflow:visible!important;
}
.act-home .act-domain-selector{
  width:100%!important;
  min-width:0!important;
  min-height:430px!important;
  aspect-ratio:auto!important;
  padding:28px!important;
  border-radius:28px!important;
  scroll-snap-align:unset!important;
  transform:none;
}
.act-home .act-domain-selector::before{
  background-position:center!important;
  filter:saturate(.88) contrast(1.02);
}
.act-home .act-domain-selector::after{
  background:linear-gradient(180deg,rgba(25,21,18,.06) 4%,rgba(25,21,18,.18) 45%,rgba(25,21,18,.82) 100%)!important;
}
.act-home .act-domain-selector:hover,
.act-home .act-domain-selector.is-active{
  transform:translateY(-7px)!important;
  box-shadow:0 28px 58px rgba(58,43,30,.15)!important;
}
.act-home .act-domain-selector.is-active{
  outline:1px solid rgba(184,141,51,.52);
  outline-offset:3px;
}
.act-home .act-domain-selector__number{bottom:106px!important}
.act-home .act-domain-selector__name{bottom:58px!important;font-size:48px!important}
.act-home .act-domain-selector__tagline{bottom:22px!important;max-width:84%;line-height:1.35!important}
.act-home .act-domain-selector__arrow{
  display:grid!important;place-items:center;width:38px;height:38px;border-radius:50%;
  background:rgba(255,250,244,.84);color:#8f681f;backdrop-filter:blur(8px);
  transition:transform .28s ease,background .28s ease;
}
.act-home .act-domain-selector:hover .act-domain-selector__arrow,
.act-home .act-domain-selector.is-active .act-domain-selector__arrow{transform:rotate(45deg);background:#fffaf4}

.act-home .act-domain-stage__detail{
  display:grid!important;
  grid-template-columns:minmax(340px,.82fr) minmax(0,1.18fr)!important;
  width:100%!important;
  max-width:none!important;
  gap:32px!important;
  margin:22px 0 0!important;
  padding:18px!important;
  border-radius:28px!important;
  overflow:hidden!important;
}
.act-home .act-domain-detail__visual{
  min-width:0!important;
  min-height:360px!important;
  transition:opacity .28s ease,transform .4s ease;
}
.act-home .act-domain-detail__visual.is-changing{opacity:.55;transform:scale(.992)}
.act-home .act-domain-detail__visual::before{transform:scale(1.01);transition:transform .8s ease,opacity .28s ease}
.act-home .act-domain-stage__detail:hover .act-domain-detail__visual::before{transform:scale(1.035)}
.act-home .act-domain-detail__body{min-width:0!important;padding:28px 26px 28px 4px!important}
.act-home .act-domain-detail__body h3{font-size:48px!important;line-height:.95!important}
.act-home .act-domain-detail__subgrid{grid-template-columns:1fr 1fr!important}

/* METHOD — visual state should feel like the original story panel, without
   taking control of the user's page scroll. */
.act-home .act-method__visual--photo{isolation:isolate}
.act-home .act-method__visual--photo::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(110deg,rgba(255,255,255,.08),transparent 42%);
}
.act-home .act-method__visual-copy{z-index:3!important}
.act-home [data-act-method-image]{opacity:1;transform:scale(1.015);transition:opacity .34s ease,transform .65s cubic-bezier(.2,.72,.2,1)!important}
.act-home [data-act-method-image].is-transitioning{opacity:.72;transform:scale(1.035)}
.act-home .act-method-step{cursor:pointer}
.act-home .act-method-step::after{
  content:"";position:absolute;left:0;bottom:-1px;width:0;height:1px;background:#b88d33;
  transition:width .5s cubic-bezier(.2,.72,.2,1);
}
.act-home .act-method-step.is-active::after{width:100%}
.act-home .act-method-step.is-active strong{color:#2f2925}

/* APPROACHES — restore lighter editorial rhythm. */
.act-home .act-approach-domain{transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease}
.act-home .act-approach-domain:hover{transform:translateY(-3px);border-color:#dfccb0;box-shadow:0 18px 46px rgba(69,51,33,.055)}
.act-home .act-approach-card--compact{scroll-margin-inline:14px}

/* TREATMENT RAIL — equal cards, visible next-card cue and no vertical jump. */
.act-home .act-treatment-rail{
  width:100%!important;
  display:flex!important;
  gap:16px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;
  padding:8px 2px 22px!important;
}
.act-home .act-treatment-card{
  flex:0 0 clamp(286px,27vw,350px)!important;
  min-height:470px!important;
  scroll-snap-align:start!important;
  scroll-margin-inline:8px;
}
.act-home .act-treatment-card.is-focus{transform:translateY(-7px);border-color:#dec7a1!important;box-shadow:0 24px 50px rgba(69,50,30,.10)}
.act-home .act-rail-controls{margin-top:8px}
.act-home .act-rail-controls button{transition:transform .2s ease,background .2s ease}
.act-home .act-rail-controls button:hover{transform:translateY(-2px);background:#f6ebda}

/* TESTIMONIALS — same safe horizontal behavior. */
.act-home .act-testimonial-rail{overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important}
.act-home .act-testimonial-card{scroll-snap-align:start!important;scroll-margin-inline:10px}

/* Scroll reveal: refined but never sticky / never scroll-jacking. */
.act-home .act-reveal.is-ready{opacity:0;transform:translate3d(0,24px,0);filter:blur(2px)}
.act-home .act-reveal.is-visible{opacity:1;transform:none;filter:none}

@media(max-width:1000px){
  .act-home .act-domain-selector{min-height:390px!important}
  .act-home .act-domain-stage__detail{grid-template-columns:minmax(280px,.8fr) 1.2fr!important}
}

@media(max-width:900px){
  .act-home .act-domain-stage__cards{
    display:flex!important;width:100%!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;padding:4px 2px 16px!important;scrollbar-width:none;
  }
  .act-home .act-domain-stage__cards::-webkit-scrollbar{display:none}
  .act-home .act-domain-selector{flex:0 0 min(82vw,430px)!important;min-height:430px!important;scroll-snap-align:center!important}
  .act-home .act-domain-stage__detail{grid-template-columns:1fr!important;gap:14px!important}
  .act-home .act-domain-detail__visual{min-height:400px!important}
  .act-home .act-domain-detail__body{padding:18px 12px 20px!important}
}

@media(max-width:560px){
  .act-home .act-domain-selector{flex-basis:88vw!important;min-height:400px!important}
  .act-home .act-domain-detail__visual{min-height:330px!important}
  .act-home .act-domain-detail__subgrid{grid-template-columns:1fr!important;gap:18px!important}
  .act-home .act-domain-detail__body h3{font-size:42px!important}
  .act-home .act-treatment-card{flex-basis:84vw!important;min-height:440px!important}
}

@media(prefers-reduced-motion:reduce){
  .act-home .act-home-hero__copy,.act-home .act-home-hero__portrait,.act-home .act-home-hero__halo{animation:none!important}
  .act-home *{scroll-behavior:auto!important}
}
