/* Fleetmind logo motion. Seven moves built from the two parts of the mark: the chevron (the fleet)
   and the circle (the mind). Load palette.css first; the colours come from its tokens.

   Inline the symbol and add fm-mark plus one move:

     <svg class="fm-mark fm-loading" viewBox="0 0 256 256" role="img" aria-label="Loading">
       <path class="fm-ink" d="M90.06 128L23.03 195.03A24 24 0 1 0 56.97 228.97L140.97 144.97A24 24 0 0 0 140.97 111.03L56.97 27.03A24 24 0 1 0 23.03 60.97L90.06 128Z"/>
       <circle class="fm-dot" cx="210" cy="128" r="36"/>
     </svg>

   The files in logos/ carry the same classes, so the contents of symbol-light.svg or
   horizontal-light.svg can be pasted in as they are. Distances are in units of the 256 grid, so
   every move scales with the mark. Some moves leave the box (the orbit by 26 units); the clear
   space the logo already asks for covers it. README.md says where each move is used. */

.fm-mark { overflow: visible; --fm-ease: cubic-bezier(0.2, 0.8, 0.2, 1); }
.fm-mark .fm-ink, .fm-mark .fm-word { fill: var(--fm-logo-ink); }
.fm-mark .fm-dot { fill: var(--fm-logo-accent); transform-box: fill-box; transform-origin: center; }
/* one colour: the mark takes the text colour of its parent, as on an accent fill */
.fm-mark--mono :is(.fm-ink, .fm-dot, .fm-word) { fill: currentColor; }

/* 1. Intro: the chevron slides in, the mind overtakes it and settles, the name follows.
   Plays once (1.7 s) and rests as the static logo. Use on the horizontal lockup. */
.fm-intro .fm-ink { animation: fm-intro-ink 0.7s var(--fm-ease) both; }
.fm-intro .fm-dot { animation: fm-intro-dot 0.98s var(--fm-ease) 0.56s both; }
.fm-intro .fm-word { animation: fm-intro-word 0.56s ease 1.12s both; }
@keyframes fm-intro-ink { from { translate: -60px 0; opacity: 0; } }
@keyframes fm-intro-dot {
  from { transform: translateX(-120px) scale(0.2); opacity: 0; }
  71% { transform: translateX(8px) scale(1.15); opacity: 1; }
}
@keyframes fm-intro-word { from { translate: -8px 0; opacity: 0; } }

/* 2. Loading: the mind pulses and the chevron follows it. */
.fm-loading .fm-dot { animation: fm-pulse 1.2s ease-in-out infinite; }
.fm-loading .fm-ink { animation: fm-follow 1.2s ease-in-out infinite; }
@keyframes fm-pulse { 0%, 100% { transform: scale(0.8); } 50% { transform: scale(1.15); } }
@keyframes fm-follow { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(10px); } }

/* 3. Thinking: the mind circles the chevron. */
.fm-thinking .fm-dot { transform-box: view-box; transform-origin: 110px 128px; animation: fm-orbit 1.6s linear infinite; }
@keyframes fm-orbit { to { transform: rotate(360deg); } }

/* 4. Fleet: three chevrons follow the mind, the rear one first. Markup in README.md. */
.fm-fleet .fm-ink { animation: fm-advance 1.5s ease-in-out infinite; }
.fm-fleet g:nth-of-type(2) .fm-ink { animation-delay: 0.15s; }
.fm-fleet g:nth-of-type(3) .fm-ink { animation-delay: 0.3s; }
@keyframes fm-advance { 50% { transform: translateX(18px); } }

/* 5. Hover: the mind moves ahead and the chevron goes after it. Put fm-hover on the link or
   button that holds the mark, or on the mark itself; is-on does the same from a script. */
.fm-hover :is(.fm-ink, .fm-dot) { transition: transform 0.35s var(--fm-ease); }
.fm-hover:is(:hover, :focus-visible, .is-on) .fm-dot { transform: translateX(22px); }
.fm-hover:is(:hover, :focus-visible, .is-on) .fm-ink { transform: translateX(10px); }

/* 6. Cursor: the mind blinks like a terminal cursor. */
.fm-cursor .fm-dot { animation: fm-blink 1s steps(1) infinite; }
@keyframes fm-blink { 50% { opacity: 0; } }

/* 7. Send: put fm-send on the button; its mark nudges forward on hover and on keyboard focus. */
.fm-send:is(:hover, :focus-visible) :is(.fm-ink, .fm-dot) { animation: fm-nudge 0.6s ease; }
@keyframes fm-nudge { 50% { transform: translateX(12px); } }

/* Reduced motion: nothing travels. Loading and thinking still have to show that something is
   going on, so there the mind fades in place; the other moves rest as the static logo. */
@media (prefers-reduced-motion: reduce) {
  .fm-mark :is(.fm-ink, .fm-dot, .fm-word),
  .fm-send:is(:hover, :focus-visible) :is(.fm-ink, .fm-dot) { animation: none; transition: none; }
  .fm-hover:is(:hover, :focus-visible, .is-on) :is(.fm-ink, .fm-dot) { transform: none; }
  .fm-loading .fm-dot, .fm-thinking .fm-dot { animation: fm-fade 2s ease-in-out infinite; }
}
@keyframes fm-fade { 50% { opacity: 0.35; } }
