/* The site's shared motion rules, beside /assets/motion.js. Transform and opacity only.
   Nothing here hides text: every page reads in full without this file. */
:root{--settle:cubic-bezier(.16,1,.3,1);}

/* Links change pages at once. Where the browser supports it, the two pages blend: one
   crossfade, 240ms. Elsewhere it is an ordinary page change. Both pages must carry this file
   for the blend to happen.
   ⛔ The two halves share one duration and one easing, so their opacities always add up to 1.
   The browser lays them together with plus-lighter blending; any other pair of curves adds up
   to more than 1 part-way through and the frame washes out toward blank paper.
   A page that draws its content after loading (html[data-se-wait]) holds this blend on its
   first frame, with the old page fully visible, until that content is on screen: see the
   pagereveal handler in /assets/motion.js. */
@view-transition{navigation:auto;}
::view-transition-old(root){animation:se-page-out 240ms var(--settle) both;}
::view-transition-new(root){animation:se-page-in 240ms var(--settle) both;}
@keyframes se-page-out{from{opacity:1;}to{opacity:0;}}
@keyframes se-page-in{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}

/* A press dips the button 1px and it settles back. Each keeps its own colour timing. */
:is(.sub-go,.join-go,.hw-send,.browse,.current,.further){touch-action:manipulation;}
:is(.join-go,.hw-send){transition:translate 200ms var(--settle);}
.sub-go{transition:color .42s ease,translate 200ms var(--settle);}
:is(.browse,.current,.further){transition:color .3s ease,translate 200ms var(--settle);}
:is(.sub-go,.join-go,.hw-send,.browse,.current,.further):active{translate:0 1px;transition-duration:70ms;}
:is(.masthead-home,.mh-home,.endlink,.homelink,.letter-endlink){touch-action:manipulation;}

/* The navigation's "more" control keeps a visible keyboard ring. */
.grain-mark:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:4px;}

/* The background texture is painted at rest; it softens for a moment while the page scrolls.
   It dims quickly and comes back at the page's own slower fade. */
body.reading-scroll :is(.letter-sea,.about-sea).is-awash:not(.is-flooded){opacity:.55;transition:opacity 220ms ease-out;}

/* Hover movement only for a mouse-like pointer, so nothing is left shifted after a tap. */
@media (hover:hover) and (pointer:fine){
  :is(.mh-home,.endlink,.homelink,.letter-endlink) svg{transition:transform 240ms var(--settle);}
  .mh-home:hover svg{transform:translateY(-1px);}
  :is(.endlink,.homelink,.letter-endlink):hover svg{transform:translateY(-2px);}
  .more-morning .arrow{transition:transform 200ms var(--settle),opacity 200ms ease-out,color .2s ease;}
  .more-morning:hover .arrow{transform:translateX(3px);}
}

@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none;}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important;}
  :is(.sub-go,.join-go,.hw-send,.browse,.current,.further){transition:none;}
  :is(.sub-go,.join-go,.hw-send,.browse,.current,.further):active{translate:none;}
  :is(.mh-home,.endlink,.homelink,.letter-endlink) svg{transition:none;transform:none !important;}
  .more-morning .arrow{transition:none;transform:none !important;}
  body.reading-scroll :is(.letter-sea,.about-sea).is-awash:not(.is-flooded){opacity:1;transition:none;}
}
