/* Devine Tree LLC: motion layer ("Living Tree" + holo card tiles).
   Loaded after site.css. Uses the brand tokens only; adds easing and timing tokens.
   Rules follow the animate / review-animations skills: transform and opacity only,
   strong ease-out curves, hover motion gated to real pointers, gentler motion
   (opacity only) when the visitor asks for reduced motion. */
:root{
  --ease-out:cubic-bezier(0.23,1,0.32,1);
  --ease-in-out:cubic-bezier(0.77,0,0.175,1);
  --dur-press:160ms;
  --dur-hover:200ms;
  --dur-reveal:300ms;
}

/* ---------- Hero: rings grow outward from the amber center, then the text rises in ---------- */
@media (prefers-reduced-motion:no-preference){
  .hero .rings circle[pathLength]{stroke-dasharray:1;stroke-dashoffset:1;animation:ring-draw 1200ms var(--ease-out) forwards}
  .hero .rings circle:nth-child(6){animation-delay:120ms}
  .hero .rings circle:nth-child(5){animation-delay:210ms}
  .hero .rings circle:nth-child(4){animation-delay:300ms}
  .hero .rings circle:nth-child(3){animation-delay:390ms}
  .hero .rings circle:nth-child(2){animation-delay:480ms}
  .hero .rings circle:nth-child(1){animation-delay:570ms}
  .hero .rings circle:last-child{transform-box:fill-box;transform-origin:center;animation:seed-in 700ms var(--ease-out) both}
  /* Later pages in the same visit show the rings already drawn (the head script adds .seen) */
  .seen .hero .rings circle{animation:none;stroke-dashoffset:0}

  .hero>.eyebrow,.hero>h1,.hero>p,.hero>.btn-row{animation:rise 300ms var(--ease-out) both}
  .hero>.eyebrow{animation-delay:40ms}
  .hero>h1{animation-delay:80ms}
  .hero>p{animation-delay:130ms}
  .hero>.btn-row{animation-delay:180ms}
  /* The text only rises on the first page of a visit, like the rings */
  .seen .hero>.eyebrow,.seen .hero>h1,.seen .hero>p,.seen .hero>.btn-row{animation:none}
}
@keyframes ring-draw{to{stroke-dashoffset:0}}
@keyframes seed-in{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .hero>.eyebrow,.hero>h1,.hero>p,.hero>.btn-row{animation:fade 300ms ease both}
  .seen .hero>.eyebrow,.seen .hero>h1,.seen .hero>p,.seen .hero>.btn-row{animation:none}
}
@keyframes fade{from{opacity:0}to{opacity:1}}

/* ---------- Nav: amber underline grows from the left ---------- */
.nav a{position:relative;border-bottom-color:transparent!important}
.nav a::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;border-radius:2px;background:var(--amber);transform:scaleX(0);transform-origin:left;transition:transform var(--dur-hover) var(--ease-out)}
.nav a[aria-current="page"]::after{transform:scaleX(1)}
@media (hover:hover) and (pointer:fine){.nav a:hover::after{transform:scaleX(1)}}

/* ---------- Buttons: respond to the press (transform only; the shadow stays put) ---------- */
.cta{transition:transform var(--dur-press) var(--ease-out)}
@media (hover:hover) and (pointer:fine){.cta:hover{transform:translateY(-1px)}}
.cta:active{transform:scale(.97)}
.btn{transition:transform var(--dur-press) var(--ease-out),background-color var(--dur-hover) ease}
@media (hover:hover) and (pointer:fine){.btn:hover{background-color:color-mix(in srgb,currentColor 9%,transparent)}}
.btn:active{transform:scale(.97)}

/* ---------- Link cards: lift on hover, give on press. Holo cards get their lift from the
   tilt in motion.js, so the CSS lift only applies to cards without it. ---------- */
a.card,a.news-item,.link-tile{transition:border-color var(--dur-hover) ease,transform var(--dur-hover) var(--ease-out)}
@media (hover:hover) and (pointer:fine){
  a.card:not(.holo):hover,a.news-item:not(.holo):hover,.link-tile:not(.holo):hover{transform:translateY(-2px)}
}
/* Every card gives on press; on a mouse the tilt's inline transform takes over, so this is felt on touch */
a.card:active,a.news-item:active,.link-tile:active{transform:scale(.98)}
.card .more{transition:color var(--dur-hover) ease}
@media (hover:hover) and (pointer:fine){a.card:hover .more{color:var(--moss)}}

/* ---------- Scroll reveal (motion.js adds .rv only to content below the first screen) ---------- */
.rv{opacity:0;transform:translateY(10px)}
.rv.rv-in{opacity:1;transform:none;transition:opacity var(--dur-reveal) var(--ease-out),transform var(--dur-reveal) var(--ease-out);transition-delay:var(--rv-delay,0ms)}
@media (prefers-reduced-motion:reduce){
  .cta,.btn,a.card,a.news-item,.link-tile{transform:none!important}
  .rv{transform:none}
  .rv.rv-in{transition:opacity 300ms ease;transition-delay:0ms}
}

/* ---------- Holo tiles: every card and link tile (motion.js adds .holo and the shine layer) ---------- */
.holo{position:relative;overflow:hidden;isolation:isolate;border:1.5px solid transparent;
  background:linear-gradient(var(--surface),var(--surface)) padding-box,
             linear-gradient(135deg,var(--amber),var(--moss) 40%,var(--line) 60%,var(--amber)) border-box;
  transform-style:preserve-3d}
.holo>*{position:relative;z-index:1}
.holo .holo-shine{position:absolute;left:-50%;top:-50%;width:200%;height:200%;z-index:0;pointer-events:none;opacity:0;
  background:
    radial-gradient(circle at center,color-mix(in srgb,var(--amber) 38%,transparent),transparent 22%),
    linear-gradient(90deg,transparent 38%,color-mix(in srgb,var(--moss) 22%,transparent) 46%,color-mix(in srgb,var(--amber) 20%,transparent) 51%,transparent 59%);
  /* motion.js turns this layer to follow the pointer around the card; the soft oval mask
     fades the streak's ends so the layer's own edges never show as it turns */
  -webkit-mask-image:radial-gradient(closest-side,#000 55%,transparent);mask-image:radial-gradient(closest-side,#000 55%,transparent);
  transition:opacity var(--dur-hover) ease}
.holo.is-live .holo-shine{opacity:1}
/* While live, the shine's colors drift slowly round the color wheel (Oct 14) */
@media (prefers-reduced-motion:no-preference){.holo.is-live .holo-shine{animation:holo-hue 8s linear infinite}}
@keyframes holo-hue{from{filter:hue-rotate(0deg)}to{filter:hue-rotate(360deg)}}
.holo .holo-mark{position:absolute;right:14px;top:14px;width:26px;height:26px;opacity:.55;z-index:1}
@media (hover:none),(pointer:coarse){.holo .holo-shine{opacity:0}}
.holo.is-live{will-change:transform;transition:border-color var(--dur-hover) ease} /* the tilt eases itself each frame; a CSS transition on top would lag it */
.holo-mark~h3{padding-right:34px}
.holo:has(.holo-mark){min-height:150px}
