/* Entrance animations for the support and privacy pages, the same motion as
   the homepage (site.css, home-enter).

   Each element enters once:
     - the first screen animates as the page loads (pure CSS, so it never
       shows first and animates after);
     - elements marked .rv further down fade in as they're scrolled to
       (assets/page-reveal.js). The script only arms an element that is still
       below the fold and has no load animation of its own, so nothing can
       animate twice, and nothing on screen is ever hidden after it's shown.
   Nothing moves for visitors who ask for reduced motion. */
@keyframes page-enter{
  from{opacity:.42; translate:0 12px}
  to{opacity:1; translate:none}
}
@keyframes page-fade{
  from{opacity:0}
  to{opacity:1}
}
@media (prefers-reduced-motion:no-preference){
  /* first screen, on load */
  .sup-hero .pill, .sup-hero h1, .sup-lede, .sup-hero__mascot,
  .legal > .eyebrow, .legal > h1, .legal__date, .legal__short{
    animation:page-enter .76s cubic-bezier(.25,.65,.3,1) backwards;
  }
  .sup-hero h1, .legal > h1{animation-delay:80ms}
  .sup-hero__mascot{animation-delay:120ms}
  .sup-lede, .legal__date{animation-delay:160ms}
  .legal__short{animation-delay:220ms}
  /* The three support cards sit on the first screen of any desktop window:
     they come in on load, after the heading. Narrower or shorter windows
     reveal them on scroll instead (page-reveal.js sees the load animation
     and leaves them alone here). */
  @media (min-width:901px) and (min-height:560px){
    .sup-card.rv{animation:page-enter .76s cubic-bezier(.25,.65,.3,1) backwards; animation-delay:240ms}
    .sup-card.rv:nth-child(2){animation-delay:310ms}
    .sup-card.rv:nth-child(3){animation-delay:380ms}
  }

  /* further down, on scroll */
  .rv-pending:not(:focus-within, :target){opacity:.42; translate:0 12px}
  .rv-in{animation:page-enter .76s cubic-bezier(.25,.65,.3,1) backwards}
  .sup-card.rv-in:nth-child(2){animation-delay:70ms}
  .sup-card.rv-in:nth-child(3){animation-delay:140ms}

  /* small touches */
  .sup-card{transition:transform .2s ease, box-shadow .2s ease}
  @media (hover:hover){ .sup-card:hover{transform:translateY(-2px); box-shadow:0 14px 30px rgba(107,36,16,.13)} }
  .reveal-out{animation:page-fade .3s ease both}
  /* Questions open and close smoothly where the browser can animate it. */
  @supports (interpolate-size:allow-keywords){
    .sup-q{interpolate-size:allow-keywords}
    .sup-q::details-content{height:0; overflow:clip; transition:height .28s ease, content-visibility .28s allow-discrete}
    .sup-q[open]::details-content{height:auto}
  }
}
