/* Feel layer for studio pages: press feedback, image reveals, a nav that gets out of the
   way, link underlines and a gentle tilt. Loaded after studio.css. Anything that travels
   is dropped under reduced motion. */
:root {
  /* Soft spring: settles with a barely visible overshoot */
  --spring: linear(0, .06, .204, .384, .568, .734, .87, .97, 1.038, 1.077, 1.093, 1.093, 1.083, 1.067, 1.049, 1.032, 1.018, 1.007, .999, .994, .992, .991, .992, .993, .995, .996, .998, .999, 1);
}

/* Press feedback on everything tappable. The individual `scale` property composes with the
   reveal transform and the tilt's `rotate` instead of overriding them. */
.tl, .card, .locked {
  transition: opacity .6s var(--ease-out) var(--d, 0s), transform .6s var(--ease-out) var(--d, 0s),
    scale 160ms var(--ease-out), background-color .2s ease, border-color .2s ease;
}
.tl:active, .card:active, .locked:active, .port:active { scale: .98; }

/* Buttons: the icon leans toward where you're going */
.b svg { transition: transform .25s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .b:hover svg { transform: translateX(3px); }
}

/* Big feature images open up from an inset frame as they scroll in */
.feature .stage.reveal { opacity: 1; transform: none; clip-path: inset(7% 5% round 28px); transition: clip-path 1.1s var(--ease-out); }
.feature .stage.reveal.in { clip-path: inset(0 round 0); }
.feature .stage.reveal > img, .feature .stage.reveal > div { scale: 1.08; transition: scale 1.4s var(--ease-out); }
.feature .stage.reveal.in > img, .feature .stage.reveal.in > div { scale: 1; }

/* Hero: logo settles in, then the copy follows line by line */
.slide.on .logo { animation: logo-in .8s var(--ease-out) both; }
@keyframes logo-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.slide .txt { transform: none; opacity: 1; transition: none; }
.slide .txt > * { opacity: 0; }
.slide.on .txt > * { animation: rise .7s var(--ease-out) both; }
.slide.on .txt > :nth-child(1) { animation-delay: .15s; }
.slide.on .txt > :nth-child(2) { animation-delay: .22s; }
.slide.on .txt > :nth-child(3) { animation-delay: .29s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.slide .bg { transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.02); }

/* Roster portraits settle in on a soft spring */
.port.reveal { transform: translateY(16px) scale(.94); transition: opacity .45s ease, transform .7s var(--spring), scale 160ms var(--ease-out); transition-delay: var(--d, 0s), var(--d, 0s), 0s; }
.port.reveal.in { transform: none; }

/* Nav and announcement bar slide away while reading down, come back on scroll up */
.shout, .nav { transition: translate .35s var(--ease-out), background-color .3s ease, backdrop-filter .3s ease, border-color .3s ease; }
.chrome-hidden .shout, .chrome-hidden .nav { translate: 0 -112px; }
.nav:focus-within { translate: 0 0; }

/* Text links: underline draws in from the left */
.foot ul a, .crumb a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease-out), color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .foot ul a:hover, .crumb a:hover { background-size: 100% 1px; }
}
.foot ul a:focus-visible, .crumb a:focus-visible { background-size: 100% 1px; }

/* Gentle tilt with a soft light that follows the pointer (set by juice.js) */
.tiles, .news, .list { perspective: 1200px; }
[data-juice-tilt].is-tilting { will-change: rotate; }
[data-juice-tilt]::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.14), transparent 60%);
  opacity: 0; transition: opacity .4s ease; }
[data-juice-tilt].is-tilting::before { opacity: 1; }
.card[data-juice-tilt] { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .feature .stage.reveal { clip-path: none; }
  .feature .stage.reveal > img, .feature .stage.reveal > div { scale: 1; }
  .slide.on .logo { animation: none; }
  .slide .txt > * { opacity: 1; animation: none !important; }
  .slide .bg { transform: none; }
  .port.reveal { transform: none; }
  .chrome-hidden .shout, .chrome-hidden .nav { translate: 0 0; }
}
