/* Motion and micro-interactions. Everything that hides content sits under .motion, which is set only when motion is welcome and removed if app.js fails to run. */
h1,h2{text-wrap:balance}
p,li,summary{text-wrap:pretty}
a,button,summary{-webkit-tap-highlight-color:transparent}

/* Headlines rise line by line from behind a mask. The mask overshoots so descenders and shadows are not clipped. */
.line{display:block;clip-path:polygon(-8% -14%,108% -14%,108% 122%,-8% 122%)}
.line-in{display:block}
.lines-done .line{clip-path:none}
.motion h1:not(.lines-in) .line-in,.motion h2:not(.lines-in) .line-in{transform:translateY(125%)}
.motion .lines-in .line-in{transition:transform 1s cubic-bezier(.16,1,.3,1) calc(var(--i,0)*110ms)}
.motion h1:not(.lines-in) em,.motion h2:not(.lines-in) em{filter:blur(10px);opacity:.25}
.motion .lines-in em{transition:filter .95s ease calc(var(--i,0)*110ms + 140ms),opacity .95s ease calc(var(--i,0)*110ms + 140ms)}

/* One orchestrated entrance on the homepage hero. */
.motion .hero-video{animation:hero-settle 2.8s cubic-bezier(.16,1,.3,1) both}
.motion .hero .eyebrow{animation:tracking-in 1.2s cubic-bezier(.16,1,.3,1) both}
.motion .hero-description,.motion .hero-actions{animation:rise .95s cubic-bezier(.16,1,.3,1) .42s both}
.motion .hero-actions{animation-delay:.54s}
@keyframes hero-settle{from{transform:scale(1.07)}to{transform:none}}
@keyframes tracking-in{from{letter-spacing:.42em;opacity:0}}
@keyframes rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

/* Section content follows its headline, in a short stagger. */
.motion .reveal-ready{transition-delay:var(--reveal-delay,0ms)}

/* Buttons: the arrow leaves and a new one arrives. */
.arrow{position:relative;display:inline-block;width:1em;height:1.15em;overflow:hidden;line-height:1.15;vertical-align:-.12em}
.arrow i{position:absolute;inset:0;font-style:normal;text-align:center;transition:transform .45s cubic-bezier(.16,1,.3,1)}
.arrow i+i{transform:translate(-115%,115%)}
.button{translate:var(--mx,0) var(--my,0);transition:background .2s,transform .2s,box-shadow .25s,translate .45s cubic-bezier(.16,1,.3,1)}
.button:active{transform:scale(.97)}
.button:hover .arrow,.text-link:hover .arrow{transform:none}

@media(hover:hover){
 a:hover>.arrow i:first-child,button:hover>.arrow i:first-child{transform:translate(115%,-115%)}
 a:hover>.arrow i+i,button:hover>.arrow i+i{transform:none}
 /* Link underlines wipe away and redraw. */
 .text-link{border-bottom:0;padding-bottom:8px;background:linear-gradient(currentColor,currentColor) left bottom/100% 1px no-repeat}
 .text-link:hover{animation:underline-wipe .7s cubic-bezier(.65,0,.35,1)}
 @keyframes underline-wipe{0%{background-size:100% 1px;background-position:right bottom}48%{background-size:0 1px;background-position:right bottom}52%{background-size:0 1px;background-position:left bottom}100%{background-size:100% 1px;background-position:left bottom}}
 /* Surfaces respond to the pointer without moving the layout. */
 .service-card,.area-grid>a{transition:transform .45s cubic-bezier(.16,1,.3,1),box-shadow .45s}
 .service-card:hover,.area-grid>a:hover{transform:translateY(-5px);box-shadow:0 22px 48px #092c5614}
 .service-card video,.plan-film video,.gallery-grid img,.gallery-teaser img{transition:scale 1s cubic-bezier(.16,1,.3,1)}
 .service-card:hover video,.clean-plan:hover .plan-film video,.gallery-grid a:hover img,.gallery-teaser a:hover img{scale:1.045}
 .location-links a{background:linear-gradient(var(--gold),var(--gold)) left bottom/0 2px no-repeat;transition:background-size .5s cubic-bezier(.16,1,.3,1)}
 .location-links a:hover{background-size:100% 2px}
 .location-links b{display:inline-block;transition:transform .35s cubic-bezier(.16,1,.3,1)}
 .location-links a:hover b{transform:translate(3px,-3px)}
}
.gallery-grid figure>a,.gallery-teaser>a,.plan-film,.service-card{overflow:hidden}

/* FAQ: the plus turns as the answer glides. */
summary span{transition:transform .32s cubic-bezier(.16,1,.3,1),background .2s}
details.closing summary span{transform:none}
details p{transition:opacity .3s}
details.closing p{opacity:0}

/* Navy call to action: a soft glow follows the pointer. */
.page-cta{position:relative;overflow:hidden;isolation:isolate}
.page-cta::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(560px circle at var(--sx,50%) var(--sy,50%),#a8e7d724,transparent 72%);opacity:0;transition:opacity .5s}
@media(hover:hover){.page-cta:hover::before{opacity:1}}

/* Quote form: clear focus, a working state and a moment of success. */
.quote-form input,.quote-form select,.quote-form textarea{transition:border-color .2s,box-shadow .25s,background .2s}
.quote-form input:focus,.quote-form select:focus,.quote-form textarea:focus{border-color:var(--navy);box-shadow:0 0 0 3px #a8e7d78c;background:#fff;outline:0}
.quote-form [type=submit]:disabled{cursor:progress;opacity:.92}
.quote-form [type=submit]:disabled .arrow{visibility:hidden}
.quote-form [type=submit]:disabled::after{content:"";width:16px;height:16px;margin-left:-18px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#form-status.is-success{display:flex;gap:10px;align-items:flex-start;color:#7d6028;font-weight:600;animation:rise .55s cubic-bezier(.16,1,.3,1) both}
#form-status.is-success::before{content:"✓";flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--gold);color:var(--navy);font-size:13px;animation:tick-pop .5s cubic-bezier(.34,1.56,.64,1) both}
@keyframes tick-pop{from{transform:scale(0)}}

/* Mobile menu: links arrive in sequence. */
.motion .mobile-nav:not([hidden]) a{animation:rise .42s cubic-bezier(.16,1,.3,1) both}
.motion .mobile-nav:not([hidden]) a:nth-child(2){animation-delay:40ms}
.motion .mobile-nav:not([hidden]) a:nth-child(3){animation-delay:80ms}
.motion .mobile-nav:not([hidden]) a:nth-child(4){animation-delay:120ms}
.motion .mobile-nav:not([hidden]) a:nth-child(5){animation-delay:160ms}
.motion .mobile-nav:not([hidden]) a:nth-child(6){animation-delay:200ms}

/* Films open up as they scroll in. Browsers without scroll timelines simply show them. */
@media(prefers-reduced-motion:no-preference){
 @supports (animation-timeline:view()){
  .page-film,.about-image>.supporting-video,.gallery-teaser>a{animation:film-open linear both;animation-timeline:view();animation-range:entry 0% entry 85%}
  @keyframes film-open{from{clip-path:inset(9% 5% 9% 5% round 8px)}to{clip-path:inset(0 0 0 0 round 6px)}}
 }
 /* Pages cross-fade like an app where the browser supports it. */
 @view-transition{navigation:auto}
 ::view-transition-old(root){animation:vt-out .2s ease both}
 ::view-transition-new(root){animation:vt-in .38s cubic-bezier(.16,1,.3,1) both}
 @keyframes vt-out{to{opacity:0}}
 @keyframes vt-in{from{opacity:0;transform:translateY(10px)}}
}
@media(forced-colors:active){.line{clip-path:none}}
