/* Shared hover, focus and page-change feedback for the landing and legal pages.
   Loaded after each page's own <style>, so these rules refine the base look. Not used by /app/. */

/* page change: the header stays put and the page body cross-fades (Chrome and Edge; others just load the page) */
@view-transition { navigation: auto; }
.bar { view-transition-name: bar; }
::view-transition-group(bar) { animation-duration: 0s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: cubic-bezier(.165, .84, .44, 1); }

/* primary buttons: a darker fill sweeps in from the start side, the button lifts a little, pressing shrinks it */
.btn { --btn-base: var(--cobalt); --btn-fill: var(--cobalt-d); }
.btn.light { --btn-base: var(--signal, #FFC21A); --btn-fill: #FFE07A; }
.btn:not(.ghost) {
  background-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  background-repeat: no-repeat; background-position: right center; background-size: 0% 100%;
  transition: background-size .38s cubic-bezier(.165, .84, .44, 1), transform .2s, box-shadow .2s;
}
.btn.ghost { transition: background-color .2s, color .2s, transform .2s; }
@media (hover: hover) {
  .btn:not(.ghost):hover { background-color: var(--btn-base); background-size: 100% 100%; transform: translateY(-2px); box-shadow: 0 10px 22px -10px var(--btn-fill); }
  .btn.ghost:hover { transform: translateY(-2px); }
}
.btn:not(.ghost):focus-visible { background-color: var(--btn-base); background-size: 100% 100%; }
.btn:active { transform: scale(.97); }

/* logo and navigation: a line draws under them */
.logo, .bar nav a {
  background: linear-gradient(currentColor, currentColor) right bottom / 0% 2px no-repeat;
  padding-bottom: 3px; transition: background-size .4s cubic-bezier(.165, .84, .44, 1), color .2s;
}
.bar nav a { background-size: 0% 1px; }
@media (hover: hover) { .logo:hover, .bar nav a:hover { background-size: 100% 2px; } .bar nav a:hover { background-size: 100% 1px; } }
.logo:focus-visible, .bar nav a:focus-visible { background-size: 100% 2px; }

/* the sound and pause buttons on the sample clip: bigger, they answer the pointer, and a pressed state is clearly visible */
.bactl { width: 44px; height: 44px; transition: transform .2s, background-color .2s, border-color .2s, color .2s; }
@media (hover: hover) { .bactl:hover { transform: scale(1.1); background: rgba(10, 13, 19, .92); border-color: #fff; } }
.bactl:active { transform: scale(.94); }
.bactl[aria-pressed="true"] { background: #fff; color: #0A0D13; border-color: #fff; }

/* reduced motion: the state change stays, the movement goes */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .btn, .btn:not(.ghost), .btn.ghost, .logo, .bar nav a, .bactl { transition: none; }
  .btn:hover, .btn:active, .bactl:hover, .bactl:active { transform: none; }
}
