/* Tennessee Estate Law: v1.4 motion system.
   Principles: spring easing, transform/opacity only, pointer effects only on fine pointers,
   scroll-linked effects via CSS timelines where supported, everything off for reduced motion. */

:root{
	--tn-spring:cubic-bezier(.22,1.2,.36,1);
	--tn-spring-soft:cubic-bezier(.2,.9,.25,1.06);
}
@supports (transition-timing-function:linear(0,1)){
	:root{
		--tn-spring:linear(0,.009,.035 2.1%,.141 4.4%,.281 6.7%,.723 12.9%,.938 16.7%,1.017 19%,1.077 21.4%,1.121 24.3%,1.149 27.4%,1.159 30.6%,1.154 33.8%,1.129 38.4%,1.051 46%,1.017 51%,.991 56.9%,.977 63%,.975 68%,.997 80%,1.003 88%,1);
		--tn-spring-soft:linear(0,.18 4.5%,.55 10%,.86 16.5%,1.02 22%,1.045 27%,1.03 33%,1.01 42%,.998 55%,1);
	}
}

/* --------------------------------------------- hero: headline pre-hide guard */
.fx-pre .tn-hero__title,.fx-pre .tn-phero h1{visibility:hidden;animation:fxShow 0s 1.4s forwards}
@keyframes fxShow{to{visibility:visible}}

/* ------------------------------------------- masked word reveal for headings */
.fx-split{visibility:visible}
.fx-split .w{display:inline-block;overflow:hidden;vertical-align:top;padding:.04em .02em .16em;margin:-.04em -.02em -.16em}
.fx-split .w>span{display:inline-block;transform:translateY(112%) rotate(3deg);transform-origin:left bottom;transition:transform 1.05s var(--tn-spring-soft);transition-delay:calc(var(--i,0) * 62ms + 60ms)}
.fx-split.fx-in .w>span{transform:none}
.js .tn-hero__title,.js .tn-phero h1{animation:none}

/* ------------------------------------------------- spring-timed reveals */
@media (prefers-reduced-motion:no-preference){
	.tn-reveal{transition:opacity .7s var(--tn-ease-out),transform 1.1s var(--tn-spring-soft);transition-delay:var(--tn-d,0ms)}
	.tn-reveal.is-in{transform:none}
}

/* Heading ornaments draw in */
@media (prefers-reduced-motion:no-preference){
	.tn-head h2::after{transform:scaleX(0);transition:transform 1s var(--tn-ease-out) .35s}
	.tn-head:not(.tn-reveal) h2::after,.tn-head.is-in h2::after{transform:scaleX(1)}
	.tn-step:not(:last-child)::after{transform:scaleX(0);transform-origin:left;transition:transform .9s var(--tn-ease-out) .55s}
	.tn-step.is-in:not(:last-child)::after,.tn-step:not(.tn-reveal):not(:last-child)::after{transform:scaleX(1)}
}

/* ---------------------------------------------------- ambient hero motion */
@media (prefers-reduced-motion:no-preference){
	.tn-hero::before{display:block;content:"";position:absolute;inset:auto;width:620px;height:620px;right:-160px;top:-220px;border-radius:50%;background:radial-gradient(circle,rgba(193,160,109,.26),transparent 66%);animation:fxDriftA 22s ease-in-out infinite alternate;pointer-events:none}
	.tn-hero__in::before{content:"";position:absolute;width:520px;height:520px;left:-200px;bottom:-240px;border-radius:50%;background:radial-gradient(circle,rgba(83,103,91,.4),transparent 66%);animation:fxDriftB 26s ease-in-out infinite alternate;pointer-events:none}
	.tn-cta::before{display:block;content:"";position:absolute;inset:auto;width:520px;height:520px;right:-140px;top:-200px;border-radius:50%;background:radial-gradient(circle,rgba(193,160,109,.22),transparent 66%);animation:fxDriftA 24s ease-in-out infinite alternate;pointer-events:none}
	.tn-section--dark::before{content:"";position:absolute;width:560px;height:560px;left:-180px;top:-200px;border-radius:50%;background:radial-gradient(circle,rgba(193,160,109,.16),transparent 66%);animation:fxDriftB 28s ease-in-out infinite alternate;pointer-events:none}
	.tn-section--dark{position:relative;overflow:hidden}
	.tn-section--dark>.tn-wrap{position:relative}
}
@keyframes fxDriftA{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(-90px,70px,0) scale(1.12)}}
@keyframes fxDriftB{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(100px,-60px,0) scale(1.1)}}
.tn-hero__in,.tn-cta__in{position:relative;z-index:1}

/* Hero depth: layers follow the pointer (set by JS through --px / --py in -1..1) */
.tn-hero__stage::before{translate:calc(var(--px,0) * -26px) calc(var(--py,0) * -18px)}
.tn-hero__stage::after{translate:calc(var(--px,0) * 34px) calc(var(--py,0) * 22px)}
.tn-hcard{translate:calc(var(--px,0) * 10px) calc(var(--py,0) * 8px)}
.tn-hero__photo img{translate:calc(var(--px,0) * -8px) calc(var(--py,0) * -6px)}

/* Scroll-linked parallax (Chrome/Edge today; ignored elsewhere) */
@supports (animation-timeline:scroll()){
	@media (prefers-reduced-motion:no-preference){
		.tn-hero__stage::before{animation:fxParA linear both;animation-timeline:scroll(root block);animation-range:0 760px}
		.tn-hero__stage::after{animation:fxParB linear both;animation-timeline:scroll(root block);animation-range:0 760px}
		.tn-hero__copy{animation:fxCopyOut linear both;animation-timeline:scroll(root block);animation-range:0 640px}
		.tn-phero::before{animation:fxParA linear both;animation-timeline:scroll(root block);animation-range:0 520px}
		.tn-hero__photo img{animation:fxPhoto linear both;animation-timeline:scroll(root block);animation-range:0 760px}
	}
}
@keyframes fxParA{to{transform:translateY(90px)}}
@keyframes fxParB{to{transform:translateY(-70px)}}
@keyframes fxCopyOut{to{transform:translateY(-46px);opacity:.55}}
@keyframes fxPhoto{to{transform:scale(1.06) translateY(30px)}}
/* the phero emblem is vertically centred with transform; keep it centred while it parallaxes */
@supports (animation-timeline:scroll()){
	.tn-phero::before{animation-name:fxParEmblem}
	@keyframes fxParEmblem{from{transform:translateY(-50%)}to{transform:translateY(calc(-50% + 70px))}}
}

/* ------------------------------------------- pointer: spotlight + 3D tilt */
.fx-glow{position:absolute;inset:0;pointer-events:none;border-radius:inherit;opacity:0;transition:opacity .35s;background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),rgba(193,160,109,.20),transparent 45%);z-index:0}
.tn-section--dark .fx-glow,.tn-pull .fx-glow{background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),rgba(193,160,109,.22),transparent 45%)}
.fx-live>.fx-glow{opacity:1}
.tn-card>*:not(.fx-glow),.tn-step>*:not(.fx-glow),.tn-hcard>*:not(.fx-glow),.tn-pull>*:not(.fx-glow){position:relative;z-index:1}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
	.tn-card--service,.tn-card--icon,.tn-step{transform-style:preserve-3d}
	.tn-card--service.fx-live,.tn-card--icon.fx-live,.tn-step.fx-live{transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(-6px);transition:transform .18s ease-out,box-shadow .35s,border-color .35s,background-color .35s}
	.tn-card--service:not(.fx-live),.tn-card--icon:not(.fx-live),.tn-step:not(.fx-live){transition:transform .9s var(--tn-spring-soft),box-shadow .35s,border-color .35s,background-color .35s,opacity .7s var(--tn-ease-out)}
	.tn-btn{transition:background-color .25s,color .25s,border-color .25s,transform .25s var(--tn-ease),box-shadow .25s,translate .5s var(--tn-spring-soft)}
}

/* ---------------------------------------------------- header: smart hide */
@media (prefers-reduced-motion:no-preference){
	.tn-header{transition:transform .5s var(--tn-ease-out),box-shadow .3s,background-color .3s}
	html.hdr-hide .tn-header{transform:translateY(-102%);box-shadow:none}
	html{--tn-sticky-top:68px}
	html.hdr-hide{--tn-sticky-top:0px}
	.tn-subnav{transition:top .5s var(--tn-ease-out)}
}
@media (min-width:1200px) and (prefers-reduced-motion:no-preference){html{--tn-sticky-top:64px}html.hdr-hide{--tn-sticky-top:0px}}

/* ---------------------------- cross-page transitions (Chrome/Edge, no JS) */
@media (prefers-reduced-motion:no-preference){
	@view-transition{navigation:auto}
	.tn-header{view-transition-name:site-header}
	::view-transition-old(root){animation:fxVtOut .28s var(--tn-ease) both}
	::view-transition-new(root){animation:fxVtIn .55s var(--tn-ease-out) both}
	::view-transition-group(site-header){animation-duration:0s}
}
@keyframes fxVtOut{to{opacity:0;transform:translateY(-10px)}}
@keyframes fxVtIn{from{opacity:0;transform:translateY(16px)}}

@media (prefers-reduced-motion:reduce){
	.fx-glow{display:none}
	.fx-pre .tn-hero__title,.fx-pre .tn-phero h1{visibility:visible;animation:none}
}
