/* NEAP animated N: the bow of a boat on still water, the cyan cap is its sensor.
   Default state (no JS, reduced motion) is the finished, static N. */

.hero-n {
  --n-anim-h: 168px;
  --n-anim-line: 4px;            /* height of the thin multicolor line it sits on (.hero-line) */
  position: absolute;
  left: 50%;
  bottom: var(--n-anim-line);
  transform: translateX(-50%);
  height: var(--n-anim-h);
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 640px) {
  .hero-n { --n-anim-h: 110px; }
}

.n-anim {
  --n-anim-cyan: #2CD3F5;
  --n-anim-blue: #1E6FE0;
  --n-anim-green: #19C27A;
  --n-anim-navy: #0E2347;
  display: block;
  height: 100%;
  width: auto;
  aspect-ratio: 168 / 68;
  overflow: hidden;
}
.n-anim * { transform-box: view-box; }

/* ---------- finished state ---------- */
.n-anim-fill-navy { fill: var(--n-anim-navy); opacity: 0; }
.n-anim-cap { fill: var(--n-anim-cyan); }
.n-anim-pool { opacity: .75; }
.n-anim-guide {
  stroke: var(--n-anim-cyan);
  stroke-width: .22;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0;
}
.n-anim-line {
  fill: none;
  stroke: #FFFFFF;
  stroke-width: .42;
  stroke-linejoin: miter;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0;
}
.n-anim-ghost {
  fill: none;
  stroke: var(--n-anim-cyan);
  stroke-width: .38;
  stroke-dasharray: .9 .7;
  opacity: 0;
}
.n-anim-flash {
  stroke: #E9FBFF;
  stroke-width: .7;
  stroke-linecap: round;
  stroke-dasharray: .45 1;
  stroke-dashoffset: 0;
  opacity: 0;
}
.n-anim-arc {
  stroke: var(--n-anim-cyan);
  stroke-width: 1.1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transform-origin: 42px 6px;
  opacity: 0;
}
.n-anim-wave {                     /* ripples on the line itself, a fixed 1.5 px at any size */
  stroke: var(--n-anim-cyan);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}
.n-anim-wave { transform-box: fill-box; }
.n-anim-wave--l1, .n-anim-wave--l2 { transform-origin: right center; }
.n-anim-wave--r1, .n-anim-wave--r2 { transform-origin: left center; }
.n-anim-wave--l2, .n-anim-wave--r2 { stroke: #8BE9FB; stroke-width: 1.2; --n-anim-wave-o: .7; }
.n-anim-glint { stroke: #FFFFFF; stroke-width: .25; opacity: 0; }
.n-anim-pen { fill: #FFFFFF; opacity: 0; }

/* ---------- motion (JS adds .n-anim--on, and .n-anim--paused until in view) ---------- */
.n-anim--on .n-anim-guide          { animation: n-anim-guide 3.2s linear .05s both; }
.n-anim--on .n-anim-guide--b       { animation-delay: .25s; }
.n-anim--on .n-anim-guide--c       { animation-delay: .15s; }
.n-anim--on .n-anim-line--body     { animation: n-anim-draw 2.8s linear .25s both; }
.n-anim--on .n-anim-pen            { animation: n-anim-pen 1.75s linear .25s both; }
.n-anim--on .n-anim-ghost          { animation: n-anim-ghost 2.3s ease 1.15s both; }
.n-anim--on .n-anim-fill-navy      { animation: n-anim-navy 1.2s ease 1.35s both; }
.n-anim--on .n-anim-fill-white     { animation: n-anim-rise 1.15s cubic-bezier(.45,0,.2,1) 1.75s both; }
.n-anim--on .n-anim-cap            { animation: n-anim-dock 1.2s 2.35s both, n-anim-beacon 5s ease-out 4.4s 3 both; }
.n-anim--on .n-anim-flash          { animation: n-anim-flash .9s ease-out 3.44s both; }
.n-anim--on .n-anim-flash--b       { animation-delay: 3.5s; }
.n-anim--on .n-anim-pool           { animation: n-anim-pool 1.6s ease 3.4s both; }

/* idle loop: starts after the click and stops on its own after three cycles (about 15 s), so no pause control is needed */
.n-anim--on .n-anim-arc            { animation: n-anim-ping 5s cubic-bezier(.2,.6,.3,1) 4.4s 3 both; }
.n-anim--on .n-anim-arc--b         { animation-delay: 4.8s; }
.n-anim--on .n-anim-wave--l1,
.n-anim--on .n-anim-wave--l2       { animation: n-anim-wake-l 5s cubic-bezier(.25,.6,.35,1) 4.7s 3 both; }
.n-anim--on .n-anim-wave--r1,
.n-anim--on .n-anim-wave--r2       { animation: n-anim-wake-r 5s cubic-bezier(.25,.6,.35,1) 4.7s 3 both; }
.n-anim--on .n-anim-wave--l2,
.n-anim--on .n-anim-wave--r2       { animation-delay: 5.15s; }
.n-anim--on .n-anim-glint          { animation: n-anim-glint 5s ease-in-out 4.6s 3 both; }
.n-anim--on .n-anim-boat           { animation: n-anim-bob 5s ease-in-out 4.6s 3 both; }

.n-anim--paused, .n-anim--paused * { animation-play-state: paused !important; }

@keyframes n-anim-guide {
  0%   { stroke-dashoffset: 1; opacity: .5; }
  22%  { stroke-dashoffset: 0; opacity: .5; }
  70%  { opacity: .32; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes n-anim-draw {           /* 1.5 s of drawing, then the hairline fades out as the white fill completes (about 3.05 s) */
  0%   { stroke-dashoffset: 1; opacity: 1; }
  53%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes n-anim-pen {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  82%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes n-anim-ghost {
  0%   { opacity: 0; stroke-dashoffset: 0; }
  25%  { opacity: .75; }
  80%  { opacity: .75; stroke-dashoffset: -3; }
  100% { opacity: 0; stroke-dashoffset: -3.6; }
}
@keyframes n-anim-navy {           /* gone before the white reaches the top, so no navy rim is left */
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes n-anim-rise {           /* a straight light wipe up from the waterline; no clipPath, no transform in the static state */
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes n-anim-dock {           /* glide down onto the stem, then a crisp snap */
  0%   { transform: translateY(-13px); opacity: 0; animation-timing-function: cubic-bezier(.15,.7,.25,1); }
  35%  { opacity: 1; }
  86%  { transform: translateY(-.7px); animation-timing-function: cubic-bezier(.6,0,1,1); }
  92%  { transform: translateY(.35px); animation-timing-function: ease-out; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes n-anim-flash {
  0%   { stroke-dashoffset: .45; opacity: 1; stroke: #FFFFFF; }
  55%  { stroke-dashoffset: -1; opacity: 1; stroke: #2CD3F5; }
  100% { stroke-dashoffset: -1; opacity: 0; stroke: #2CD3F5; }
}
@keyframes n-anim-pool {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: .75; }
}
@keyframes n-anim-ping {           /* one soft beacon per 5 s cycle */
  0%   { transform: scale(.55); opacity: 0; }
  6%   { opacity: .85; }
  34%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes n-anim-wake-l {
  0%   { transform: translateX(2px) scaleX(.6); opacity: 0; }
  8%   { opacity: var(--n-anim-wave-o, .9); }
  55%  { transform: translateX(-36px) scaleX(1.6); opacity: 0; }
  100% { transform: translateX(-36px) scaleX(1.6); opacity: 0; }
}
@keyframes n-anim-wake-r {
  0%   { transform: translateX(-2px) scaleX(.6); opacity: 0; }
  8%   { opacity: var(--n-anim-wave-o, .9); }
  55%  { transform: translateX(36px) scaleX(1.6); opacity: 0; }
  100% { transform: translateX(36px) scaleX(1.6); opacity: 0; }
}
@keyframes n-anim-beacon {         /* the sensor glows softly as it pings */
  0%, 100% { filter: none; }
  4%       { filter: drop-shadow(0 0 1.4px rgba(44, 211, 245, .9)); }
  30%      { filter: none; }
}
@keyframes n-anim-glint {
  0%, 100% { opacity: .15; }
  12%      { opacity: .6; }
  50%      { opacity: .2; }
}
@keyframes n-anim-bob {            /* a slow vertical heave; no rotation, so the verticals stay straight */
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(.6px); }
}

@media (prefers-reduced-motion: reduce) {
  .n-anim *, .n-anim--on * { animation: none !important; }
}
