/* Motion extras: pinned header, scroll reveals, homepage icon draw-in.
   Everything here is decoration; content is complete without it and it all
   switches off for visitors who ask for reduced motion. Script: js/motion-extras.js */

/* Header stays in reach and tightens slightly once you scroll. */
html { scroll-padding-top:calc(var(--header-h) + 14px); }
.site-header[data-include] { position:sticky; top:0; z-index:60; transition:height .28s var(--ease), box-shadow .28s ease; }
.site-header[data-include].is-scrolled { --header-h:54px; box-shadow:0 8px 28px rgba(17,17,17,.05); }

/* Scroll reveals. The .rv class is only ever added by the script. */
.rv { opacity:0; transform:translateY(16px); }
.rv.rv-in { opacity:1; transform:none; transition:opacity .6s ease, transform .75s var(--ease); }

/* Homepage doors: the icon redraws itself on hover. */
.pathway:hover .pathway-icon svg [stroke] { stroke-dasharray:170; animation:icon-draw .75s var(--ease) both; }
@keyframes icon-draw { from { stroke-dashoffset:170; } to { stroke-dashoffset:0; } }

@media (prefers-reduced-motion:reduce) {
  .site-header[data-include] { transition:none; }
  .rv { opacity:1; transform:none; }
  .pathway:hover .pathway-icon svg [stroke] { animation:none; stroke-dasharray:none; }
}
