/* Mountain View Homes - shared motion and interaction feedback.
   Loaded on every public page. Everything here is decoration: with this file
   or motion.js missing, the pages look and work the same, just without movement.
   All of it is switched off for visitors who ask their device for reduced motion. */

:root{--mvh-ease:cubic-bezier(.2,.7,.2,1);--mvh-fast:.16s;--mvh-med:.28s;--mvh-slow:.55s}

/* ---------- header ---------- */
.mvh-hdr .mvh-nav a{transition:color var(--mvh-fast) ease}
.mvh-hdr .mvh-nav a:before{content:'';position:absolute;bottom:17px;left:0;right:0;height:3px;background:#e8742a;transform:scaleX(0);transform-origin:left;transition:transform var(--mvh-med) var(--mvh-ease)}
.mvh-hdr .mvh-nav a.active:before,.mvh-hdr .mvh-nav a.mvh-navphone:before{display:none}
.mvh-hdr .mvh-brand .mvh-logo{transition:transform var(--mvh-med) var(--mvh-ease)}
.mvh-hdr .mvh-phone a{transition:color var(--mvh-fast) ease}
.mvh-hdr .mvh-menu{transition:transform var(--mvh-fast) ease}
.mvh-hdr .mvh-menu:active{transform:scale(.9)}
@media(hover:hover){
  .mvh-hdr .mvh-nav a:hover{color:#ffd9bd}
  .mvh-hdr .mvh-nav a:hover:before{transform:scaleX(1)}
  .mvh-hdr .mvh-brand:hover .mvh-logo{transform:scale(1.05)}
  .mvh-hdr .mvh-phone a:hover{color:#f4a46c}
}
@media(max-width:980px){
  .mvh-hdr .mvh-nav a:before{display:none}
  .mvh-hdr .mvh-nav.open{animation:mvh-drop var(--mvh-med) var(--mvh-ease)}
  .mvh-hdr .mvh-nav.open a:active{color:#f4913f}
}
.mvh-ftr a{transition:color var(--mvh-fast) ease}
@media(hover:hover){.mvh-ftr a:hover{color:#f4a46c}}
.topline a{transition:color var(--mvh-fast) ease}
@media(hover:hover){.topline a:hover{color:#f4a46c}}

/* ---------- buttons and links ---------- */
.btn{transition:transform var(--mvh-fast) ease,box-shadow var(--mvh-fast) ease,background-color var(--mvh-fast) ease,border-color var(--mvh-fast) ease,color var(--mvh-fast) ease}
.btn:active{transform:translateY(0) scale(.98)}
.btn[disabled]:active{transform:none}
@media(hover:hover){
  .btn-primary:hover{background:#f08238;box-shadow:0 8px 20px rgba(232,116,42,.32)}
  .btn-dark:hover{background:#15263f;box-shadow:0 8px 20px rgba(11,23,41,.25)}
  .btn-outline:hover{background:#0b1729;color:#fff}
}
.text-link{transition:color var(--mvh-fast) ease}
@media(hover:hover){.text-link:hover{color:#e8742a}}

/* ---------- cards and tiles ---------- */
.card,.use-tile,.lp-point,.lp-steps li{transition:transform var(--mvh-med) var(--mvh-ease),box-shadow var(--mvh-med) var(--mvh-ease),border-color var(--mvh-fast) ease}
.card img,.lp-img img,.split img{transition:transform var(--mvh-slow) var(--mvh-ease)}
.use-tile span{display:inline-block;transition:transform var(--mvh-med) var(--mvh-ease)}
.use-tile:active{transform:scale(.985)}
@media(hover:hover){
  .card:hover{transform:translateY(-4px);box-shadow:0 26px 55px rgba(11,23,41,.13)}
  .card:hover img{transform:scale(1.035)}
  .use-tile:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(11,23,41,.08)}
  .use-tile:hover span{transform:translateX(4px)}
  .lp-point:hover,.lp-steps li:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(11,23,41,.08)}
  .lp-point:hover{border-color:#f0c4a4}
  .lp-img:hover img{transform:scale(1.03)}
}
.feature{transition:border-color var(--mvh-med) ease}

/* ---------- forms ---------- */
.field input,.field select,.field textarea{transition:border-color var(--mvh-fast) ease,box-shadow var(--mvh-fast) ease}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#e8742a;box-shadow:0 0 0 4px rgba(232,116,42,.14);outline:0}
.field label{transition:color var(--mvh-fast) ease}
.field:focus-within label{color:#ba4e11}
.btn.is-sending{pointer-events:none;opacity:.85}
.btn.is-sending:after{content:'';width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:mvh-spin .7s linear infinite}

/* ---------- page load ---------- */
section.hero>img{animation:mvh-settle 1.4s var(--mvh-ease) both}
.hero-content>*{animation:mvh-rise .7s var(--mvh-ease) both}
.hero-content>*:nth-child(2){animation-delay:.08s}
.hero-content>*:nth-child(3){animation-delay:.16s}
.hero-content>*:nth-child(4){animation-delay:.24s}
.lp-hero-grid>div>*{animation:mvh-rise .6s var(--mvh-ease) both}
.lp-hero-grid>div>*:nth-child(2){animation-delay:.06s}
.lp-hero-grid>div>*:nth-child(3){animation-delay:.12s}
.lp-hero-grid>div>*:nth-child(4){animation-delay:.18s}
.lp-hero-grid>div>*:nth-child(5){animation-delay:.24s}
.lp-hero-grid>div>*:nth-child(n+6){animation-delay:.3s}
.lp-img{animation:mvh-rise .8s var(--mvh-ease) .1s both}
.quote-layout>section>*{animation:mvh-rise .6s var(--mvh-ease) both}
.quote-layout>section>*:nth-child(2){animation-delay:.06s}
.quote-layout>section>*:nth-child(n+3){animation-delay:.12s}
.quote-layout>.quote-form{animation:mvh-rise .7s var(--mvh-ease) .12s both}
.success-card{animation:mvh-pop .5s var(--mvh-ease) both}

/* ---------- reveal on scroll (classes are added by motion.js) ---------- */
.mvh-rv{opacity:0;transform:translateY(18px);transition:opacity var(--mvh-slow) var(--mvh-ease),transform var(--mvh-slow) var(--mvh-ease);transition-delay:var(--mvh-d,0s)}
.mvh-rv.mvh-in{opacity:1;transform:none}
/* once shown, hand transform and transition back to the hover rules above */
.mvh-rv.mvh-done{opacity:1;transform:none;transition:transform var(--mvh-med) var(--mvh-ease),box-shadow var(--mvh-med) var(--mvh-ease),border-color var(--mvh-fast) ease}
@media(hover:hover){
  .card.mvh-done:hover{transform:translateY(-4px)}
  .use-tile.mvh-done:hover{transform:translateY(-2px)}
  .lp-point.mvh-done:hover,.lp-steps li.mvh-done:hover{transform:translateY(-3px)}
}

@keyframes mvh-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes mvh-settle{from{transform:scale(1.06)}to{transform:none}}
@keyframes mvh-pop{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
@keyframes mvh-drop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes mvh-spin{to{transform:rotate(360deg)}}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .mvh-hdr *,.mvh-ftr a,.topline a,.btn,.text-link,.card,.card img,.use-tile,.use-tile span,.lp-point,.lp-steps li,.lp-img,.lp-img img,.split img,.feature,
  .field input,.field select,.field textarea,.field label,section.hero>img,.hero-content>*,.lp-hero-grid>div>*,.quote-layout>section>*,.quote-layout>.quote-form,.success-card{animation:none!important;transition:none!important}
  .mvh-rv,.mvh-rv.mvh-in,.mvh-rv.mvh-done{opacity:1!important;transform:none!important;transition:none!important}
  .card:hover,.card:hover img,.use-tile:hover,.use-tile:hover span,.lp-point:hover,.lp-steps li:hover,.lp-img:hover img,.btn:hover,.btn:active{transform:none!important}
  .btn.is-sending:after{animation:none;border-right-color:currentColor;opacity:.5}
}
@media print{.mvh-rv{opacity:1!important;transform:none!important}}
