/* Nervv logo reveal: ivory screen, the wordmark draws itself, the marigold node drops
   in from above and bounces (vertical only), then the screen lifts away. Shown once per
   visit, skipped on campaign visits and with reduced motion, absent without JavaScript. */

.rv-splash { display: none; }

html.js:not(.mf-skip):not(.mf-still) .rv-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--ivory, #F7F2E7);
  color: var(--ink, #1D2A23);
  animation: rv-lift 640ms cubic-bezier(.7, 0, .2, 1) 2260ms both;
}
html.js.rv-done .rv-splash { display: none !important; }

.rv-splash__mark svg {
  display: block;
  width: clamp(200px, 30vw, 360px);
  height: auto;
  overflow: visible;
}
.rv-splash .stroke { stroke: currentColor; }
.rv-splash .stroke path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rv-draw 640ms cubic-bezier(.4, 0, .2, 1) both;
}
.rv-splash .stroke path:nth-child(1) { animation-delay: 160ms; }
.rv-splash .stroke path:nth-child(2) { animation-delay: 300ms; }
.rv-splash .stroke path:nth-child(3) { animation-delay: 440ms; }
.rv-splash .stroke path:nth-child(4) { animation-delay: 580ms; }
.rv-splash .stroke path:nth-child(5) { animation-delay: 720ms; }

/* The node only ever moves on the vertical axis. */
.rv-splash .node {
  fill: var(--marigold, #E0A526);
  transform-box: fill-box;
  animation: rv-drop 1200ms linear 1000ms both;
}

@keyframes rv-draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  4% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes rv-drop {
  0%   { transform: translateY(-260%); opacity: 0; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  8%   { opacity: 1; }
  38%  { transform: translateY(0); animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  58%  { transform: translateY(-90%); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  76%  { transform: translateY(0); animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  88%  { transform: translateY(-28%); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes rv-lift {
  to { transform: translateY(-100%); visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-splash { display: none !important; }
}
